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

View source: R/styler.R

APAStyler.modelTest.lmR Documentation

APAStyler method for model tests from a linear model

Description

APAStyler method for model tests from a linear model

Usage

## S3 method for class '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),
  ...
)

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.

Value

Styled results.

Examples

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)

JWiley/JWileymisc documentation built on Feb. 15, 2024, 12:23 p.m.