CalculatorsToolsGuides 日本語
BenchFig › Guides › Repeated-measures ANOVA and sphericity (Mauchly’s test, Greenhouse–Geisser)
Statistics

Repeated-measures ANOVA and sphericity (Mauchly’s test, Greenhouse–Geisser)

When the same subjects are measured over time, or the same experimental run includes three or more conditions, repeated-measures ANOVA is the standard parametric test. It removes subject-to-subject differences and so detects effects more easily, but it has its own assumption, sphericity, and when that fails the P values come out too small. This guide explains sphericity, Mauchly’s test and the Greenhouse–Geisser correction with a worked example.

Updated: BenchFig日本語

What repeated-measures ANOVA does

Key points
  • For paired data: the same subjects (or runs) measured under three or more conditions or time points
  • Removes subject-to-subject differences from the error, so it finds effects more easily than ordinary ANOVA
  • Assumes sphericity; when it fails, P values are too small, so consider a correction
  • If the data are not close to normal, use the Friedman test

Ordinary one-way ANOVA treats all within-group variation as error. Repeated-measures ANOVA first takes out the part due to subjects (some animals are always high, some always low) and uses only the remainder as error when computing F.

Example: 6 animals × 4 time points

Grip strength in 6 mice measured at weeks 0, 1, 2 and 4 (made up).

AnimalWeek 0Week 1Week 2Week 4
152586671
248555975
355607069
450546180
547566367
653576878
Mean50.856.764.573.3
45505560657075800 wk1 wk2 wk4 wkGrip strength (g)
Six mice measured at weeks 0, 1, 2 and 4 (made up), with lines joining each animal. Up to week 2 the lines are nearly parallel, but at week 4 animals change by very different amounts: the variance of the differences depends on which time points you compare, which is what a violation of sphericity looks like.
Source of variationSum of squaresdfF
Time1716.3345.25 (repeated measures)
Subjects103.35—
Error (time × subject)189.715—
For reference: error ignoring pairing293.02039.05 (one-way)

Repeated-measures ANOVA gives F(3, 15) = 45.25, P = 9.4 × 10−8, with partial η² = 0.90. Removing the subject sum of squares (103.3) from the error makes F larger.

What sphericity means

Sphericity is the assumption that the variance of the differences is the same whichever two time points you pick. RM ANOVA uses a single error term for all comparisons between time points, so if the variance of the differences varies a lot between pairs, F is inflated and P is too small (more false positives).

Pair of time pointsVariance of differences
Week 1 − week 03.8
Week 2 − week 04.7
Week 4 − week 034.7
Week 2 − week 16.2
Week 4 − week 144.3
Week 4 − week 258.2

Here, differences among weeks 0 to 2 have variances of about 4 to 6, while pairs involving week 4 have 35 to 58, around ten times larger. In the figure the lines fan out at week 4. In time-course experiments subjects often diverge over time, a typical way for sphericity to fail.

Mauchly’s test

The usual test is Mauchly’s test. Its null hypothesis is that sphericity holds; the statistic W (0 to 1, 1 meaning perfect sphericity) is tested against a chi-square distribution. Here W = 0.0315, χ²(5) = 12.87, P = 0.030, so sphericity is judged violated.

Mauchly’s test has low power with small n and flags harmless violations with large n. As with normality tests, it is safer not to decide mechanically from it (caveats of normality tests).

Greenhouse–Geisser and Huynh–Feldt corrections

The degree of violation is measured by ε (epsilon). It is 1 under perfect sphericity and at least 1/(k − 1) (1/3 here). The corrections keep F unchanged but multiply both degrees of freedom by ε before computing P.

ε, corrected df and P use the same calculation as BenchFig (the P of Mauchly’s test uses the same second-order approximation as R’s mauchly.test). The df are the unrounded ε times the df, to two decimals.
MethodεCorrected dfP
Uncorrected13, 159.4 × 10−8
Huynh–Feldt0.4531.36, 6.800.00020
Greenhouse–Geisser0.3981.20, 5.980.00043
Lower bound (most conservative)0.3331, 50.0011

Here the time effect stays clear after correction (P = 0.00043), but P is several thousand times larger than uncorrected; with smaller effects, the correction can decide significance.

Post hoc tests such as Tukey’s use the same error term, so they are affected too when sphericity is badly violated. Alternatives are paired t tests for each pair with Bonferroni or Holm adjustment, or a mixed-effects model.

Try repeated-measures ANOVA on a multi-group sampleChoose “Match by row” to get repeated-measures ANOVA with Tukey’s multiple comparisons, partial η² and a ready-to-paste sentence.
Open for free →

Reading epsilon: Greenhouse–Geisser or Huynh–Feldt?

MeaningThis example
ε = 1Sphericity holds exactly; the correction leaves the df unchanged—
Lower bound 1/(k − 1)The smallest possible ε (k = number of conditions or time points); correcting with it is the most conservative option0.333
Greenhouse–Geisser εε estimated from the data; tends to run low, so the correction is conservative0.398
Huynh–Feldt εA correction for the downward bias of the GG estimate; larger than GG, so the correction is more liberal (capped at 1 in BenchFig)0.453

Mauchly’s test vs Bartlett’s test of sphericity

Two different tests are called “tests of sphericity”, and their names are easy to mix up.

Mauchly’s test of sphericityBartlett’s test of sphericity
Used forChecking the assumption of repeated-measures ANOVAChecking, before factor analysis or PCA, whether the variables are worth combining
What it testsWhether the variances of the differences between conditions are equal (sphericity)Whether the correlation matrix of the variables is an identity matrix (no correlations at all)
A significant result meansSphericity is violated → apply Greenhouse–Geisser or a similar correctionThe variables are correlated → factor analysis is worthwhile
Reported withGreenhouse–Geisser and Huynh–Feldt epsilonsKMO (Kaiser–Meyer–Olkin measure of sampling adequacy)
In Rafex and ez output, mauchly.testcortest.bartlett in the psych package

For repeated-measures ANOVA, the test you want is Mauchly’s. Bartlett’s test of sphericity (by M. S. Bartlett) is the one in SPSS’s “KMO and Bartlett’s Test” table for factor analysis and has nothing to do with the repeated-measures assumption. Note that significance points in opposite directions: for Mauchly a significant result is a problem, for Bartlett it is the green light for factor analysis.

Where to look in R and SPSS output

R (afex)

The ANOVA table from afex::aov_ez() or aov_car() shows Greenhouse–Geisser-corrected degrees of freedom by default (the line “Sphericity correction method: GG” appears under it). Fractional df such as 1.20, 5.98 tell you the correction has been applied. summary() adds Mauchly’s test and the Greenhouse–Geisser- and Huynh–Feldt-corrected results (ε and corrected P).

R (ez)

ez::ezANOVA() returns “Mauchly's Test for Sphericity” (W and p) and “Sphericity Corrections” (GGe, p[GGe], HFe, p[HFe]). GGe and HFe are the epsilons; p[GGe] and p[HFe] are the corrected P values. Both appear only for within-subject factors with three or more levels.

SPSS

In the “Mauchly's Test of Sphericity” table, read Mauchly’s W, Approx. Chi-Square, df and Sig., and the epsilons on the right (Greenhouse–Geisser, Huynh–Feldt, Lower-bound). The result itself is in “Tests of Within-Subjects Effects”: of the four rows “Sphericity Assumed”, “Greenhouse–Geisser”, “Huynh–Feldt” and “Lower-bound”, read the df, F and Sig. on the row of the correction you chose. F is the same in all four rows; only the df and P change.

What BenchFig does

On BenchFig’s Graph screen, choosing “Match by row” with three or more groups runs repeated-measures ANOVA with Tukey’s multiple comparisons (or the Friedman test if you choose Nonparametric). Rows with an empty group are excluded, and the number of excluded rows is shown. Assumption checks include Mauchly’s test of sphericity and the Greenhouse–Geisser and Huynh–Feldt epsilons; by default the Greenhouse–Geisser-corrected degrees of freedom and P are reported (can be turned off). Tukey’s comparisons after the ANOVA use the uncorrected error mean square.

How to write it in a paper

Methods: “Time points were compared using one-way repeated-measures ANOVA, with the Greenhouse–Geisser correction applied for departures from sphericity.” Results: give the corrected degrees of freedom, e.g. “Grip strength changed over time (F(1.20, 5.98) = 45.25, P < 0.001, ε = 0.40).” Reporting ε lets readers judge how far sphericity was violated. For general formats see how to report statistics.

FAQ

Is Bartlett’s test of sphericity the same thing?

No. Bartlett’s test of sphericity checks, before factor analysis or PCA, whether the correlation matrix of the variables is an identity matrix (no correlations at all). The sphericity assumption of repeated-measures ANOVA is checked with Mauchly’s test.

Do I need to check sphericity with only two time points?

No. With two conditions there is only one difference, so sphericity always holds (the RM ANOVA equals the paired t test, F = t²). Sphericity matters from three conditions upwards.

If Mauchly’s test is not significant, can I skip the correction?

Mauchly’s test misses violations with small n and flags trivial ones with large n. Many therefore recommend applying the Greenhouse–Geisser correction regardless, or at least reporting ε.

Greenhouse–Geisser or Huynh–Feldt?

Greenhouse–Geisser corrects a little too much (conservative); Huynh–Feldt a little too little. A commonly cited rule is Huynh–Feldt if ε > 0.75, Greenhouse–Geisser otherwise. If in doubt, use Greenhouse–Geisser and say which you used.

What about subjects with missing time points?

In repeated-measures ANOVA, a subject missing any time point is dropped entirely (BenchFig does the same). With many missing values or unequal n per time point, a mixed-effects model is a better fit.

Try repeated-measures ANOVA on sample dataOpen a multi-group sample on the Graph screen and set Matching to “Match by row” to run repeated-measures ANOVA with Tukey’s multiple comparisons.
Open for free →
Your own data, all the way to the final figure.Loading your files, saving, and journal-ready export (PDF, TIFF, PNG, SVG) are in BenchFig Pro for Windows, updated based on researchers’ requests: ¥3,980/year (2 PCs), with lab and perpetual licenses too.
About the app →

Related guides

Product and journal names are trademarks or registered trademarks of their respective owners.