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)

Arguments

model

A fitted anova-model of class aov or anova. Other models are coerced to anova.

partial

Logical, if TRUE, the partial eta-squared is returned.

ci.lvl

Scalar between 0 and 1. If not NULL, returns a data frame with effect sizes including lower and upper confidence intervals.

n

Number of bootstraps to be generated.

digits

Number of decimal points in the returned data frame.

Value

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).

Details

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. Confidence intervals for partial omega-squared is also based on bootstrapping.

References

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)

Examples

# load sample data data(efc) # fit linear model fit <- aov( c12hour ~ as.factor(e42dep) + as.factor(c172code) + c160age, data = efc ) eta_sq(fit)
#> term etasq #> 1 e42dep 0.266 #> 2 c172code 0.005 #> 3 c160age 0.048
omega_sq(fit)
#> term omegasq #> 1 e42dep 0.263 #> 2 c172code 0.004 #> 3 c160age 0.048
eta_sq(fit, partial = TRUE)
#> term partial.etasq #> 1 e42dep 0.281 #> 2 c172code 0.008 #> 3 c160age 0.066
eta_sq(fit, partial = TRUE, ci.lvl = .8)
#> term partial.etasq conf.low conf.high #> 1 e42dep 0.281 0.247 0.310 #> 2 c172code 0.008 0.001 0.016 #> 3 c160age 0.066 0.047 0.089
anova_stats(car::Anova(fit, type = 2))
#> term power sumsq meansq df statistic p.value etasq #> 1 e42dep 1.000 426461.571 142153.857 3 80.299 0.000 0.212 #> 2 c172code 0.429 7352.049 3676.025 2 2.076 0.126 0.004 #> 3 c160age 1.000 105169.595 105169.595 1 59.408 0.000 0.052 #> 4 Residuals NA 1476436.343 1770.307 834 NA NA NA #> partial.etasq omegasq partial.omegasq cohens.f #> 1 0.224 0.209 0.221 0.537 #> 2 0.005 0.002 0.003 0.071 #> 3 0.066 0.051 0.065 0.267 #> 4 NA NA NA NA