apa_print.list {papaja} | R Documentation |
Typeset Statistical Results from Linear-Model Comparisons
Description
This method performs comparisons of lm-objects and creates formatted character strings and a model comparison table to report the results in accordance with APA manuscript guidelines.
Usage
## S3 method for class 'list'
apa_print(
x,
anova_fun = stats::anova,
conf.int = 0.9,
boot_samples = 10000,
progress_bar = interactive(),
observed = TRUE,
in_paren = FALSE,
...
)
Arguments
x |
List. A |
anova_fun |
Function. Function to compare model-objects contained in
|
conf.int |
Numeric. Confidence level for the bootstrap confidence interval
for |
boot_samples |
Numeric. Number of bootstrap samples to estimate
confidence intervals for |
progress_bar |
Logical. Determines whether a progress bar is printed while bootstrapping. |
observed |
Logical. Indicates whether predictor variables were observed. See details. |
in_paren |
Logical. Whether the formatted string is to be reported in
parentheses. If |
... |
Additional arguments passed to the function specified as
|
Details
As demonstrated by Algina, Keselman & Penfield (2007), asymptotic
confidence intervals for \Delta R^2
are often unreliable. Confidence
intervals for model comparisons of 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 MBESS::ci.R2()
to obtain a confidence region that
corresponds to the confidence level conf.int
, the default being a 90% CI (see
Steiger, 2004). If observed = 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).
Value
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()
.
References
Algina, J., Keselman, H. J., & Penfield, R. D. (2007). Confidence intervals for an effect size measure in multiple linear regression. Educational and Psychological Measurement, 67(2), 207–218. doi: doi:10.1177/0013164406292030
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: 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: 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: doi:10.18637/jss.v020.i08
See Also
Other apa_print:
apa_print.BFBayesFactor()
,
apa_print.aov()
,
apa_print.emmGrid()
,
apa_print.glht()
,
apa_print.htest()
,
apa_print.lme()
,
apa_print.lm()
,
apa_print.merMod()
,
apa_print()
Examples
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)