The following example from the JSS paper on pkbrtest shows an LRT meant to test for the effect of the whole-plot treatment (harvest):
library("lme4")
data("beets", package = "pbkrtest")
sug <- lmer(sugpct ~ block + sow + harvest + (1 | block:harvest),
data = beets, REML = FALSE)
sug_no.harv <- update(sug, . ~ . - harvest)
sug_no.sow <- update(sug, . ~ . - sow)
anova(sug, sug_no.harv)
At the end of Section 3.2, the authors write that, in addition to inadequacies stemming from the finite sample approximation, "the test for no effect of harvesting time is misleading because the hierarchical structure of the data has not been appropriately accounted for."
Really? But the two error terms are in there!
In this balanced data situation, a another analysis is:
beets$bh <- with(beets, interaction(block, harvest))
summary(aov(sugpct ~ block + sow + harvest + Error(bh), data = beets))
Which they claim accounts for the hierarchical structure. The p-value in the second situation is much larger, which they attribute to this.
How can the likelihood ratio test be a truly general tool if it can't test hypotheses in the presence of multiple error terms? Aside from poor finite sample size properties, is the LRT shown above logically okay?
anova(sug, ddf='Kenward-Roger')
afterlibrary('lmerTest')
, then you will get exactly the same p-value as in RM-ANOVA.anova(sug, ddf='Satterthwaite')
gives much lower p-value, close to the one fromanova(sug, sug_no.harv)
. $\endgroup$REML=TRUE
and using this in thelmer()
call makesanova(sug, ddf="Ken")
,anova(sug, ddf="Sat")
and theaov
call all agree exactly. $\endgroup$