Learn R Programming

JWileymisc (version 1.4.1)

APAStyler.modelTest.lm: APAStyler method for model tests from a linear model

Description

APAStyler method for model tests from a linear model

Usage

# S3 method for modelTest.lm
APAStyler(
  object,
  format = list(FixedEffects = c("%s%s [%s, %s]"), EffectSizes = c("f2 = %s, %s")),
  digits = 2,
  pcontrol = list(digits = 3, stars = TRUE, includeP = FALSE, includeSign = FALSE,
    dropLeadingZero = TRUE),
  ...
)

Value

Styled results.

Arguments

object

A modelTest.lm class object, results from running modelTest() function on a class lm object.

format

A list giving the formatting style to be used for the fixed effecvts 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.

...

Additional arguments.

Examples

Run this code
m1 <- lm(mpg ~ qsec * hp, data = mtcars)
APAStyler(modelTest(m1))

APAStyler(modelTest(m1),
format = list(
  FixedEffects = "%s, %s\n(%s, %s)",
  EffectSizes = "Cohen's f2 = %s (%s)"),
pcontrol = list(digits = 4,
  stars = FALSE, includeP = TRUE,
  includeSign = TRUE,
  dropLeadingZero = TRUE))

## clean up
rm(m1)

Run the code above in your browser using DataLab