[R] Model selection in LASSO (cross-validation)
WQ Y
hi_squirrel at hotmail.com
Thu Mar 15 22:11:22 CET 2007
Hi, I know how to use LASSO for model selection based on the Cp criterion.
I heard that we can also use cross validation as a criterion too. I used
cv.lars to give me the lowest predicted error & fraction. But I'm short of
a step to arrive at the number of variables to be included in the final
model. How do we do that? Is it the predict.lars function? i tried >
logprostate.plars.cv=predict.lars(logprostate.lars.cv, M, type = "fit",
mode="fraction") but it gives me error message:
Error in dim(data) <- dim : attempt to set an attribute on NULL. Please
help!
Thanks!
_________________________________________________________________
The average US Credit Score is 675. The cost to see yours: $0 by Experian.
More information about the R-help
mailing list