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!

_________________________________________________________________
With tax season right around the corner, make sure to follow these few 
simple tips.

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to