APAStyler.modelTest.merMod | R Documentation |
Format results from a linear mixed model
## 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),
...
)
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 |
a data table of character data
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.