Repeated-measures ANOVA compares within-subject conditions in a one-way or mixed design, where each subject contributes one observation per within-level.
When measurements come from the same subject at multiple time points or under multiple conditions, the observations within a subject are correlated. Treating them as independent (with plain ANOVA) understates the true precision; rm-ANOVA exploits the pairing to remove between-subject variance, much like the paired t-test does for two conditions.
The sphericity assumption (compound symmetry of the within-subject covariance) is the catch — when violated, the standard F test's p-value is too small. Mauchly's W tests for it; when it fails, use the Greenhouse-Geisser or Huynh-Feldt epsilon-corrected p (we report all three plus the lower-bound conservative correction).
For non-normal or rank data, the Friedman test is the rank-based counterpart. For more flexible covariance structures (autoregressive, unstructured, missing observations), use a mixed-effects model — rm-ANOVA requires balanced complete data.
Long format: response + within-factor + subject ID, optional between-subject factor.
F + Mauchly's W (sphericity), with Greenhouse-Geisser, Huynh-Feldt, and lower-bound ε-corrected p-values.
Mauchly p < 0.05 ⇒ sphericity violated ⇒ use the Greenhouse-Geisser p (always conservative) or Huynh-Feldt (slightly more powerful when GG ε > 0.75).
Subjects missing one or more time points are dropped entirely — if listwise deletion costs you a lot, switch to mixed_model which handles missing data more gracefully.