I have a small sample size $n<20$. I want to find which combination of 8 variables better predict $y$.
I was using a stepAICc
but it is suggested to away stepwise model selection. I have tried lars
and glmnet
but I don't understand the output. Before with stepAICc I could just pick the model with the lowest AICc value, but how do I proceed with lasso?
Output from glmnet
is
Call: glmnet(x = x, y = y, family = "gaussian")
Df %Dev Lambda
[1,] 0 0.00000 3.416e-01
[2,] 1 0.09574 3.113e-01
[3,] 1 0.17520 2.836e-01
[4,] 1 0.24120 2.584e-01
[5,] 2 0.29650 2.355e-01
[6,] 2 0.34420 2.146e-01
[7,] 2 0.38380 1.955e-01
[8,] 2 0.41660 1.781e-01
[9,] 2 0.44390 1.623e-01
[10,] 2 0.46650 1.479e-01
And output from lars
Call:
lars(x = x, y = y)
R-squared: 0.76
Sequence of LASSO moves:
st0011sme ss0011sme bs0011yme ss0011yme st0011yme st0011sme bt0011sme st0011sme bt0011yme bs0011sme bt0011yme
Var 3 7 6 8 4 -3 1 3 2 5 -2
Step 1 2 3 4 5 6 7 8 9 10 11
ss0011yme ss0011yme bt0011yme bt0011sme bt0011sme
Var -8 8 2 -1 1
Step 12 13 14 15 16
> summary(las)
LARS/LASSO
Call: lars(x = x, y = y)
Df Rss Cp
0 1 3.3117 15.1324
1 2 2.3602 8.7622
2 3 1.4104 2.4066
3 4 1.3931 4.2552
4 5 1.1681 4.2758
5 6 1.1502 6.1177
glmnet
. You can use cross-validation to pick which value of the tuning parameter to use. $\endgroup$glmnet
?", which I think is explained very well in that tutorial from one of its authors (& too broad for CV)? If you don't know much about how the elastic net works, the books ISL & ESL are excellent & free. $\endgroup$