# NOT RUN {
(m <- lmer(Reaction ~ Days + (1|Subject) + (0+Days|Subject),
data = sleepstudy))
## type 3 anova table with denominator degrees of freedom
## calculated based on Satterthwaite's approximation
anova(m)
## type 1 anova table with denominator degrees of freedom
## calculated based on Satterthwaite's approximation
# }
# NOT RUN {
anova(m, type=1)
# }
# NOT RUN {
## type3 anova table with additional F statistics and denominator degrees of freedom
## calculated based on Kenward-Roger's approximation
# }
# NOT RUN {
if(requireNamespace("pbkrtest", quietly = TRUE))
anova(m, ddf="Kenward-Roger")
# }
# NOT RUN {
## anova table, that is returned by lme4 package
anova(m, ddf="lme4")
## summary of merModLmerTest object. Returns the same as merMod object but with an
## additional column of p values for the t test.
summary(m)
# }
Run the code above in your browser using DataLab