# NOT RUN {
# Fit example model:
data("sleepstudy", package="lme4")
fm <- lmer(Reaction ~ Days + (1|Subject) + (0+Days|Subject), sleepstudy)
# Get model summary:
summary(fm) # Satterthwaite df and t-tests
# Extract coefficient table:
coef(summary(fm))
# Use the Kenward-Roger method
if(requireNamespace("pbkrtest", quietly = TRUE))
summary(fm, ddf="Kenward-Roger")
# The lme4-summary table:
summary(fm, ddf="lme4") # same as summary(as(fm, "lmerMod"))
# }
Run the code above in your browser using DataLab