What does repeated measures ANOVA tell you?

Repeated measures ANOVA is used when you have the same measure that participants were rated on at more than two time points. With only two time points a paired t-test will be sufficient, but for more times a repeated measures ANOVA is required. For example, if you wish to track the progress of an exercise program on participants by weighing them at the beginning of the study and then every week after that for 6 weeks (a total of 7 time points) a repeated measures ANOVA would be required. This could also be used if the same participants are put through several conditions, for example, a study may test the effects of different colors of paper on memory. Participants are repeatedly ask to memorize lists of words written on either white, yellow, blue, or pink paper. If each participant goes through each condition, this would also be a repeated measures ANOVA.

One note on the second type of design, for this it is good to counterbalance by ensuring that participants are randomly assigned which color order they go through. Repeated measures tests are subject to issues of practices affects. Which means that participants may get better as they continue to repeat the same test, so randomizing the order of colors ensures order effects are not a confounding factor.

The benefits of repeated measures designs are that they reduce the error variance. This is because for these tests the within group variability is restricted to measuring differences between an individual’s responses between time points, not differences between individuals. Thus, researchers are better able to attribute differences across conditions or time points to being related to treatments or time factors, rather than to individual differences.

The traditional ANOVA formula is:

What does repeated measures ANOVA tell you?

The test statistic, F, where MSgroup is the mean squared error of between-group variance and MSerror is the mean squared error of within-group variance. When the repeated measures ANOVA is calculated the MSgroup is split in to two parts: the between-subjects variability and what variations remains after that. The final calculation subtracts the between-subjects variability which typically reduces the MSerror significantly, thus giving the test more power.

Assumptions:

Example: Performing a repeated measures ANOVA in R

In the following video, a repeated measures ANOVA is run to see if participants’ weight loss differs between a weight loss therapy program only, the program plus a walking regimen, or the program plus a biking regimen.

Dataset used in video
R script file used in video

What does repeated measures ANOVA tell you?

What does repeated measures ANOVA tell you?

Sample conclusion: After completing the repeated measures ANOVA we did find that there were differences for participants’ weight loss depending on the type of weight loss program they underwent (F(2,18)=6.73, p=.02). Using post-hoc testing with a Bonferroni correction we found that participants’ weight loss was significantly less with the no additional treatment than with the additional biking regimen (p=.04), or the walking regimen (p=.009), but the walking and biking regimen weight loss did not significantly differ (p=.74).

What does repeated measures ANOVA tell you?
report this ad

By Ruben Geert van den Berg

under ANOVA & Statistics A-Z

The null hypothesis for a repeated measures ANOVA is that 3(+) metric variables have identical means in some population.

What does repeated measures ANOVA tell you?

The variables are measured on the same subjects so we're looking for within-subjects effects (differences among means). This basic idea is also referred to as dependent, paired or related samples in -for example- nonparametric tests.
But anyway: if all population means are really equal, we'll probably find slightly different means in a sample from this population. However, very different sample means are unlikely in this case. These would suggest that the population means weren't equal after all.
Repeated measures ANOVA basically tells us how likely our sample mean differences are if all means are equal in the entire population.

  • Independent observations or, precisely, Independent and identically distributed variables;
  • Normality: the test variables follow a multivariate normal distribution in the population;
  • Sphericity: the variances of all difference scores among the test variables must be equal in the population. Sphericity is sometimes tested with Mauchly’s test. If sphericity is rejected, results may be corrected with the Huynh-Feldt or Greenhouse-Geisser correction.

We'll show some example calculations in a minute. But first: how does repeated measures ANOVA basically work? First off, our outcome variables vary between and within our subjects. That is, differences between and within subjects add up to a total amount of variation among scores. This amount of variation is denoted as SStotal where SS is short for “sums of squares”.
We'll then split our total variance into components and inspect which component accounts for how much variance as outlined below. Note that “df” means “degrees of freedom”, which we'll get to later.

What does repeated measures ANOVA tell you?

Now, we're not interested in how the scores differ between subjects. We therefore remove this variance from the total variance and ignore it. We're then left with just SSwithin (variation within subjects).
The variation within subjects may be partly due to our variables having different means. These different means make up our model. SSmodel is the amount of variation it accounts for.
Next, our model doesn't usually account for all of the variation between scores within our subjects. SSerror is the amount of variance that our model does not account for.
Finally, we compare two sources of variance: if SSmodel is large and SSerror is small, then variation within subjects is mostly due to our model (consisting of different variable means). This results in a large F-value, which is unlikely if the population means are really equal. In this case, we'll reject the null hypothesis and conclude that the population means aren't equal after all.

Repeated Measures ANOVA - Basic Formulas

We'll use the following notation in our formulas:

  • \(n\) denotes the number of subjects;
  • \(k\) denotes the number of variables;
  • \(Xij\) denotes the score of subject \(i\) on variable \(j\);
  • \(Xi.\) denotes the mean for subject \(i\);
  • \(X.j\) denotes the mean of variable \(j\);
  • \(X..\) denotes the grand mean.

Now, the formulas for the sums of squares, degrees of freedom and mean squares are $$SS_{within} = \sum_{i=1}^n\sum_{j=1}^k(Xij - Xi.)^2$$ $$SS_{model} = n \sum_{j=1}^k(X.j - X..)^2$$ $$SS_{error} = SS_{within} - SS_{model}$$ $$df_{model} = k - 1$$ $$df_{error} = (k - 1)\cdot(n - 1)$$ $$MS_{model} = \frac{SS_{model}}{df_{model}}$$ $$MS_{error} = \frac{SS_{error}}{df_{error}}$$ $$F = \frac{MS_{model}}{MS_{error}}$$

Repeated Measures ANOVA - Example

We had 10 people perform 4 memory tasks. The data thus collected are listed in the table below. We'd like to know if the population mean scores for all four tasks are equal.

Subjecttask1task2task3task4Subject Mean
187677
258566
365344.5
466735.5
5810868
665635
765234
899968.25
954374.75
1076656
Variable Mean6.66.55.555.9 (grand mean)

If we apply our formulas to our example data, we'll get $$SS_{within} = (8 - 7)^2 + (7 - 7)^2 + ... + (5 - 6)^2 = 63.5$$ $$SS_{model} = 10 \cdot((6.6 - 5.9)^2 + (6.5 - 5.9)^2 + (5.5 - 5.9)^2 + (5 - 5.9)^2) = 18.2$$ $$SS_{error} = 63.5 - 18.2 = 45.3$$ $$MS_{model} = \frac{18.2}{3} = 6.07$$ $$MS_{error} = \frac{45.3}{27} = 1.68$$ $$F = \frac{6.07}{1.68} = 3.62$$ $$P(F(3,27) > 3.62) \approx 0.026$$

The null hypothesis is usually rejected when p < 0.05. Conclusion: the population means probably weren't equal after all.

Repeated Measures ANOVA - Software

We computed the entire example in the Googlesheet shown below. It's accessible to all readers so feel free to take a look at the formulas we use.

What does repeated measures ANOVA tell you?

Although you can run the test in a Googlesheet, you probably want to use decent software for running a repeated measures ANOVA. It's not included in SPSS by default unless you have the advanced statistics option installed. An outstanding example of repeated measures ANOVA in SPSS is SPSS Repeated Measures ANOVA.
The figure below shows the SPSS output for the example we ran in this tutorial.

What does repeated measures ANOVA tell you?

Thus far, our discussion was limited to one-way repeated measures ANOVA with a single within-subjects factor. We can easily extend this to a factorial repeated measures ANOVA with one within-subjects and one between-subjects factor. The basic idea is shown below. For a nice example in SPSS, see SPSS Repeated Measures ANOVA - Example 2.

What does repeated measures ANOVA tell you?

Alternatively, we can extend our model to a factorial repeated measures ANOVA with 2 within-subjects factors. The figure below illustrates the basic idea.

What does repeated measures ANOVA tell you?

Finally, we could further extend our model into a 3(+) way repeated measures ANOVA. (We speak of “repeated measures ANOVA” if our model contains at least 1 within-subjects factor.)

Right, so that's about it I guess. I hope this tutorial has clarified some basics of repeated measures ANOVA.

Thanks for reading!