Português

Repeated measures ANOVA

Means (parametric) · Three or more repeated measures · reference distribution: F

When to use it

Compare three or more conditions measured on the same individuals, such as several time points in a follow-up.

Null hypothesis

The means of all conditions are equal.

Assumptions

Test statistic

F = \dfrac{MS_{\text{conditions}}}{MS_{\text{error}}}

Effect size

Partial η²: the variation due to conditions relative to itself plus the error.

\eta^2_p = \dfrac{SS_{\text{conditions}}}{SS_{\text{conditions}} + SS_{\text{error}}}

How to report it

F(2, 38) = 6.12, p = .005, η²p = .24 (with the Greenhouse-Geisser correction, report the corrected df)

In R and Python

R
library(afex)
aov_ez("id", "y", df, within = "time")
Python
from statsmodels.stats.anova import AnovaRM
AnovaRM(df, "y", "id", within=["time"]).fit()

In Python, stats is scipy.stats and np is numpy.

Variants and alternatives

Where it sits in the catalog

Means (parametric). Parametric tests assume a model for the data, usually the normal distribution, and compare its parameters, such as the mean. When the assumption holds, they are the most powerful.

Three or more repeated measures. The same individuals measured under three or more conditions or time points: the paired design with more than two measurements.

In the decision tree

  1. What do you want to do? Compare groups, or one group with a reference value
  2. What kind of response did you measure? Numeric: a measurement, such as weight, time or score
  3. How many groups or measurements? Three or more groups
  4. Are the groups made of different individuals or the same individuals? The same individuals, under several conditions or time points
  5. Are the residuals approximately normal? Yes

Open the decision tree