# NOT RUN {
#import lmerTest package
library(lmerTest)
m.ham <- lmer(Informed.liking ~ Product*Information*Gender
+ (1|Consumer), data = ham)
# type 3 anova table with denominator degrees of freedom
# calculated based on Satterthwaite's approximation
anova(m.ham)
# type 1 anova table with denominator degrees of freedom
# calculated based on Satterthwaite's approximation
# }
# NOT RUN {
anova(m.ham, type = 1)
# }
# NOT RUN {
# type3 anova table with additional F statistics and denominator degrees of freedom
# calculated based on Kenward-Roger's approximation
if(require(pbkrtest))
anova(m.ham, ddf = "Kenward-Roger")
# }
# NOT RUN {
# anova table, that is returned by lme4 package
anova(m.ham, ddf = "lme4")
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab