[R-sig-ME] different AIC value from anova() and AIC() for lm
Jude Phillips
jude.phillips at gmail.com
Sun Dec 19 18:26:17 CET 2010
Hi,
I'm trying to compare models with same fixed effects but different
random effects, but I've noticed that for lm models, I get a different
AIC value when I compare models with anova, compared to when I just
use the AIC command to calculate AIC. I've put an example below using
the Orthodont data. I'm worried about his because an editor has asked
me to use AICc rather than AIC to compare models. My plan was to use
the AICc command in the AICcmodavg package, to calculate AICc for each
model and compare them manually, but now I'm not sure this will work.
I'd appreciate any thoughts on this!
Thanks, Jude Girard
PhD candidate
GLEL, Carleton University.
>fm2Orth.lme <- lme(fixed = distance~Sex*I(age-11), random=~I(age-11)|Subject, data=Orthodont)
>fm4Orth.lm <- lm( distance ~ Sex * I(age-11), Orthodont )
>anova( fm2Orth.lme, fm4Orth.lm )
Model df AIC BIC logLik Test L.Ratio p-value
fm2Orth.lme 1 8 448.5817 469.7368 -216.2908
fm4Orth.lm 2 5 493.5591 506.7811 -241.7796 1 vs 2 50.97746 <.0001
> AIC(fm2Orth.lme, fm4Orth.lm)
df AIC
fm2Orth.lme 8 448.5817
fm4Orth.lm 5 488.2418
More information about the R-sig-mixed-models
mailing list