- Res <- EMGLLF(phiInit,rhoInit,piInit,gamInit,mini,maxi,
- gamma,glambda[lambdaIndex],X,Y,tau);
- phi <- Res$phi
- rho <- Res$rho
- pi <- Res$pi
-
- # If a coefficient is larger than the threshold, we keep it
- selectedVariables <- array(0, dim = c(p,m))
- discardedVariables <- array(0, dim = c(p,m))
- atLeastOneSelectedVariable <- false
- for (j in c(1:p))
- {
- cpt <- 1
- cpt2 <-1
- for (mm in c(1:m))
- {
- if (max(abs(phi[j,mm,])) > thres)
- {
- selectedVariables[j,cpt] <- mm
- cpt <- cpt+1
- atLeastOneSelectedVariable <- true
- } else
- {
- discardedVariables[j,cpt2] <- mm
- cpt2 <- cpt2+1
- }
- }
- }
+ params = EMGLLF(phiInit,rhoInit,piInit,gamInit,mini,maxi,gamma,glambda[lambdaIndex],X,Y,tau)