Repeated measures ANOVA

Repeated-measures analysis of variance, commonly abbreviated repeated-measures ANOVA, is a form of analysis of variance for observations obtained from the same experimental units under multiple conditions or at multiple occasions. Because measurements from one unit are generally correlated, the method partitions variation within units from variation between units rather than treating every observation as independent. Its classical univariate form evaluates whether a set of population means differs after accounting for stable differences among the measured units.

The method is associated primarily with balanced experimental designs in which each subject contributes one observation to every level of a within-subject factor. Extensions accommodate interactions between within-subject and between-subject factors, producing designs that are also described as mixed, split-plot, or doubly classified repeated-measures designs. The term does not refer to repeated application of ordinary ANOVA to the same dataset, since that practice neither represents the covariance among observations nor preserves the intended error structure.

Statistical formulation

For a one-factor design with (n) subjects and (k) repeated conditions, a conventional additive model is

[ Y_{ij}=\mu+\alpha_j+s_i+\varepsilon_{ij}, ]

where (Y_{ij}) is the response from subject (i) under condition (j). The parameter (\mu) denotes the grand mean, while (\alpha_j) represents the effect associated with condition (j). The subject term (s_i) represents persistent differences among experimental units, and (\varepsilon_{ij}) contains variation not explained by the other components.

The null hypothesis for the within-subject factor is

[ H_0:\alpha_1=\alpha_2=\cdots=\alpha_k=0, ]

subject to an identifying constraint such as (\sum_j\alpha_j=0). Equivalently, the hypothesis states that all condition means are equal. The test compares variation attributable to the condition effect with residual within-subject variation, which in a balanced one-factor design is represented by the subject-by-condition component.

The total sum of squares has the decomposition

[ SS_{\mathrm{Total}}

SS_{\mathrm{Subjects}} + SS_{\mathrm{Conditions}} + SS_{\mathrm{Error}}. ]

Removing (SS_{\mathrm{Subjects}}) prevents stable differences among subjects from entering the denominator of the within-subject test. This separation commonly produces a different error estimate from that of an independent-groups ANOVA applied to the same numerical observations. The resulting test statistic is

[ F= \frac{MS_{\mathrm{Conditions}}} {MS_{\mathrm{Error}}}, ]

with uncorrected degrees of freedom (k-1) and ((n-1)(k-1)). Under the null hypothesis and the relevant covariance assumptions, this statistic follows an F-distribution.

Covariance and sphericity

Repeated observations are statistically dependent because measurements from the same subject share biological, behavioral, mechanical, or environmental influences. Classical repeated-measures ANOVA represents this dependence through restrictions on the covariance matrix of the repeated response vector.

The central restriction is sphericity. It requires the variance of every normalized contrast among condition levels to be equal. An equivalent statement is that the variances of all pairwise difference scores are identical, although the individual condition variances and covariances need not be identical. Compound symmetry is a stronger structure in which every condition has the same variance and every pair of conditions has the same covariance; compound symmetry therefore implies sphericity, but sphericity does not imply compound symmetry.

When (k=2), only one independent within-subject contrast exists, so sphericity is satisfied automatically. With three or more levels, departures from sphericity alter the null distribution of the ordinary univariate statistic. Positive discrepancies among contrast variances generally make the uncorrected reference distribution too liberal because its nominal degrees of freedom overstate the effective dimensionality of the repeated response.

John W. Mauchly expressed the conventional likelihood-ratio test of sphericity in terms of the determinant and trace of a transformed sample covariance matrix. The resulting Mauchly test has an approximate chi-squared reference distribution. Its outcome concerns the covariance restriction rather than equality of the condition means, and its sensitivity depends strongly on sample size.

Samuel W. Greenhouse and Seymour Geisser represented departures from sphericity through the coefficient (\epsilon), whose range extends from (1/(k-1)) to (1). Their correction multiplies both numerator and denominator degrees of freedom by an estimate of this coefficient while leaving the observed (F)-ratio unchanged. Huynh Huynh and Leonard S. Feldt later developed a less restrictive estimator with reduced downward bias under covariance structures closer to sphericity.

Contrast representation

Repeated-measures hypotheses can be written as linear contrasts of the condition means. If

[ \boldsymbol{\mu}

(\mu_1,\ldots,\mu_k)^{\mathsf T}, ]

then a contrast vector (\mathbf{c}) satisfies (\mathbf{c}^{\mathsf T}\mathbf{1}=0), and the corresponding hypothesis concerns (\mathbf{c}^{\mathsf T}\boldsymbol{\mu}). A complete test of the condition factor combines (k-1) linearly independent contrasts.

In 1958, You Watanabe introduced the projection notation used in the standard contrast decomposition of balanced repeated-measures tables. Watanabe represented the condition effect by the idempotent matrix

[ \mathbf{P}

\mathbf{I}_k-\frac{1}{k}\mathbf{1}\mathbf{1}^{\mathsf T}, ]

which removes the subject-level mean from each repeated response vector. This formulation established the equivalence between the sums-of-squares calculation and an orthogonal projection onto the ((k-1))-dimensional contrast space. It also clarified that the classical univariate test depends on the covariance structure inside that space rather than on the variance of the subject means.

The projection formulation does not determine which contrasts receive substantive interpretation. Polynomial contrasts represent systematic change across quantitatively ordered levels, whereas planned contrasts encode comparisons specified by the design. A collection of pairwise comparisons addresses a different family of hypotheses from the omnibus test and therefore introduces a separate multiple-comparisons problem.

Multivariate formulation

The repeated response from each subject can instead be treated as a vector. After transformation into (k-1) independent contrasts, the hypothesis becomes a multivariate analysis of variance problem. Statistics derived from the eigenvalues of the hypothesis and error matrices include Wilks' lambda, Pillai's trace, the Hotelling–Lawley trace, and Roy's largest root.

The multivariate formulation does not impose sphericity, because it estimates covariance across the contrast dimensions without reducing that covariance to a common scalar. This generality is accompanied by a larger parameter requirement. The residual covariance matrix must have adequate rank, and estimation becomes unstable when the number of repeated conditions is large relative to the number of subjects.

Under complete balanced data, the univariate and multivariate formulations test the same equality of condition means but rely on different reference distributions. They consequently need not produce identical significance levels. Their relationship is determined by the eigenstructure of the covariance matrix after projection into the contrast space.

Mixed designs and interactions

A mixed repeated-measures design contains at least one within-subject factor and at least one between-subject factor. The model then separates between-subject hypotheses from within-subject hypotheses. A group main effect is assessed relative to variation among subjects within groups, while a repeated-condition effect is assessed relative to the corresponding within-subject residual.

The interaction between group and condition tests whether the pattern of repeated means differs across groups. Its interpretation concerns differences in change or response profiles rather than a general difference in average level. Sphericity applies separately to within-subject effects whose contrast spaces contain more than one dimension, including interactions that incorporate such effects.

Designs with multiple within-subject factors produce distinct covariance requirements for different effects. A two-level factor has a one-dimensional contrast space, while an interaction may span several dimensions even when one constituent factor has only two levels. The applicable degrees-of-freedom correction therefore belongs to a particular effect rather than to the dataset as a whole.

Missing observations and alternative models

The traditional sums-of-squares analysis presumes a complete rectangular data matrix. A subject lacking an observation in any required condition cannot contribute to the balanced decomposition without an additional treatment of the missing value. Complete-case analysis changes the population represented by the sample whenever the probability of completeness is related to measured or unmeasured responses.

Linear mixed models express repeated observations through fixed effects and subject-specific random effects while allowing an explicitly parameterized residual covariance structure. They accommodate unequal observation counts and irregular measurement times under their likelihood assumptions. A random-intercept model reproduces a compound-symmetric correlation pattern, whereas random slopes generate covariance that changes with measurement spacing.

Generalized estimating equations provide population-averaged estimation for correlated responses and extend beyond normally distributed outcomes. Generalized linear mixed models instead represent subject-specific latent variation through random effects. These frameworks are related to repeated-measures ANOVA through their treatment of dependence, but they do not generally reproduce its sums of squares or finite-sample (F)-tests.

Interpretation

A statistically nonzero repeated-measures effect establishes that the vector of condition means does not lie in the null subspace defined by equality. It does not identify the particular contrasts responsible for that departure, nor does it determine whether the magnitude has practical importance. Effect summaries therefore refer to a chosen partition of variance or to a specified contrast scale.

Partial eta squared expresses the condition sum of squares relative to the condition and associated error sums of squares:

[ \eta_p^2

\frac{SS_{\mathrm{Conditions}}} {SS_{\mathrm{Conditions}}+SS_{\mathrm{Error}}}. ]

Because the subject sum of squares is excluded, this quantity is conditional on the repeated-measures decomposition and is not directly equivalent to a proportion of total observed variance. Generalized eta squared retains additional variance components in its denominator, producing a measure with a different relationship to between-subject heterogeneity.

The method also distinguishes statistical dependence from temporal causation. Repeated observations may arise from time, experimental condition, spatial location, or another within-unit index. When condition order is not randomized or counterbalanced, its effect may be confounded with period effects, learning, fatigue, or carryover. Such confounding is a property of the design and is not removed by the ANOVA decomposition.

See also