(fm1 <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy))
(fm0 <- lmer(Reaction ~ 1 + (Days|Subject), sleepstudy))
anova(fm1, fm0)
KRmodcomp(fm1, fm0) ## 17 denominator df's
get_Lb_ddf(fm1, c(0, 1)) ## 17 denominator df's
# Notice: The restriction matrix L corresponding to the test above
# can be found with
L <- model2restriction_matrix(fm1, fm0)
L
Run the code above in your browser using DataLab