# LASSO: optimal $\lambda$ drops all predictors from model

I have survival data and large numbers of predictors. I am trying to use LASSO' orelastic net' in package glmnet' in R to select appropriate covariates. I use following code:

cv.glmnet(x, y, family="cox",alpha=0.5,nfolds=20, grouped=TRUE) # for Elastic net and

cv.glmnet(x, y, family = "cox",alpha=1, nfolds=20, grouped=TRUE) # For LASSO

Where $x$ is the matrix of predictors and $y$ is containing two columns of survival time and censoring status. I don't get any Error or warning, but it seems there is some convergence issue as it gives the minimum value of $\lambda$ at the extreme and using that $\lambda$, it choose no predictor. Is there any way to improve this code to get the optimum value of $\lambda$? Or is there any other way which I can have LASSO' and 'Elastic net' together and compare them?

Note: I have checked with nfold'=10 and get the same result.

• I chose not to vote to close because, although the OP phrases this as a software/convergence issue, it is in fact about a situation where the regularization drops all the predictors from the model, which is an issue not special to any particular software. I rephrased the question title to be consistent with this. – Jake Westfall Jun 8 '17 at 21:05

This doesn't mean that the algorithm didn't converge. It means that none of your predictors are very strongly related to the outcome, so that a model with no predictors (which therefore just predicts the sample mean for all observations) has a lower expected prediction error than any models that include your predictors.

• But giving minimum, $\lambda$ at the extreme value all the time (with any fixed seed) means there is some problem. In fact for some seed when I use LASSO' it gives some warning which says for some value of $\lambda$ it is not converged. – Sedi Jun 8 '17 at 18:35
• @Sedi No, it doesn't, as I just explained – Jake Westfall Jun 8 '17 at 18:37
• It may not be acceptable for those who are collected the data, as they think at least some socioeconomic covariates should be important to be in the model. – Sedi Jun 8 '17 at 18:40
• @Sedi Perhaps, but that's a different issue entirely – Jake Westfall Jun 8 '17 at 18:43
• You are right. Do you have any suggestion for any other function or package, so that I can compare? – Sedi Jun 8 '17 at 19:02