[R] A question on glmnet analysis
細田弘吉
khosoda at med.kobe-u.ac.jp
Sun Mar 27 15:49:52 CEST 2011
(11/03/25 22:40), Nick Sabbe wrote:
> 2. Which model, I mean lasso or elastic net, should be selected? and
> why? Both models chose the same variables but different coefficient values.
> You may want to read 'the elements of statistical learning' to find some
> info on the advantages of ridge/lasso/elnet compared. Lasso should work fine
> in this relatively low-dimensional setting, although it depends on the
> correlation structure of your covariates.
I also checked correlation structure of my covariates.
test <- lm(y ~ x15std)
library(DAAG)
vif(test)
x15std1 x15std2 x15std3 x15std4 x15std5 x15std6 x15std7 x15std8
x15std9 x15std10 x15std11 x15std12 x15std13 x15std14
1.2299 1.2880 1.1011 1.1559 1.3033 1.0774 1.5369 1.9604
1.4664 1.1754 1.1396 1.2683 1.1685 1.1667
x15std15
1.5534
Variance inflation are less than 5 suggesting that multicollinearity is
unlikely to be a problem.
Therefore, Lasso model should be selected?
Thanks a lot in advance,
KH
More information about the R-help
mailing list