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