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))
# \donttest{
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)
Run the code above in your browser using DataLab