A repeated measures ANOVA is used to determine whether or not there is a statistically significant difference between the means of three or more groups in which the same subjects show up in each group.
This tutorial explains how to conduct a one-way repeated measures ANOVA in SPSS.
Example: Repeated Measures ANOVA in SPSS
Researchers want to know if four different drugs lead to different reaction times. To test this, they measure the reaction time of five patients on the four different drugs. Since each patient is measured on each of the four drugs, we will use a repeated measures ANOVA to determine if the mean reaction time differs between drugs.
Perform the following steps to conduct the repeated measures ANOVA in SPSS.
Step 1: Enter the data.
Enter the following data, which shows the response time (in seconds) of five patients on the four drugs:

Step 2: Perform a repeated measures ANOVA.
Click the Analyze tab, then General Linear Model, then Repeated Measures:

In the new window that pops up, type in the drug for the Within-Subject Factor Name. Type in 4 for the Number of Levels (since each subject in the study tested 4 different drugs), then click Add. Type in responseTime for the Measure Name, then click Add. Lastly, click Define.

In the new window that pops up, drag each of the four drug variables into the box labelled Within-Subjects Variables:

Next, click Plots. Drag the variable drug into the box labelled Horizontal Axis. Then click Add. Then click Continue.

Next, click EM Means. Drag the variable drug into the box labelled Display Means for. Then check the box next to Compare main effects and select Bonferroni from the dropdown menu. Then click Continue.

Lastly, click OK.
Step 2: Interpret the results.
Once you click OK, the results of the repeated measures ANOVA will appear. Here is how to interpret the output:
Tests of Within-Subjects Effects
This table displays the overall F-statistic and the corresponding p-value of the repeated measures ANOVA. Typically we use the values in the row titled Greenhouse-Geisser.
According to this row, the F-statistic is 24.759 and the corresponding p-value is .001. Since this p-value is less than .05, we can reject the null hypothesis and conclude that there is a statistically significant difference in mean response times between the four drugs.

Pairwise Comparisons
Since we rejected the null hypothesis, it means that at least two of the group means are different. To determine which group means are different, we can use this table that displays the pairwise comparisons between each drug.

From the table we can see the p-values for the following comparisons:
- drug 1 vs. drug 2 | p-value = 1.000
- drug 1 vs. drug 3 | p-value = .083
- drug 1 vs. drug 4 | p-value = .010
- drug 2 vs. drug 3 | p-value = .071
- drug 2 vs. drug 4 | p-value = .097
- drug 3 vs. drug 4 | p-value = .011
The only p-values below .05 are for drug 1 vs. drug 4 and drug 3 vs. drug 4. All of the other comparisons have p-values greater than .05.
Plot of Estimated Marginal Means
This plot displays the estimated mean response times for each drug. From the plot we can clearly see that response times varied noticeably between the four different drugs:

Step 3: Report the results.
Lastly, we can report the results of the repeated measures ANOVA. Here is an example of how to do so:
A one-way repeated measures ANOVA was performed to determine if the mean reaction time in patients differed between four different drugs.
A one-way repeated measures ANOVA revealed that the type of drug used lead to statistically significant differences in response time (F = 24.75887, p = 0.001).
Bonferroni’s test for multiple comparisons found that there was a statistically significant difference in response times between patients on drug 1 vs. drug 4 along with drug 3 vs. drug 4.
Hi Zach,
Thank you for the instruction. Could you please post an instruction on how to perform a 2 or 3-way ANOVA, repeated measurement since it might be more applicable in real life? Examples like clinical trials when they test different drugs (1st factor) on male vs female (2nd factor) over time (3rd factor) repeatedly (every week for a total of 20 weeks)? The outcome might be a level of cholesterol
That would be great if you can help out.
Cheers
Harvey
Please explain to me, where does that p value of 0.001 come from since we indicate the mean difference is at 0.05
Can Repeated Measures ANOVA be used to find the change in alcoholic behavior between pre and post test data
If I want to compare the interaction between the time points in 2 different groups, how can I do? Should I add any syntax in order to prove the critical timepoint of effect/improvement?
Please advice.
Thanks.
Hi Karlen…To compare the interaction between time points in two different groups in a **Repeated Measures ANOVA** in SPSS, you can analyze the **interaction effect** between the within-subjects factor (time) and the between-subjects factor (group). Here’s how you can do it:
—
### **Steps in SPSS GUI**
1. **Data Organization**:
– Ensure your data is organized with each time point as a separate variable (wide format).
– Include a column for the grouping variable (e.g., `Group`).
2. **Define the Repeated Measures Factor**:
– Go to **Analyze > General Linear Model > Repeated Measures**.
– In the **Repeated Measures Define Factor(s)** window:
– Define the within-subjects factor (e.g., `Time`) with the number of levels (e.g., 3 if there are three time points).
– Click **Add** and then **Define**.
3. **Assign Variables**:
– Assign your time point variables to the levels of the within-subjects factor you just defined.
4. **Add the Between-Subjects Factor**:
– In the next screen, add your grouping variable (e.g., `Group`) as the **Between-Subjects Factor**.
5. **Specify the Interaction**:
– In the **Model** tab, choose **Full factorial** or explicitly include the interaction term between `Time` and `Group`.
– Optionally, under the **Options** tab, request **Descriptive statistics**, **Estimates of effect size**, and **Pairwise comparisons** to identify specific effects.
6. **Run the Analysis**:
– Click **OK** to perform the Repeated Measures ANOVA.
—
### **SPSS Syntax for Interaction**
If you prefer using syntax, here’s how it can be done:
“`spss
GLM Time1 Time2 Time3 BY Group
/WSFACTOR=Time 3 Polynomial
/METHOD=SSTYPE(3)
/INTERCEPT=INCLUDE
/CRITERIA=ALPHA(0.05)
/WSDESIGN=Time
/DESIGN=Group Time*Group.
“`
– Replace `Time1`, `Time2`, and `Time3` with your variable names for the time points.
– Replace `Group` with your grouping variable name.
—
### **Identifying Critical Time Points**
To determine **specific time points** where significant effects occur:
1. **Post Hoc Tests**:
– In the **Options** tab of the Repeated Measures ANOVA dialog box, check **Pairwise comparisons** for the `Time` factor or the `Time*Group` interaction.
– This provides pairwise comparisons between time points and their interaction with the group.
2. **Profile Plots**:
– Generate plots for visualizing the interaction effect.
– Check **Plots** in the main dialog and set `Time` on the horizontal axis and `Group` as separate lines.
3. **Simple Effects Analysis**:
– Use syntax to explore specific pairwise comparisons within groups at each time point:
“`spss
EMMEANS=TABLES(Group*Time) COMPARE(Time) ADJ(BONFERRONI).
“`
This will generate adjusted pairwise comparisons for significant interactions.
—
### **Critical Notes**
– **Mauchly’s Test**: Check the assumption of sphericity. If violated, SPSS will apply corrections (e.g., Greenhouse-Geisser or Huynh-Feldt).
– **Effect Size**: Include partial eta squared in your output to assess the magnitude of the interaction effect.
– **Plots**: Use profile plots to visually identify critical changes across time points.
—
This approach will allow you to test the interaction between time and groups and identify specific time points where significant effects or improvements occur.