lm
-objects and creates formatted chraracter
strings and a model comparison table to report the results in accordance with APA manuscript guidelines.
"apa_print"(x, anova_fun = stats::anova, ci = 0.9, boot_samples = 10000, observed_predictors = TRUE, in_paren = FALSE, ...)
lm
-objects. If the list is completely named, element names are used as model names in the ouptut object.x
.boot_samples = 0
.anova_fun
apa_print.list
returns a named list containing the following components according to the input:lm
-objects are, therefore, estimated
using their modified percentile bootstrap method. Note that the accuracy of the confidence intervals depends on
the number of predictors $p$, their distribution, and the sample size $n$:"When the predictor distribution is multivariate normal, one can obtain accurate CIs for $\rho^2$ with $n \geq~50$ when $p = 3$. For $p = 6$ and for $p = 9$, $n \geq~100$ is advisable. When the predictor distribution is nonnormal in form, sample size requirements vary with type of nonnormality." (p. 939, Algina, Keselman & Penfield, 2010)
If MBESS is available, confidence intervals for $R^2$ are computed using ci.R2
to
obtain a confidence region that corresponds to the confidence level ci
, the default being a 90% CI (see
Steiger, 2004). If observed_predictors = FALSE
, it is assumed that predictors are fixed variables, i.e.,
"the values of the [predictors] were selected a priori as part of the research design" (p. 15, Kelly, 2007);
put differently, it is assumed that predictors are not random. The confidence intervals for the regression
coefficients in the model comparison table correspond to the $\alpha$-level chosen for $R^2$ and
$\Delta R^2$ (e.g., 90% CI or $\alpha = 0.10$ for $R^2$ and $\Delta R^2$ yields a 95% CI for
regression coefficients, Steiger, 2004).
If in_paren
is TRUE
parentheses in the formatted string, such as those surrounding degrees
of freedom, are replaced with brackets.
Algina, J., Keselman, H. J., & Penfield, R. D. (2010). Confidence Intervals for Squared Semipartial Correlation Coefficients: The Effect of Nonnormality. Educational and Psychological Measurement, 70(6), 926--940. doi:10.1177/0013164410379335
Steiger (2004). Beyond the F Test: Effect Size Confidence Intervals and Tests of Close Fit in the Analysis of Variance and Contrast Analysis. Psychological Methods, 9(2), 164-182. doi:10.1037/1082-989X.9.2.164
Kelley, K. (2007). Confidence intervals for standardized effect sizes: Theory, application, and implementation. Journal of Statistical Software, 20(8), 1-24. doi:10.18637/jss.v020.i08
anova
Other apa_print: apa_print.aov
,
apa_print.glht
,
apa_print.htest
,
apa_print.lm
, apa_print
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
apa_print(list(Baseline = mod1, Length = mod2, Both = mod3), boot_samples = 0)
Run the code above in your browser using DataLab