[R] minimum AIC mixed model selection

Ben Bolker bbolker at gmail.com
Fri Nov 12 17:11:04 CET 2010

SILVIA DIAZ FERNANDEZ <Silvia.Diaz <at> uclm.es> writes:

> Hi!
> I am trying to know which habitat variables most affect 
> bird counts in a radius of 100m. I obtained bird
> counts in 2751 spatial points, and measured percentage of 
> 21 habitat variables in these points.
> I applied a mixed model using the "lmer" function to these data, 
> but I do not know how to select the best model
> using AIC here. Is there a way to do this automatically with R?

  See the MuMIn package, and the "dredge" function.



 **however**: if you have 21 habitat variables and want
to consider all subsets of main effects only, you will have
something like 2^21 approx. 2 million models to consider.
Probably a bad idea.  I would strongly recommend that you
consider some sort of dimension reduction (e.g. take the
first few PCAs of the habitat predictors) first.

More information about the R-help mailing list