summary.lmerModLmerTest: Summary Method for Linear Mixed Models

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/lmer_summary.R

Description

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.

Usage

1
2
## 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.

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.

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>)).

Author(s)

Rune Haubo B. Christensen and Alexandra Kuznetsova

See Also

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# 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"))

lmerTest documentation built on Oct. 23, 2020, 6:16 p.m.