[R] variable selection for multiple regression model

Greg Snow Greg.Snow at imail.org
Sun Oct 19 06:16:16 CEST 2008


The leaps package does best subset and returns some of what you asked for, but it does not do press.  The DAAG package (and possibly others) has a function to compute PRESS, you may be able to use the models from leaps with the function from DAAG to get what you want there.

However, be careful how you use these tools and the results.  Taking a "best" model from here and using it as if it was the original model that you fit will result in confidence intervals that are too narrow and p-values that are too small.

--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at imail.org
801.408.8111


> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of 1072
> Sent: Saturday, October 18, 2008 12:07 PM
> To: r-help at r-project.org
> Subject: [R] variable selection for multiple regression model
>
>
>
> Does anyone know how can I run all subsets regression model and get
> adjusted
> R square, Cp, and PRESSp for each model?
>
> --
> View this message in context: http://www.nabble.com/variable-selection-
> for-multiple-regression-model-tp20049313p20049313.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> 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.



More information about the R-help mailing list