APAStyler.modelTest.merMod {multilevelTools} | R Documentation |
Format results from a linear mixed model
Description
Format results from a linear mixed model
Usage
## S3 method for class 'modelTest.merMod'
APAStyler(
object,
format = list(FixedEffects = c("%s%s [%s, %s]"), RandomEffects = c("%s",
"%s [%s, %s]"), EffectSizes = c("%s/%s, %s")),
digits = 2,
pcontrol = list(digits = 3, stars = TRUE, includeP = FALSE, includeSign = FALSE,
dropLeadingZero = TRUE),
...
)
Arguments
object |
A list of one (or more) models estimated from lmer |
format |
A list giving the formatting style to be used for the fixed effecvts, random effects, and effect sizes. For the random effects, must be two options, one for when the random effects do not have confidence intervals and one when the random effects do have confidence intervals. |
digits |
A numeric value indicating the number of digits to print. This is still in early implementation stages and currently does not change all parts of the output (which default to 2 decimals per APA style). |
pcontrol |
A list controlling how p values are formatted. |
... |
Additional arguments passed to |
Value
a data table of character data
Examples
library(JWileymisc)
data(sleepstudy, package = "lme4")
m1 <- lme4::lmer(Reaction ~ Days + (1 + Days | Subject),
data = sleepstudy)
m2 <- lme4::lmer(Reaction ~ Days + I(Days^2) + (1 + Days | Subject),
data = sleepstudy)
testm1 <- modelTest(m1)
testm2 <- modelTest(m2)
APAStyler(testm1)
APAStyler(list(Linear = testm1, Quadratic = testm2))
APAStyler(testm1,
format = list(
FixedEffects = "%s, %s (%s, %s)",
RandomEffects = c("%s", "%s (%s, %s)"),
EffectSizes = "%s, %s; %s"),
pcontrol = list(digits = 3, stars = FALSE,
includeP = TRUE, includeSign = TRUE,
dropLeadingZero = TRUE))
testm1 <- modelTest(m1, method = "profile")
testm2 <- modelTest(m2, method = "profile")
APAStyler(testm1)
APAStyler(list(Linear = testm1, Quadratic = testm2))
APAStyler(testm1,
format = list(
FixedEffects = "%s, %s (%s, %s)",
RandomEffects = c("%s", "%s (%s, %s)"),
EffectSizes = "%s, %s; %s"),
pcontrol = list(digits = 3, stars = FALSE,
includeP = TRUE, includeSign = TRUE,
dropLeadingZero = TRUE))
rm(m1, m2, testm1, testm2)
[Package multilevelTools version 0.1.1 Index]