# 1. Raw-argument interface. Bargman's (1970) 5-group one-way ANOVA,
# also used in Venables (1975), Fleishman (1980), and Steiger (2004):
# 11 subjects per group, observed F = 11.221.
omega_squared(F_value = 11.221, df_effect = 4, df_error = 50, N = 55)
# 2. One way ANOVA from a fitted model (depression_bdi: three
# treatment arms, 10 per arm, N = 30).
fit_one <- aov(bdi_post ~ condition, data = depression_bdi)
omega_squared(fit_one)
# 3. Two-factor ANOVA: partial omega squared per effect for the
# manipulated expectancy treatment and the measured grade
# classification (pygmalion data, unequal cell sizes,
# N = 310). The treatment by grade interaction is weak here
# (F = 1.19), so the additive model is used.
fit_additive <- aov(iq_8 ~ treatment + factor(grade), data = pygmalion)
omega_squared(fit_additive)
# 4. omega_squared() and ci_omega_squared() compose: the point
# estimates agree row-by-row.
pt <- omega_squared(fit_additive)
ci <- ci_omega_squared(fit_additive)
merge(pt, ci, by = c("effect", "omega_squared",
"F_value", "df_effect", "df_error", "N"))
Run the code above in your browser using DataLab