[R-sig-eco] model selection AIC
Dave Hewitt
dhewitt37 at gmail.com
Tue Oct 14 17:50:34 CEST 2008
> I am a relatively new user of R, and I am trying to select a model via
> all-subsets regression.
>
> I am curious about the 'leaps' and 'regsubsets' functions in the 'leaps'
> package...
>
> Is there a way to use AIC as the 'method' in these functions, rather
> than Cp, Rsquared, or adjusted Rsquared?
>
> I know you can run AIC on the models that leaps or regsubsets pick after
> the fact, but can you actually make AIC the criterion?
>
Hey Paul,
I think the first step with this would be to read Chapter 5, section 5.3 in
Burnham and Anderson (2002; Model Selection and Multimodel Inference).
Although I hesitate to recommend it (because of what is in B&A Ch. 5), what
you seem to be looking for is the step() function in the base stats package.
--
View this message in context: http://n2.nabble.com/model-selection-AIC-tp1330518p1333126.html
Sent from the r-sig-ecology mailing list archive at Nabble.com.
More information about the R-sig-ecology
mailing list