What a simple effect is. The simple main effect of \(A\) at
level \(B = b_j\) tests whether the \(a\) cell means at that single
level of \(B\) differ. It is the one-way analysis of variance of
\(Y\) on \(A\) restricted to observations with \(B = b_j\). The
counterpart, the simple effect of \(B\) at \(A = a_i\), is defined
symmetrically.
Test statistic. For the simple effect of \(A\) at \(B = b_j\),
let \(\mathit{SS}_{A\,|\,b_j} = \sum_i n_{ij}\,(\bar{Y}_{ij\cdot} -
\bar{Y}_{\cdot j\cdot})^2\) be the between-A sum of squares computed at
that level, and let \(\mathit{MS}_{A\,|\,b_j} = \mathit{SS}_{A\,|\,b_j} / (a - 1)\).
Pooled \(\mathit{MS}_W\): \(F = \mathit{MS}_{A\,|\,b_j} /
\mathit{MS}_W\) with degrees of freedom \((a - 1,\, N - ab)\),
where \(\mathit{MS}_W\) and its df come from the fitted full
factorial model.
Welch: \(F\) and its (fractional) denominator
df come from oneway.test(y ~ A,
subset = (B == b_j), var.equal = FALSE).
Test statistics for \(B\) at \(a_i\) are computed by interchanging the
two factors.
Choosing an error term. The pooled denominator borrows strength
from all \(N\) observations and is the textbook default in
Maxwell, Delaney, and Kelley's treatment. Its validity rests on
homogeneity of variance across all \(a \times b\) cells, not
merely within the conditioning level. When that assumption is doubtful
, for example, if Levene's or the Brown--Forsythe test flags
heteroscedasticity, or if cell variances visibly differ, the Welch
option provides a level-conditional test that does not require
homogeneity across cells. The trade-off is denominator df: pooled
carries the full \(N - ab\) residual df, whereas Welch carries
the Welch--Satterthwaite df based on the \(a\) cell variances
at that level only.
Partial \(\eta^2\) and its CI. The point estimate is
$$\hat{\eta}^2_p = \frac{df_{\text{effect}}\, F}{df_{\text{effect}}\, F + df_{\text{error}}},$$
computed from the F and the df actually used in the test
(so it reflects whichever error term was chosen). The confidence
interval is built by Steiger's (2004) transformation principle: a CI
for the noncentrality parameter \(\lambda\) of the F
distribution is obtained via ci_nc_F and then
mapped through \(\eta^2_p = \lambda / (\lambda + N_{\text{ref}})\),
with \(N_{\text{ref}}\) taken to be the total study N for the
pooled error term (treating the simple effect as a contrast within the
full factorial design) and the level-conditional sample size
\(n_{|b_j}\) for the Welch error term (since the Welch test uses only
those observations). When the lower limit on \(\lambda\) is not
identified (i.e., the observed F is below its one-sided critical
value), the lower limit on \(\eta^2_p\) is set to 0; when the upper
limit is at infinity, the upper limit on \(\eta^2_p\) is set to 1.
Multiplicity across the family. With which = "both" the
family is the \(a + b\) simple effects returned in a single call; the
adjustment is applied to that entire family. If only one direction is
wanted, call the function twice with which = "A_at_B" and
which = "B_at_A" so each family is adjusted on its own. The
"bonferroni" adjustment is \(p_{\text{adj}} = \min(1, m\, p)\)
for \(m\) rows; the sequential methods ("holm",
"hochberg", "BH", "BY") are computed via
p.adjust.
When to perform simple effects. It is no longer required that
a significant omnibus interaction precede simple effect testing
(Maxwell, Delaney, & Kelley, 2027). Simple effects are
informative whenever the substantive question is conditional on a level
of the other factor, and the multiplicity adjustment controls the
family-wise error rate independently of any interaction screen.
Scope. Only fixed-effects between-subjects designs with
exactly two crossed factors are supported. Within-subjects or
mixed designs (aovlist fits) and three- or higher-way designs
are out of scope for this function. Per-cell sample sizes may be
unequal.