What Is a Repeated Measures ANOVA and When to Use It

A repeated measures ANOVA tests whether an average score changes when the same people are measured several times, such as before, during, and after a treatment. It answers one broad question: is there any difference somewhere among those repeated measurements?1Laerd Statistics. Repeated Measures ANOVA It doesn’t say which measurements differ, and it leans on assumptions that real data often break. Because each person serves as their own comparison, it can find real changes with fewer participants than a design that compares separate groups.

How a Repeated Measures ANOVA Works

It is the related-groups version of the familiar one-way ANOVA. A regular one-way ANOVA compares averages from separate groups of different people. A repeated measures ANOVA compares averages that come from the same people, so the scores are linked.1Laerd Statistics. Repeated Measures ANOVA You’ll see it called a within-subjects ANOVA, or an ANOVA for correlated samples, meaning every person contributes a score to every condition. It also extends the paired t-test, which compares only two linked measurements, to three or more.1Laerd Statistics. Repeated Measures ANOVA

Its power comes from setting aside differences between people. Measuring each person in every condition reduces the noise caused by people simply differing from one another.2PubMed Central. Standard errors and confidence intervals in within-subjects designs: Generalizing Loftus and Masson (1994) and avoiding the biases of alternative accounts Only how each person’s score shifts across conditions is treated as the signal, not their overall level.3PubMed. Using confidence intervals in within-subject designs2PubMed Central. Standard errors and confidence intervals in within-subjects designs: Generalizing Loftus and Masson (1994) and avoiding the biases of alternative accounts

Picture ten people who rate their pain at day 0, week 2, and week 4. The test asks whether the three time-point averages differ by more than chance would explain. A significant result means at least one time point differs, not that all of them do.

Behind this, the test splits the total variation in scores into three parts: differences between conditions, differences between people, and leftover variation that nothing in the design explains. The between-people part is removed from the error term, which is why the test can be sharper than a one-way ANOVA on the same numbers. The F statistic compares the variation between conditions against the leftover variation, so a large F means the condition averages differ by more than the leftover noise would suggest.

Why not just run several paired t-tests? Each extra test adds a fresh chance of a false alarm. With three time points you’d need three tests, and the errors pile up. The ANOVA asks one overall question first, which keeps that risk at its intended level. Pairwise checks come only after the overall test, as covered below.

When to Use It and When to Choose Something Else

The test suits any study where each participant is measured on more than one occasion.4PubMed. Repeated-measure analyses: Which one? A survey of statistical models and recommendations for reporting A common use is tracking a blood value at several visits during a treatment.5PubMed Central. Analysis of repeated measurement data in the clinical trials

The repeated factor can be time, such as week 0, 4, and 8, or it can be different treatments or tasks that each person completes. Time-based designs have a fixed order that can’t be shuffled, while condition-based designs can vary the order, and that difference matters when you interpret the results. Either way, the test only needs each person measured at every level of that factor.

Many studies measure people over time and also split them into groups, such as treatment versus placebo.6Datanovia. Mixed ANOVA in R: Between + Within Factors A mixed ANOVA handles one factor measured on the same people and one factor that separates different people.7Laerd Statistics. Mixed ANOVA using SPSS Statistics It sits between an all-separate-groups two-way ANOVA and an all-same-people repeated measures ANOVA.6Datanovia. Mixed ANOVA in R: Between + Within Factors

A mixed ANOVA reports a main effect of time, a main effect of group, and an interaction between the two. The interaction is usually the headline, such as treatment improving while placebo stays flat. A significant time effect alone doesn’t show the treatment worked, since both groups might have changed in the same way.

For a single before and after, the test is often not the best choice. With only a before and an after score per person in two groups, the repeated measures interaction gives the same answer as comparing each person’s change score.8PubMed Central. Methods for Analysis of Pre-Post Data in Clinical Research: A Comparison of Five Common Methods But the repeated measures version is often misread, while the change-score comparison is simpler and clearer, so many statisticians recommend it for pre-post designs.8PubMed Central. Methods for Analysis of Pre-Post Data in Clinical Research: A Comparison of Five Common Methods

A quick way to check your own data:

  • Same people, three or more measurements: repeated measures ANOVA.
  • Same people plus separate groups: mixed ANOVA.
  • Only two linked measurements: paired t-test.
  • Rankings, or ratings with few levels: see the alternatives section.
  • Several people missing time points: see the alternatives section.

One common mistake is running a regular ANOVA on repeated data as if the scores came from separate people. That ignores that the scores are linked, throws away the noise reduction, and misstates the uncertainty. Keep your data layout so each person’s scores stay tied together.

The Sphericity Assumption and How to Correct for It

The design assumes that the differences between every pair of conditions spread out by about the same amount. Software calls this sphericity.9PubMed. Recommendations for analysis of repeated-measures designs: testing and correcting for sphericity and use of manova and mixed model analysis If week 1 to week 2 changes are tightly clustered but week 1 to week 4 changes are all over the place, the assumption is broken. Measurements closer in time are usually more alike than distant ones, so this breaks often in time-based studies. An uncorrected test can then call too many results significant.

With only two conditions there is just one set of differences, so sphericity can’t fail. The assumption matters only with three or more conditions, and software may print an epsilon of 1 or skip the test in the two-condition case.

The Greenhouse-Geisser and Huynh-Feldt corrections adjust the test rather than replacing it. They use a number called epsilon, which measures how far the data stray from sphericity.10Encyclopedia of Research Design. The Greenhouse-Geisser Correction Epsilon shrinks the test’s degrees of freedom, making significance harder to reach.10Encyclopedia of Research Design. The Greenhouse-Geisser Correction The Huynh-Feldt correction is a more efficient version of the Greenhouse-Geisser correction.10Encyclopedia of Research Design. The Greenhouse-Geisser Correction When the two corrections disagree, use Greenhouse-Geisser if epsilon is below 0.60 and Huynh-Feldt if it’s 0.60 or above.11PubMed Central. Repeated measures ANOVA and adjusted F-tests when sphericity is violated: which procedure is best?

An epsilon of 1 means the data fit the assumption perfectly, so no adjustment is made. The further it falls below 1, the stricter the test becomes.

In your software output, when the equal-spread assumption holds, you read the result from the “Sphericity Assumed” row.12EZ SPSS Tutorials. Repeated-Measures ANOVA in SPSS, Including Interpretation – Easy SPSS Tutorial When it doesn’t, you read a corrected row; the F value stays the same while the degrees of freedom change.12EZ SPSS Tutorials. Repeated-Measures ANOVA in SPSS, Including Interpretation – Easy SPSS Tutorial Often the corrections don’t change the conclusion, as when every row still gives p =.006.12EZ SPSS Tutorials. Repeated-Measures ANOVA in SPSS, Including Interpretation – Easy SPSS Tutorial A published result may read like F(2.438, 1026.279), where the decimal degrees of freedom show a correction was applied.5PubMed Central. Analysis of repeated measurement data in the clinical trials

Relying solely on a sphericity test is a common mistake. These tests can miss problems in small samples and flag trivial ones in large samples. Many analysts simply report a corrected result by default, and reporting epsilon lets readers judge how severe the departure was.

Finding Which Conditions Differ

The overall test only says some difference exists, so you then compare pairs of conditions with a post hoc test.13Portland State University. Follow-Up Analyses for Within-Subjects ANOVA These tests control the extra false-alarm risk from making many comparisons.13Portland State University. Follow-Up Analyses for Within-Subjects ANOVA Tukey’s test assumes equal spread across all pairs, the same idea as the equal-spread assumption, and gives too many false positives when that fails.14Journal of Educational Statistics. Pairwise Multiple Comparisons in Repeated Measures Designs A Bonferroni adjustment, using a separate error estimate for each pair, is the safer choice.14Journal of Educational Statistics. Pairwise Multiple Comparisons in Repeated Measures Designs Some step-wise methods can be more powerful while still controlling false alarms.13Portland State University. Follow-Up Analyses for Within-Subjects ANOVA

Bonferroni multiplies each pairwise p value by the number of comparisons, or equivalently divides the significance threshold by that number. With four time points there are six possible pairs, so each pair must pass a stricter bar than.05. Most software does the multiplication for you and prints adjusted p values, so check whether a column is labeled adjusted or raw before reading it.

Small differences can still be significant. In a 45-day treatment trial, hemoglobin rose from 8.44 to 9.17 g/dl, and every step was significant after Bonferroni adjustment.5PubMed Central. Analysis of repeated measurement data in the clinical trials A significant result says a change is unlikely to be chance, not that it’s large.

That’s why an effect size belongs next to the p value. It shows how big the difference is, not just whether it exists. Generalized eta squared is recommended for repeated measures designs, and it allows fair comparison with studies using separate groups. Most software outputs give enough information to calculate it.

Alternatives When the Data Don’t Fit

The Friedman test is the rank-based alternative to the one-way repeated measures ANOVA.15Laerd Statistics. Friedman Test in SPSS Statistics It was built to avoid assuming the scores follow a normal bell curve, so it suits outcomes such as satisfaction ratings or pain scales with few levels.16Stats and R. Friedman test in R, or the nonparametric version of the repeated measures ANOVA It ranks each person’s scores across conditions, giving the lowest score a rank of 1, and then compares the average rank for each condition. It ignores how far apart the scores are and cares only about their order.

It has limits. It handles one repeated factor and can’t directly handle a design that also has separate groups. A significant result says only that at least one condition tends to rank differently, so follow-up comparisons are still needed. It also drops anyone missing a measurement, so it doesn’t solve the dropout problem.

Missing measurements are a real problem for the classic test, which typically drops anyone missing even one measurement.17PubMed Central. Analysis of Variance of Multiply Imputed Data You lose information and the ability to detect real effects.17PubMed Central. Analysis of Variance of Multiply Imputed Data Worse, results can be biased unless data are missing completely at random.17PubMed Central. Analysis of Variance of Multiply Imputed Data If sicker patients skip later visits, dropping them makes the treatment look better than it is.

A mixed model can use everyone’s available measurements, even with some time points missing.18PubMed. A comparison of the general linear mixed model and repeated measures ANOVA using a dataset with multiple missing data points It can also model change that curves over time and differs from person to person.18PubMed. A comparison of the general linear mixed model and repeated measures ANOVA using a dataset with multiple missing data points In long-term studies with dropouts, a mixed model is often the better choice. Don’t confuse a mixed model with a mixed ANOVA: a mixed model is a different method that models each person’s pattern.

If the equal-spread assumption is the trouble, the corrections aren’t the only route. A multivariate approach needs no such assumption, though it typically needs more participants than conditions. A mixed model can also specify directly how measurements relate over time.

Planning a Study That Uses It

Earlier conditions can affect later ones through fatigue, practice, or lingering effects.19PubMed. Counterbalancing for serial order carryover effects in experimental condition orders Varying the order of conditions across people, called counterbalancing, is essential.19PubMed. Counterbalancing for serial order carryover effects in experimental condition orders In taste trials, balanced order schemes can cancel carryover even when each person tries only some products.20Food Quality and Preference. Designing consumer trials balanced for first and higher orders of carry-over effect when only a subset of k samples from t may be tested

If every person does condition A first, practice or tiredness gets mixed in with the differences between conditions. Counterbalancing spreads these order effects evenly so they average out.

For three conditions, list all six possible orders of A, B, and C and assign roughly equal numbers of participants to each. Add rest periods between conditions to reduce lingering effects. In time-based designs where the order can’t change, practice effects belong in the interpretation.

A washout period is a gap long enough for the effect of one condition to fade before the next begins. The right length depends on the treatment, such as how long a drug stays active, so choose it from what is known about that treatment. If effects may never fully fade, a design with several conditions per person may be a poor choice.

Repeated measures can cut the required sample size well below a two-group comparison.21PubMed Central. Conservative Sample Size Determination for Repeated Measures Analysis of Covariance With 2, 3, or 4 follow-up measurements, one pre-post trial approach needed at least 44%, 56%, or 61% fewer people.21PubMed Central. Conservative Sample Size Determination for Repeated Measures Analysis of Covariance Power also depends on how strongly the repeated scores relate, so estimate that before planning.22PubMed. Statistical power for the two-factor repeated measures ANOVA

Plan for dropouts too. Recruit extra people to cover expected missing visits, and record reasons for dropout to judge whether they’re random. Decide in advance whether a mixed model will be the main analysis.