APAStyler.modelTest.vglm {JWileymisc} | R Documentation |
APAStyler method for model tests from a vglm multinomial model
Description
APAStyler method for model tests from a vglm multinomial model
Usage
## S3 method for class 'modelTest.vglm'
APAStyler(
object,
format = list(FixedEffects = c("%s%s [%s, %s]"), EffectSizes =
c("Chi-square (df=%s) = %s, %s")),
digits = 2,
pcontrol = list(digits = 3, stars = TRUE, includeP = FALSE, includeSign = FALSE,
dropLeadingZero = TRUE),
OR = TRUE,
...
)
Arguments
object |
A |
format |
A list giving the formatting style to be used for the fixed effects and effect sizes. |
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. |
OR |
a logical value whether to report odds ratios and
95 percent confidence intervals, if |
... |
Additional arguments. |
Value
Styled results.
Examples
mtcars$cyl <- factor(mtcars$cyl)
m <- VGAM::vglm(cyl ~ qsec,
family = VGAM::multinomial(), data = mtcars)
mt <- modelTest(m)
APAStyler(mt)
APAStyler(mt, OR = FALSE)
## clean up
rm(m, mt, mtcars)
## Not run:
mtcars$cyl <- factor(mtcars$cyl)
mtcars$am <- factor(mtcars$am)
m <- VGAM::vglm(cyl ~ qsec,
family = VGAM::multinomial(), data = mtcars)
APAStyler(modelTest(m))
m <- VGAM::vglm(cyl ~ scale(qsec),
family = VGAM::multinomial(), data = mtcars)
APAStyler(modelTest(m))
m2 <- VGAM::vglm(cyl ~ factor(vs) * scale(qsec),
family = VGAM::multinomial(), data = mtcars)
APAStyler(modelTest(m2))
m <- VGAM::vglm(Species ~ Sepal.Length,
family = VGAM::multinomial(), data = iris)
APAStyler(modelTest(m))
set.seed(1234)
sampdata <- data.frame(
Outcome = factor(sample(letters[1:3], 20 * 9, TRUE)),
C1 = rnorm(20 * 9),
D3 = sample(paste0("L", 1:3), 20 * 9, TRUE))
m <- VGAM::vglm(Outcome ~ factor(D3),
family = VGAM::multinomial(), data = sampdata)
APAStyler(modelTest(m))
m <- VGAM::vglm(Outcome ~ factor(D3) + C1,
family = VGAM::multinomial(), data = sampdata)
APAStyler(modelTest(m))
## End(Not run)
[Package JWileymisc version 1.4.1 Index]