papaja (version 0.1.0.9842)

print_model_comp: Format statistics model comparisons (APA 6th edition)

Description

This function is the workhorse of the apa_print.anova for model comparisons. It takes a data.frame of class apa_model_comp and produces strings to report the results in accordance with APA manuscript guidelines. This function is not exported.

Usage

print_model_comp(x, models = NULL, ci = NULL, boot_samples = 1000,
  in_paren = FALSE, observed_predictors = TRUE)

Arguments

x

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

models

List. List containing fitted lm- objects that were compared using anova(). If the list is named, element names are used as model names in the output object.

ci

Numeric. Confidence level for the confidence interval for \(\Delta R^2\) if x is a model comparison object of class anova. If ci = NULL no confidence intervals are estimated.

boot_samples

Numeric. Number of bootstrap samples to estimate confidence intervals for \(\Delta R^2\) if x is a model comparison object of class anova; ignored if ci = NULL.

in_paren

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

observed_predictors

Logical. Indicates whether predictor variables were observed. 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 {
   mod1 <- lm(Sepal.Length ~ Sepal.Width, data = iris)
   mod2 <- update(mod1, formula = . ~ . + Petal.Length)
   mod3 <- update(mod2, formula = . ~ . + Petal.Width)

   # No bootstrapped Delta R^2 CI
   print_model_comp(list(Baseline = mod1, Length = mod2, Both = mod3), boot_samples = 0)
 
# }

Run the code above in your browser using DataLab