Regarding the fact the the extractAIC help page doesn't mention models
with random effects, it can't list all the possible methods because
any package can add methods to a generic function.
On 12/18/07, Peter H Singleton <psingleton at fs.fed.us> wrote:
I am running a series of candidate mixed models using lmer (package lme4)
and I'd like to be able to compile a list of the AIC scores for those
models so that I can quickly summarize and rank the models by AIC. When I
do logistic regression, I can easily generate this kind of list by
creating
the model objects using glm, and doing:
md <- c("md1.lr", "md2.lr", "md3.lr")
aic <- c(md1.lr$aic, md2.lr$aic, md3.lr$aic)
aic2 <- cbind(md, aic)
but when I try to extract the AIC score from the model object produced by
lmer I get:
NULL
Warning message:
In md1.lme$aic : $ operator not defined for this S4 class, returning NULL
So... How do I query the AIC value out of a mixed model object created by
lmer?