anova_apa: Report ANOVA in APA style

View source: R/anova_apa.R

anova_apaR Documentation

Report ANOVA in APA style

Description

Report ANOVA in APA style

Usage

anova_apa(
  x,
  effect = NULL,
  sph_corr = c("greenhouse-geisser", "gg", "huynh-feldt", "hf", "none"),
  force_sph_corr = FALSE,
  es = c("petasq", "pes", "getasq", "ges"),
  format = c("text", "markdown", "rmarkdown", "html", "latex", "latex_math", "docx",
    "plotmath"),
  info = FALSE,
  print = TRUE
)

Arguments

x

A call to aov, ez::ezANOVA, or afex::afex_ez, afex::afex_car or afex::afex_4

effect

Character string indicating the name of the effect to display. If is NULL, all effects are reported (default).

sph_corr

Character string indicating the method used for correction if the assumption of sphericity is violated (only applies to repeated-measures and mixed design ANOVA). Can be one of "greenhouse-geisser" (default), "huynh-feldt" or "none" (you may also use the abbreviations "gg" or "hf").

force_sph_corr

Logical indicating if sphericity correction should be applied to all within factors regardless of what the result of Mauchly's test of sphericity is (default is FALSE).

es

Character string indicating the effect size to display in the output, one of "petasq" (partial eta squared) or "getasq" (generalized eta squared) (you may also use the abbreviations "pes" or "ges").

format

Character string specifying the output format. One of "text", "markdown", "rmarkdown", html, "latex", "latex_math", "docx" or "plotmath".

info

Logical indicating whether to print a message on the used test (default is FALSE)

print

Logical indicating whether to print the formatted output via cat (TRUE, default) or return as a data frame.

Examples

# Using the ez package
library(ez)
data(ANT)

x <- ezANOVA(ANT[ANT$error==0,], dv = rt, wid = subnum,
             within = c(cue, flank), between = group, detailed = TRUE)
anova_apa(x)

# Using the afex package
library(afex)
data(md_12.1)

y <- aov_ez(id = "id", dv = "rt", data = md_12.1,
            within = c("angle", "noise"))
anova_apa(y)


dgromer/apa documentation built on Oct. 14, 2023, 7:45 p.m.