[R-sig-ME] Testing if a variance component is zero?
Spencer Graves
spencer.graves at pdf.com
Wed Dec 10 23:49:34 CET 2008
Hello All:
'anova' in 'lme4' to test a difference a zero variance component
uses 'ML', at least in the following example:
library(MEMSS)
fm1 <- lmer( score ~ Machine+(1|Worker), data = Machines )
fm2 <- lmer( score ~ Machine+(1|Worker/Machine), data = Machines )
anova( fm1, fm2 )
fm1: score ~ Machine + (1 | Worker)
fm2: score ~ Machine + (1 | Worker/Machine)
Df AIC BIC logLik Chisq Chi Df Pr(>Chisq)
fm1 5 303.75 313.70 -146.88
fm2 6 237.47 249.40 -112.73 68.289 1 < 2.2e-16 ***
fm1m <- lmer( score ~ Machine+(1|Worker), data = Machines, REML=FALSE )
logLik(fm1m)
'log Lik.' -146.8516 (df=5)
This surprised me, because I would have expected REML to be used
in this case, at least according to my reading of Pinheiro and Bates
(2000, Figure 2.4), which got very good agreement between simulation
results and cutting in half the nominal REML-based p-values.
Has more recent work suggested that Pinheiro and Bates (2000,
Figure 2.4) is too specialized to worry about -- and this kind of
'anova' has largely been obsoleted by "mcmcsamp"?
Thanks,
Spencer Graves
sessionInfo()
R version 2.8.0 (2008-10-20)
i386-pc-mingw32
locale:
LC_COLLATE=English_United States.1252;LC_CTYPE=English_United
States.1252;LC_MONETARY=English_United
States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] MEMSS_0.3-4 lme4_0.999375-27 Matrix_0.999375-16
lattice_0.17-17
loaded via a namespace (and not attached):
[1] grid_2.8.0
More information about the R-sig-mixed-models
mailing list