3 #' Construct the data-driven grid for the regularization parameters used for the Lasso estimator
5 #' @param phiInit value for phi
6 #' @param rhoInit value for rho
7 #' @param piInit value for pi
8 #' @param gamInit value for gamma
9 #' @param X matrix of covariates (of size n*p)
10 #' @param Y matrix of responses (of size n*m)
11 #' @param gamma power of weights in the penalty
12 #' @param mini minimum number of iterations in EM algorithm
13 #' @param maxi maximum number of iterations in EM algorithm
14 #' @param tau threshold to stop EM algorithm
16 #' @return the grid of regularization parameters
19 computeGridLambda = function(phiInit, rhoInit, piInit, gamInit, X, Y,
20 gamma, mini, maxi, tau)
27 # TODO: explain why gamma=1 instad of just 'gamma'?
28 list_EMG = EMGLLF(phiInit, rhoInit, piInit, gamInit, mini, maxi,
29 gamma=1, lamba=0, X, Y, tau)
30 grid = array(0, dim=c(p,m,k))
34 grid[i,j,] = abs(list_EMG$S[i,j,]) / (n*list_EMG$pi^gamma)
37 grid = grid[grid <= 1]