I am using the r package glmnet to do the lasso for Correlated Variable Selection. I need to find the lambdas associated with the minimum mean squared value following answer from Variablity in cv.glmnet results. I used the code below:
my_data<-as.matrxi(my_data)
x<-my_data[,-1]
y<-my_data[,1]
cvob10<-cv.glmnet(x,y)
plot(cvob10)
The result is on the left of the figure below. Minimum MSE corresponds to very large lambdas which could not help me to select predictors in the next step.
For comparison, I tried the swiss data in r. Using the same code.
swiss<-as.matrxi(swiss)
x<-swiss[,-1]
y<-swiss[,1]
cvob8<-cv.glmnet(x,y)
plot(cvob8)
I got a different result(on the right of the figure below). Small MSEs corresponds to small lambdas.
I have repeated many times of the codes above. My questions are:
1. Is the relationship between MSE and log(lambda) important?
2. What information can I take from the figure above?
3. If my min.lambda associated with very large MSE, can I still trust it and use it select my predictors?