| eta_squared | R Documentation |
Compute eta-squared and partial eta-squared for all terms in an ANOVA model.
See the Datanovia tutorial One-Way ANOVA in R for a worked walkthrough.
eta_squared(model, ci = NULL)
partial_eta_squared(model, ci = NULL)
model |
an object of class |
ci |
confidence level for a confidence interval on the effect size. If a
number between 0 and 1 (e.g. |
a named numeric vector of effect sizes, one per model term; or, when
ci is a confidence level, a tibble with the columns Effect,
effsize, conf.low and conf.high.
eta_squared(): compute eta squared
partial_eta_squared(): compute partial eta squared.
Steiger, J. H. (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, 164-182.
The Datanovia tutorial: One-Way ANOVA in R.
# Data preparation
df <- ToothGrowth
df$dose <- as.factor(df$dose)
# Compute ANOVA
res.aov <- aov(len ~ supp*dose, data = df)
summary(res.aov)
# Effect size
eta_squared(res.aov)
partial_eta_squared(res.aov)
# Effect size with confidence interval
eta_squared(res.aov, ci = 0.95)
partial_eta_squared(res.aov, ci = 0.95)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.