# Repeated Measures ANOVA (cont...)

## Calculating a Repeated Measures ANOVA

In order to provide a demonstration of how to calculate a repeated measures ANOVA, we shall use the example of a 6-month exercise-training intervention where six subjects had their fitness level measured on three occasions: pre-, 3 months, and post-intervention. Their data is shown below along with some initial calculations:

The repeated measures ANOVA, like other ANOVAs, generates an *F*-statistic that is used to determine statistical significance. The *F*-statistic is calculated as below:

You will already have been familiarised with SS_{conditions} from earlier in this guide, but in some of the calculations in the preceding sections you will see SS_{conditions} sometimes referred to as SS_{time}. They both represent the sum of squares for the differences between related groups, but SS_{time} is a more suitable name when dealing with time-course experiments, as we are in this example. The diagram below represents the partitioning of variance that occurs in the calculation of a repeated measures ANOVA.

In order to calculate an *F*-statistic we need to calculate SS_{conditions} and SS_{error}. SS_{conditions} can be calculated directly quite easily (as you will have encountered in an independent ANOVA as SS_{b}). Although SS_{error} can also be calculated directly it is somewhat difficult in comparison to deriving it from knowledge of other sums of squares which are easier to calculate, namely SS_{subjects}, and either SS_{T} or SS_{w}. SS_{error} can then be calculated in either of two ways:

Both methods to calculate the *F*-statistic require the calculation of SS_{conditions} and SS_{subjects} but you then have the option to determine SS_{error} by first calculating either SS_{T} or SS_{w}. There is no right or wrong method, and other methods exist; it is simply personal preference as to which method you choose. For the purposes of this demonstration, we shall calculate it using the first method, namely calculating SS_{w}.

## Calculating SS_{time}

As mentioned previously, the calculation of SS_{time} is the same as for SS_{b} in an independent ANOVA, and can be expressed as:

where *k* = number of conditions, *n*_{i} = number of subjects under each (i^{th}) condition, = mean score for each (i^{th}) condition, = grand mean. So, in our example, we have:

Notice that because we have a repeated measures design, *n*_{i} is the same for each iteration: it is the number of subjects in our design. Hence, we can simply multiple each group by this number. To better visualize the calculation above, the table below highlights the figures used in the calculation:

## Calculating SS_{w}

Within-groups variation (SS_{w}) is also calculated in the same way as in an independent ANOVA, expressed as follows:

where x_{i1} is the score of the i^{th} subject in group 1, x_{i2} is the score of the i^{th} subject in group 2, and x_{ik} is the score of the i^{th} subject in group k. In our case, this is:

To better visualize the calculation above, the table below highlights the figures used in the calculation:

## Calculating SS_{subjects}

As mentioned earlier, we treat each subject as its own block. In other words, we treat each subject as a level of an independent factor called subjects. We can then calculate SS_{subjects} as follows:

where k = number of conditions, mean of subject *i*, and = grand mean. In our case, this is:

To better visualize the calculation above, the table below highlights the figures used in the calculation:

## Calculating SS_{error}

We can now calculate SS_{error} by substitution:

which, in our case, is:

## Determining MS_{time}, MS_{error} and the *F*-statistic

To determine the mean sum of squares for time (MS_{time}) we divide SS_{time} by its associated degrees of freedom (*k - 1*), where *k* = number of time points. In our case:

We do the same for the mean sum of squares for error (MS_{error}), this time dividing by (*n - 1*)(*k - 1*) degrees of freedom, where *n* = number of subjects and *k* = number of time points. In our case:

Therefore, we can calculate the *F*-statistic as:

We can now look up (or use a computer programme) to ascertain the critical *F*-statistic for our *F*-distribution with our degrees of freedom for time (df_{time}) and error (df_{error}) and determine whether our *F*-statistic indicates a statistically significant result.

We can now look up (or use a computer programme) to ascertain the critical *F*-statistic for our *F*-distribution with our degrees of freedom for time (df_{time}) and error (df_{error}) and determine whether our *F*-statistic indicates a statistically significant result.

How to report the result of a repeated measures ANOVA is shown on the next page.