source('~/valse/pkg/R/gridLambda.R')
grid_lambda <<- gridLambda(phiInit, rhoInit, piInit, gamInit, X, Y, gamma, mini, maxi, eps)
- if (length(grid_lambda)>50){
- grid_lambda = grid_lambda[seq(1, length(grid_lambda), length.out = 50)]
- }
+ # if (length(grid_lambda)>50){
+ # grid_lambda = grid_lambda[seq(1, length(grid_lambda), length.out = 50)]
+ # }
print("Compute relevant parameters")
#select variables according to each regularization parameter
#from the grid: A1 corresponding to selected variables, and
par(mfrow = c(1,3))
for (r in kSel){
- image.plot(t(abs(model$phi[,,r])),title="hat{beta}",xaxt="n",yaxt="n",
+ image.plot(t(abs(model$phi[,,r])),xaxt="n",yaxt="n",
col=gray(rev(seq(0,64,length.out=65))/65),breaks=seq(0,valMax,length.out=66))
}
image.plot(t(abs(model$phi[,,kSel[1]]-model$phi[,,kSel[2]])),