1 #' Construct the data-driven grid for the regularization parameters used for the Lasso estimator
2 #' @param phiInit value for phi
3 #' @param rhoInit value for rho
4 #' @param piInit value for pi
5 #' @param gamInit value for gamma
6 #' @param X matrix of covariates (of size n*p)
7 #' @param Y matrix of responses (of size n*m)
8 #' @param gamma power of weights in the penalty
9 #' @param mini minimum number of iterations in EM algorithm
10 #' @param maxi maximum number of iterations in EM algorithm
11 #' @param tau threshold to stop EM algorithm
12 #' @return the grid of regularization parameters
14 #-----------------------------------------------------------------------
15 gridLambda = function(phiInit, rhoInit, piInit, gamInit, X, Y, gamma, mini, maxi, tau)
22 #list_EMG = .Call("EMGLLF_core",phiInit,rhoInit,piInit,gamInit,mini,maxi,1,0,X,Y,tau)
23 list_EMG = EMGLLF(phiInit,rhoInit,piInit,gamInit,mini,maxi,1,0,X,Y,tau)
24 grid = array(0, dim=c(p,m,k))
28 grid[i,j,] = abs(list_EMG$S[i,j,]) / (n*list_EMG$pi^gamma)