# 1. Raw-argument interface (Bargman 1970 / Steiger 2004 example):
# five groups of 11, observed F = 11.221.
omega_squared_partial(F_value = 11.221, df_effect = 4, df_error = 50, N = 55)
# 2. Two-factor ANOVA: partial omega squared per effect on the
# pygmalion data (expectancy treatment x grade, unequal cell
# sizes, N = 310). The treatment is manipulated while grade is
# a measured classification, and the partial value for each
# effect removes the variance the other accounts for. 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_partial(fit_additive)
# 3. omega_squared_partial() and ci_omega_squared() agree on the
# point estimate row-by-row.
pt <- omega_squared_partial(fit_additive)
ci <- ci_omega_squared(fit_additive)
pt$omega_squared_partial
ci$omega_squared
# 4. The named pair: omega_squared() and omega_squared_partial()
# report identical numbers in this design; the only difference
# is the name of the value column, which makes the user's
# intent (partial) explicit.
omega_squared(fit_additive)$omega_squared
omega_squared_partial(fit_additive)$omega_squared_partial
Run the code above in your browser using DataLab