Extractor Functions
From ?lme4 examples:
(fm1 <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy))
(fm2 <- lmer(Reaction ~ Days + (1|Subject) + (0+Days|Subject),
sleepstudy))
anova(fm1, fm2)
However
> deviance(fm1)
[1] 1743.628
> deviance(fm2)
[1] 1743.669
> deviance(fm2) - deviance(fm1)
[1] 0.04102155
values not in agreement with the output from the example code.
[ R2.12.1 on Vista Home Basic ]
Murray
Dr Murray Jorgensen http://www.stats.waikato.ac.nz/Staff/maj.html Department of Statistics, University of Waikato, Hamilton, New Zealand Email: maj at waikato.ac.nz majorgensen at ihug.co.nz Fax 7 838 4155 Phone +64 7 838 4773 wk Home +64 7 825 0441 Mobile 021 0200 8350