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

Description Usage Arguments Examples

View source: R/tidy_stats.lmerModLmerTest.r

Description

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

Usage

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

Arguments

model

Output of lmerTest's lmer().

args

Unused.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# Check if lme4 and lmerTest packages are available
if(!requireNamespace("lme4", quietly = TRUE) &
   !requireNamespace("lmerTest", quietly = TRUE)) {

  message(paste0("Packages 'lme4' and 'lme4Test are needed for this ",
                 "example to work. Please install them."), .call = FALSE)
} else {

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

  # Tidy stats
  tidy_stats(model_lmerTest)
}

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