papaja (version 0.1.0.9842)

print_anova: Format statistics from ANOVA (APA 6th edition)

Description

This function is the internal workhorse of the apa_print-family for ANOVA. It takes a data.frame of class apa_variance_table and produces strings to report the results in accordance with APA manuscript guidelines. It is not ment to be called by the user. This function is not exported.

Usage

print_anova(x, intercept = FALSE, observed = NULL, es = "ges",
  mse = getOption("papaja.mse"), in_paren = FALSE)

Arguments

x

Data.frame. A data.frame of class apa_variance_table as returned by arrange_anova.

intercept

Logical. Indicates if intercept test should be included in output.

observed

Character. The names of the factors that are observed, (i.e., not manipulated). Necessary for calculation of generalized eta-squared; otherwise ignored.

es

Character. The effect-size measure to be calculated; can be either ges for generalized eta-squared, pes for partial eta-squared or es for eta-squared. Note that eta-squared is calculated correctly if and only if the design is balanced.

mse

Logical. Indicates if mean squared errors should be included in output. Default is TRUE.

in_paren

Logical. Indicates if the formated string will be reported inside parentheses. See details.

Value

A named list containing the following components:

statistic

A named list of character strings giving the test statistic, parameters, and p value for each factor.

estimate

A named list of character strings giving the effect size estimates for each factor.

% , either in units of the analyzed scale or as standardized effect size.
full_result

A named list of character strings comprised of estimate and statistic for each factor.

table

A data.frame containing the complete ANOVA table, which can be passed to apa_table.

See Also

arrange_anova, apa_print.aov

Examples

Run this code
# NOT RUN {
 
# }
# NOT RUN {
   ## From Venables and Ripley (2002) p. 165.
   npk_aov <- aov(yield ~ block + N * P * K, npk)
   anova_table <- arrange_anova(summary(npk_aov))
   print_anova(anova_table)
 
# }

Run the code above in your browser using DataCamp Workspace