tidy_stats.lmerMod: Create a tidy stats data frame from an lmerMod object

Description Usage Arguments Examples

View source: R/tidy_stats.lmerMod.r

Description

tidy_stats.lmerMod takes an lmerMod object and converts the object to a tidy stats data frame.

Usage

1
2
## S3 method for class 'lmerMod'
tidy_stats(model, args = NULL)

Arguments

model

Output of lme4's lmer().

args

Unused.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# Check if lme4 package is available
if(!requireNamespace("lme4", quietly = TRUE)) {

  message(paste0("Package 'lme4' is needed for this example to work. ",
              "Please install it."), .call = FALSE) 
} else {

  # Conduct a linear mixed model
  model_lmer <- lme4::lmer(Reaction ~ Days + (Days | Subject), lme4::sleepstudy)

  # Tidy stats
  tidy_stats(model_lmer)
}

WillemSleegers/tidystats-v0.3 documentation built on Aug. 12, 2019, 5:31 p.m.