| eta_sq {sjstats} | R Documentation |
Returns the (partial) eta-squared, (partial) omega-squared statistic
or Cohen's F for all terms in an anovas. anova_stats() returns
a tidy summary, including all these statistics and power for each term.
eta_sq(model, partial = FALSE, ci.lvl = NULL, n = 1000) omega_sq(model, partial = FALSE, ci.lvl = NULL, n = 1000) cohens_f(model) anova_stats(model, digits = 3)
model |
A fitted anova-model of class |
partial |
Logical, if |
ci.lvl |
Scalar between 0 and 1. If not |
n |
Number of bootstraps to be generated. |
digits |
Number of decimal points in the returned data frame. |
For eta_sq() (with partial = FALSE), due to
non-symmetry, confidence intervals are based on bootstrap-methods. In this
case, n indicates the number of bootstrap samples to be drawn to
compute the confidence intervals.
For partial eta-squared (eta_sq() with partial = TRUE),
confidence intervals are based on get.ci.partial.eta.squared
and for omega-squared, confidence intervals are based on
conf.limits.ncf. Confidence intervals for partial
omega-squared is also based on bootstrapping.
A data frame with the term name(s) and effect size statistics; if
ci.lvl is not NULL, a data frame including lower and
upper confidence intervals is returned. For anova_stats(), a tidy
data frame with all statistics is returned (excluding confidence intervals).
Levine TR, Hullett CR (2002): Eta Squared, Partial Eta Squared, and Misreporting of Effect Size in Communication Research (pdf)
Tippey K, Longnecker MT (2016): An Ad Hoc Method for Computing Pseudo-Effect Size for Mixed Model. (pdf)
# load sample data
data(efc)
# fit linear model
fit <- aov(
c12hour ~ as.factor(e42dep) + as.factor(c172code) + c160age,
data = efc
)
eta_sq(fit)
omega_sq(fit)
eta_sq(fit, partial = TRUE)
# CI for eta-squared requires apaTables packages
## Not run:
if (requireNamespace("apaTables", quietly = TRUE)) {
eta_sq(fit, partial = TRUE, ci.lvl = .8)
}
## End(Not run)
anova_stats(car::Anova(fit, type = 2))