[R-sig-ME] Do I need random effects?
Murray Jorgensen
maj at waikato.ac.nz
Fri Feb 25 23:36:26 CET 2011
Thanks, David.
One or two glitches remain:
> anova(m1, m0)
Data: Pastes
Models:
m1: strength ~ (1 | batch)
m0: strength ~ (1 | dummy)
Df AIC BIC logLik Chisq Chi Df Pr(>Chisq)
m1 3 308.60 314.88 -151.30
m0 3 316.26 322.55 -155.13 0 0 1
> anova(m0,m1)
Data: Pastes
Models:
m0: strength ~ (1 | dummy)
m1: strength ~ (1 | batch)
Df AIC BIC logLik Chisq Chi Df Pr(>Chisq)
m0 3 316.26 322.55 -155.13
m1 3 308.60 314.88 -151.30 7.6651 0 < 2.2e-16 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
The df's are not what we want them to be - and I am rather surprised to
find a p-value. :-)
Murray
On 25/02/2011 5:35 p.m., David Duffy wrote:
> dummy <- rep(1,nrow(Pastes))
> m1 <- lmer(strength ~ (1|batch), Pastes, REML=F)
> m0 <- lmer(strength ~ (1|dummy), Pastes, REML=F)
> anova(m1, m0)
--
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
More information about the R-sig-mixed-models
mailing list