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. |
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).
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.
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)#> # A tibble: 3 x 2 #> term etasq #> <chr> <dbl> #> 1 as.factor(e42dep) 0.266 #> 2 as.factor(c172code) 0.00540 #> 3 c160age 0.0484omega_sq(fit)#> # A tibble: 3 x 2 #> term omegasq #> <chr> <dbl> #> 1 as.factor(e42dep) 0.263 #> 2 as.factor(c172code) 0.00377 #> 3 c160age 0.0476eta_sq(fit, partial = TRUE)#> # A tibble: 3 x 2 #> term partial.etasq #> <chr> <dbl> #> 1 as.factor(e42dep) 0.281 #> 2 as.factor(c172code) 0.00788 #> 3 c160age 0.0665# CI for eta-squared requires apaTables packages# NOT RUN { if (requireNamespace("apaTables", quietly = TRUE)) { eta_sq(fit, partial = TRUE, ci.lvl = .8) } # }#> # A tibble: 4 x 12 #> term sumsq meansq df statistic p.value etasq partial.etasq omegasq #> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> #> 1 as.factor~ 4.26e5 1.42e5 3 80.3 0 0.212 0.224 0.209 #> 2 as.factor~ 7.35e3 3.68e3 2 2.08 0.126 0.004 0.005 0.002 #> 3 c160age 1.05e5 1.05e5 1 59.4 0 0.052 0.066 0.051 #> 4 Residuals 1.48e6 1.77e3 834 NA NA NA NA NA #> # ... with 3 more variables: partial.omegasq <dbl>, cohens.f <dbl>, power <dbl>