Learn R Programming

papaja (version 0.1.0.9479)

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 ouptut 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:

See Also

arrange_anova, apa_print.aov

Examples

Run this code
 ## 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)
#  ## End(Not run)

Run the code above in your browser using DataLab