View source: R/apa_print_anova.R
apa_print.aov | R Documentation |
These methods take objects from various R functions that calculate analysis
of variance (i.e., ANOVA) or analysis of deviance. They create formatted
character strings to report the results in accordance with APA manuscript
guidelines. For anova
-objects from model comparisons see
apa_print.list()
.
## S3 method for class 'aov'
apa_print(
x,
estimate = getOption("papaja.estimate_anova", "ges"),
observed = NULL,
intercept = FALSE,
mse = getOption("papaja.mse", TRUE),
in_paren = FALSE,
...
)
## S3 method for class 'summary.aov'
apa_print(
x,
estimate = getOption("papaja.estimate_anova", "ges"),
observed = NULL,
intercept = FALSE,
mse = getOption("papaja.mse", TRUE),
in_paren = FALSE,
...
)
## S3 method for class 'aovlist'
apa_print(
x,
estimate = getOption("papaja.estimate_anova", "ges"),
observed = NULL,
intercept = FALSE,
mse = getOption("papaja.mse", TRUE),
in_paren = FALSE,
...
)
## S3 method for class 'summary.aovlist'
apa_print(
x,
estimate = getOption("papaja.estimate_anova", "ges"),
observed = NULL,
intercept = FALSE,
mse = getOption("papaja.mse", TRUE),
in_paren = FALSE,
...
)
## S3 method for class 'Anova.mlm'
apa_print(
x,
estimate = getOption("papaja.estimate_anova", "ges"),
observed = NULL,
correction = getOption("papaja.sphericity_correction"),
intercept = FALSE,
mse = getOption("papaja.mse", TRUE),
in_paren = FALSE,
...
)
## S3 method for class 'summary.Anova.mlm'
apa_print(
x,
estimate = getOption("papaja.estimate_anova", "ges"),
observed = NULL,
correction = getOption("papaja.sphericity_correction"),
intercept = FALSE,
mse = getOption("papaja.mse", TRUE),
in_paren = FALSE,
...
)
## S3 method for class 'afex_aov'
apa_print(
x,
estimate = getOption("papaja.estimate_anova", "ges"),
observed = NULL,
correction = getOption("papaja.sphericity_correction"),
intercept = FALSE,
mse = getOption("papaja.mse", TRUE),
in_paren = FALSE,
...
)
## S3 method for class 'anova'
apa_print(
x,
estimate = getOption("papaja.estimate_anova", "ges"),
observed = NULL,
intercept = FALSE,
mse = getOption("papaja.mse", TRUE),
in_paren = FALSE,
...
)
## S3 method for class 'manova'
apa_print(x, test = "Pillai", in_paren = FALSE, ...)
## S3 method for class 'summary.manova'
apa_print(x, in_paren = FALSE, ...)
x |
An object containing the results from an analysis of variance ANOVA |
estimate |
Character, function, or data frame. Determines which estimate of effect size is to be used. See details. |
observed |
Character. The names of the factors that are observed,
i.e., not manipulated. Necessary only for calculating generalized eta
squared; otherwise ignored. If |
intercept |
Logical. Indicates if the intercept term should be included in output. |
mse |
Logical. Indicates if mean squared errors should be included in
output. The default is taken from the global option |
in_paren |
Logical. Whether the formatted string is to be reported in
parentheses. If |
... |
Further arguments that may be passed to |
correction |
Character. For repeated-measures ANOVA, the type of
sphericity correction to be used. Possible values are |
test |
Character. For MANOVA, the multivariate test statistic to be
reported, see |
The factor names are sanitized to facilitate their use as list names (see
Value section). Parentheses are omitted and other non-word characters are
replaced by _
.
Argument estimate
determines which measure of effect size is to be used:
It is currently possible to provide one of three characters to specify the
to-be-calculated effect size: "ges"
for generalized \eta^2
,
"pes"
for partial \eta^2
, and "es"
for \eta^2
.
Note that \eta^2
is calculated correctly if and only if the design is
balanced.
It is also possible to provide a data.frame
with columns estimate
,
conf.low
, and conf.high
, which allows for including custom effect-
size measures.
A third option is to provide a function from the effectsize package
that will be used to calculate effect-size measures from x
. If
effectsize is installed (and papaja is loaded), this is the
new default. This default can be changed via
options(papaja.estimate_anova = ...)
.
apa_print()
-methods return a named list of class apa_results
containing the following elements:
estimate |
One or more character strings giving point estimates, confidence intervals, and confidence level. A single string is returned in a vector; multiple strings are returned as a named list. If no estimate is available the element is |
statistic |
One or more character strings giving the test statistic, parameters (e.g., degrees of freedom), and p-value. A single string is returned in a vector; multiple strings are returned as a named list. If no estimate is available the element is |
full_result |
One or more character strings comprised 'estimate' and 'statistic'. A single string is returned in a vector; multiple strings are returned as a named list. |
table |
A |
Column names in apa_results_table
are standardized following the broom glossary (e.g., term
, estimate
conf.int
, statistic
, df
, df.residual
, p.value
). Additionally, each column is labelled (e.g., $\hat{\eta}^2_G$
or $t$
) using the tinylabels package and these labels are used as column names when an apa_results_table
is passed to apa_table()
.
Bakeman, R. (2005). Recommended effect size statistics for repeated measures designs. Behavior Research Methods , 37 (3), 379–384. doi: \Sexpr[results=rd]{tools:::Rd_expr_doi("10.3758/BF03192707")}
aov()
, car::Anova()
, apa_print.list()
Other apa_print:
apa_print()
,
apa_print.BFBayesFactor()
,
apa_print.emmGrid()
,
apa_print.glht()
,
apa_print.htest()
,
apa_print.list()
,
apa_print.lm()
,
apa_print.lme()
,
apa_print.merMod()
## From Venables and Ripley (2002) p. 165.
npk_aov <- aov(yield ~ block + N * P * K, npk)
apa_print(npk_aov)
# Use the effectsize package to calculate partial eta-squared with
# confidence intervals
apa_print(npk_aov, estimate = effectsize::omega_squared)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.