[R] all subsets for glm

Thomas Lumley tlumley at u.washington.edu
Mon Apr 6 11:33:58 CEST 2009


If you actually want to find the best subsets, you can get a good 
approximation by using leaps on the weighted least squares fit that is the 
last iteration of the IWLS algorithm for fitting the glm.

Running regsubsets witha reasonably large value of nbest and then 
refitting the top models as glms afterwards will fairly realiably give the 
best glms.

Whether this is better than lasso depends on what you are trying to do - 
IMO the only point of all-subsets regression is to get many best models 
rather than a single one, and lasso doesn't do at all well at that.

 	-thomas

On Sat, 4 Apr 2009, Harald von Waldow wrote:

>
>> Of all the dangerous ways of doing this and getting confusing results,
>> gl1ce in lasso2 should be the least risky.
>
> Thanks Dieter. In case an exhaustive search (all subsets) remains
> infeasible, I'll include a shrinkage method for sure. Looks like
> glmpath could be useful here.
>
> Best,
> Harald
>
> ______________________________________________
> R-help at r-project.org 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.
>

Thomas Lumley			Assoc. Professor, Biostatistics
tlumley at u.washington.edu	University of Washington, Seattle




More information about the R-help mailing list