1
$\begingroup$

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.

$\endgroup$
  • $\begingroup$ 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. $\endgroup$ – Jake Westfall Jun 8 '17 at 21:05
5
$\begingroup$

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.

$\endgroup$
  • $\begingroup$ 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. $\endgroup$ – Sedi Jun 8 '17 at 18:35
  • $\begingroup$ @Sedi No, it doesn't, as I just explained $\endgroup$ – Jake Westfall Jun 8 '17 at 18:37
  • $\begingroup$ 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. $\endgroup$ – Sedi Jun 8 '17 at 18:40
  • $\begingroup$ @Sedi Perhaps, but that's a different issue entirely $\endgroup$ – Jake Westfall Jun 8 '17 at 18:43
  • $\begingroup$ You are right. Do you have any suggestion for any other function or package, so that I can compare? $\endgroup$ – Sedi Jun 8 '17 at 19:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.