Compute eta-squared and partial eta-squared for all terms in an ANOVA model.

eta_squared(model)

partial_eta_squared(model)

Arguments

model

an object of class aov or anova.

Value

a numeric vector with the effect size statistics

Functions

  • eta_squared: compute eta squared

  • partial_eta_squared: compute partial eta squared.

Examples

# Data preparation df <- ToothGrowth df$dose <- as.factor(df$dose) # Compute ANOVA res.aov <- aov(len ~ supp*dose, data = df) summary(res.aov)
#> Df Sum Sq Mean Sq F value Pr(>F) #> supp 1 205.4 205.4 15.572 0.000231 *** #> dose 2 2426.4 1213.2 92.000 < 2e-16 *** #> supp:dose 2 108.3 54.2 4.107 0.021860 * #> Residuals 54 712.1 13.2 #> --- #> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
# Effect size eta_squared(res.aov)
#> supp dose supp:dose #> 0.05948365 0.70286419 0.03137672
partial_eta_squared(res.aov)
#> supp dose supp:dose #> 0.2238254 0.7731092 0.1320279