Dear all, Does R or S-plus or any of their packages provide any command to form any of the following procedures to find Best Regression Equation - 1. 'All Possible Regressions Procedures' (is there any automated command to perform 2^p regressions and ordering according to criteria R2(adj), mallows Cp, s2- by not setting all the regression models manually), 2. 'Backward Elimination Procedure' , 3. 'Forward Selection Procedure' , 4. 'Stepwise Regression Procedure' (as SAS's PROC REG /METHOD = STEPWISE / FORWARD / BACKWARD which methods are also available in SPSS) or 5. 'Best subset selection (as MINITAB's BREG - BEST k command)'. Any response / help / comment / suggestion / idea / web-link / replies will be greatly appreciated. Thanks in advance for your time. _______________________ Mohammad Ehsanul Karim <wildscop at yahoo.com> Institute of Statistical Research and Training University of Dhaka, Dhaka- 1000, Bangladesh
See the package `leap' on CRAN, and ?stepAIC in the package `MASS' (as well as MASS the book). Andy> From: WilDscOp > > Dear all, > > Does R or S-plus or any of their packages provide any > command to form any > of the following procedures to find Best Regression Equation - > > 1. 'All Possible Regressions Procedures' (is there any > automated command > to perform 2^p regressions and ordering according to criteria > R2(adj), > mallows Cp, s2- by not setting all the regression models manually), > > 2. 'Backward Elimination Procedure' , > > 3. 'Forward Selection Procedure' , > > 4. 'Stepwise Regression Procedure' (as SAS's PROC REG > /METHOD = STEPWISE / > FORWARD / BACKWARD which methods are also available in SPSS) or > > 5. 'Best subset selection (as MINITAB's BREG - BEST k command)'. > > > Any response / help / comment / suggestion / idea / web-link > / replies will > be greatly appreciated. > > Thanks in advance for your time. > > _______________________ > > Mohammad Ehsanul Karim <wildscop at yahoo.com> > Institute of Statistical Research and Training > University of Dhaka, Dhaka- 1000, Bangladesh > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html > >------------------------------------------------------------------------------ Notice: This e-mail message, together with any attachments,...{{dropped}}
On Mon, 5 Apr 2004, WilDscOp wrote:> Dear all, > > Does R or S-plus or any of their packages provide any command to form any > of the following procedures to find Best Regression Equation - > > 1. 'All Possible Regressions Procedures' (is there any automated command > to perform 2^p regressions and ordering according to criteria R2(adj), > mallows Cp, s2- by not setting all the regression models manually), > > 2. 'Backward Elimination Procedure' , > > 3. 'Forward Selection Procedure' , > > 4. 'Stepwise Regression Procedure' (as SAS's PROC REG /METHOD = STEPWISE / > FORWARD / BACKWARD which methods are also available in SPSS) or > > 5. 'Best subset selection (as MINITAB's BREG - BEST k command)'. >4 is available in step() and the MASS package's stepAIC(). 2,3,5 are in the leaps package (as is 1 if you really want it, by setting the number of models large enough). It's a lot easier to find the functions than to find good reasons for wanting them. -thomas
library(leaps) is imho a starting point. christian Am Montag, 5. April 2004 16:02 schrieb WilDscOp:> Dear all, > > Does R or S-plus or any of their packages provide any command to form any > of the following procedures to find Best Regression Equation - > > 1. 'All Possible Regressions Procedures' (is there any automated command > to perform 2^p regressions and ordering according to criteria R2(adj), > mallows Cp, s2- by not setting all the regression models manually), > > 2. 'Backward Elimination Procedure' , > > 3. 'Forward Selection Procedure' , > > 4. 'Stepwise Regression Procedure' (as SAS's PROC REG /METHOD = STEPWISE / > FORWARD / BACKWARD which methods are also available in SPSS) or > > 5. 'Best subset selection (as MINITAB's BREG - BEST k command)'. > > > Any response / help / comment / suggestion / idea / web-link / replies will > be greatly appreciated. > > Thanks in advance for your time. > > _______________________ > > Mohammad Ehsanul Karim <wildscop at yahoo.com> > Institute of Statistical Research and Training > University of Dhaka, Dhaka- 1000, Bangladesh > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html