Summaries of Linear Mixed Models with coefficient tables including t-tests and p-values using Satterthwaites's or Kenward-Roger's methods for degrees-of-freedom and t-statistics.

# S3 method for class 'lmerModLmerTest'
summary(object, ..., ddf = c("Satterthwaite", "Kenward-Roger", "lme4"))

Arguments

object

an lmerModLmerTest object.

...

additional arguments passed on to lme4::summary.merMod

ddf

the method for computing the degrees of freedom and t-statistics. ddf="Satterthwaite" (default) uses Satterthwaite's method; ddf="Kenward-Roger" uses Kenward-Roger's method, ddf = "lme4" returns the lme4-summary i.e., using the summary method for lmerMod objects as defined in the lme4-package and ignores the type argument. Partial matching is allowed.

Value

A summary object with a coefficient table (a matrix) including t-values and p-values. The coefficient table can be extracted with coef(summary(<my-model>)).

Details

The returned object is of class c("summary.lmerModLmerTest", "summary.merMod") utilizing print, coef and other methods defined for summary.merMod objects. The "Kenward-Roger" method use methods from the pbkrtest package internally to compute t-statistics and associated degrees-of-freedom.

See also

contest1D for one degree-of-freedom contrast tests and KRmodcomp for Kenward-Roger F-tests.

Author

Rune Haubo B. Christensen and Alexandra Kuznetsova

Examples


# 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
#> Linear mixed model fit by REML. t-tests use Satterthwaite's method [
#> lmerModLmerTest]
#> Formula: Reaction ~ Days + (1 | Subject) + (0 + Days | Subject)
#>    Data: sleepstudy
#> 
#> REML criterion at convergence: 1743.7
#> 
#> Scaled residuals: 
#>     Min      1Q  Median      3Q     Max 
#> -3.9626 -0.4625  0.0204  0.4653  5.1860 
#> 
#> Random effects:
#>  Groups    Name        Variance Std.Dev.
#>  Subject   (Intercept) 627.57   25.051  
#>  Subject.1 Days         35.86    5.988  
#>  Residual              653.58   25.565  
#> Number of obs: 180, groups:  Subject, 18
#> 
#> Fixed effects:
#>             Estimate Std. Error      df t value Pr(>|t|)    
#> (Intercept)  251.405      6.885  18.156  36.513  < 2e-16 ***
#> Days          10.467      1.560  18.156   6.712 2.59e-06 ***
#> ---
#> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#> 
#> Correlation of Fixed Effects:
#>      (Intr)
#> Days -0.184

# Extract coefficient table:
coef(summary(fm))
#>              Estimate Std. Error       df   t value     Pr(>|t|)
#> (Intercept) 251.40510   6.885381 18.15620 36.512883 1.893381e-18
#> Days         10.46729   1.559569 18.15609  6.711653 2.594097e-06

# Use the Kenward-Roger method
if(requireNamespace("pbkrtest", quietly = TRUE))
  summary(fm, ddf="Kenward-Roger")
#> Linear mixed model fit by REML. t-tests use Kenward-Roger's method [
#> lmerModLmerTest]
#> Formula: Reaction ~ Days + (1 | Subject) + (0 + Days | Subject)
#>    Data: sleepstudy
#> 
#> REML criterion at convergence: 1743.7
#> 
#> Scaled residuals: 
#>     Min      1Q  Median      3Q     Max 
#> -3.9626 -0.4625  0.0204  0.4653  5.1860 
#> 
#> Random effects:
#>  Groups    Name        Variance Std.Dev.
#>  Subject   (Intercept) 627.57   25.051  
#>  Subject.1 Days         35.86    5.988  
#>  Residual              653.58   25.565  
#> Number of obs: 180, groups:  Subject, 18
#> 
#> Fixed effects:
#>             Estimate Std. Error      df t value Pr(>|t|)    
#> (Intercept)  251.405      6.885  18.187  36.513  < 2e-16 ***
#> Days          10.467      1.560  18.187   6.712 2.57e-06 ***
#> ---
#> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#> 
#> Correlation of Fixed Effects:
#>      (Intr)
#> Days -0.184

# The lme4-summary table:
summary(fm, ddf="lme4") # same as summary(as(fm, "lmerMod"))
#> Linear mixed model fit by REML ['lmerMod']
#> Formula: Reaction ~ Days + (1 | Subject) + (0 + Days | Subject)
#>    Data: sleepstudy
#> 
#> REML criterion at convergence: 1743.7
#> 
#> Scaled residuals: 
#>     Min      1Q  Median      3Q     Max 
#> -3.9626 -0.4625  0.0204  0.4653  5.1860 
#> 
#> Random effects:
#>  Groups    Name        Variance Std.Dev.
#>  Subject   (Intercept) 627.57   25.051  
#>  Subject.1 Days         35.86    5.988  
#>  Residual              653.58   25.565  
#> Number of obs: 180, groups:  Subject, 18
#> 
#> Fixed effects:
#>             Estimate Std. Error t value
#> (Intercept)  251.405      6.885  36.513
#> Days          10.467      1.560   6.712
#> 
#> Correlation of Fixed Effects:
#>      (Intr)
#> Days -0.184