[R] AIC model selection

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Aug 9 08:27:56 CEST 2005


First, AIC is `An Information Criterion' according to Akaike.

Second, help.search("AIC") turns up

stepAIC(MASS)           Choose a model by AIC in a Stepwise Algorithm
multinom(nnet)          Fit Multinomial Log-linear Models
mosaicplot(graphics)    Mosaic Plots
AIC(stats)              Akaike's An Information Criterion
extractAIC(stats)       Extract AIC from a Fitted Model
step(stats)             Choose a model by AIC in a Stepwise Algorithm
AIC-methods(stats4)     Methods for Function 'AIC' in Package 'stats4'
frailty(survival)       (Approximate) Frailty models

Did you not notice that two of those are answers to your question?


On Mon, 8 Aug 2005, Martin Kardos wrote:

> Hello All;
>
> I need to run a multiple regression analysis and use Akaike's Information
> Criterion for model selection.  I understand that this command will give the
> AIC value for specified models:
>
> AIC(object, ..., k = 2)
>
> with "..." meaning any other optional models for which I would like AIC
> values.  But, how can I specify (in the place of "...") that I want R to
> perform an model selection prodecure based on Akaike's Information Criterion
> on a set of potential independent variables in a model such as:
>
> model.lm=lm(A~B+C+D+E+F+G)
>
> ?
>
> Thanks a million;
>
> Marty
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list