Look at the leaps function in the leaps package. It will compute the Cp statistic which is a function of AIC.
On Thu, Aug 9, 2012 at 7:28 AM, zel7223 <jmichel.for...@hotmail.fr> wrote: > Hi, > > I want to use four independent variables to predict the output of one > dependent variable using a linear model lm. I want to compare all possible > combinations of the 4 independent variables, including singles, pairs and > triples. > > I was thinking of using the AIC test to compare all models and pick the best > one. > > The model looks like this : > > lm(Y ~ X1 + X2 + X3 + X4) > > Thanks for your help > > Cheers > > Jean-Michel Fortin > UOttawa > > > > -- > View this message in context: > http://r.789695.n4.nabble.com/All-combinations-possible-in-a-mutliple-regression-tp4639762.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help@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. -- Gregory (Greg) L. Snow Ph.D. 538...@gmail.com ______________________________________________ R-help@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.