# How To Do One-Way ANOVA For Repeated Measures in SPSS

In this lesson, we will learn how to perform one-way ANOVA for repeated measures in SPSS. To keep things interesting, we will spice our analysis and include between-subject and within-subject factors to ensure we cover most scenarios.

Since practice is the best teacher, you can download the sample SPSS dataset I will use in this lesson below and follow along. When prompted for the password type: uedufy

## Lesson Outcomes

In a nutshell, these are the topics I expect you to master once complete this lesson:

• Know when to use repeated measures ANOVA for one-way and two-way.
• Understand the assumptions of repeated measures ANOVA.
• Perform one-way ANOVA for repeated measures in SPSS using the between-subjects and within-subject factors.
• Interpret the repeated measures ANOVA results in SPSS

Get a cup of coffee or tea and let’s learn something new today!

## When To Use One-Way Repeated Measures ANOVA?

ANOVA for repeated measures is used when we want to compare the mean scores between three or more groups on different observations, unlike the T-Test analysis which is usually used to compare the mean of one group to another.

Here is what your study should have to require one-way ANOVA for repeated measures analysis:

• one group of respondents measured using the same scale on three or more different periods OR each participant measured using at least three different items (e.g., questions) using the same response scale.
• One categorical independent variable (also known as a repeated factor).
• One continuous dependent variable is used to repeat observations also known as a repeated measure.

Confused? Let’s fix that by looking to a repeated measure design case study next.

Assuming we want to test the efficacy of two weight-loss diet programs (e.g., low-carb and low-fat), and 3 repeated periods: 1st Period (before starting the diet); 2nd Period (after 30 days), and 3rd Period (after 90 days).

We can design this study to include 50 participants, divided into two groups of 25 participants each. A participant can be part of one group only and only one diet program will be applied to each group.

Here how the dataset for this case study looks like in the SPSS Data View tab:

And here is the Variable View tab in SPSS:

The independent variable in this example is the [diet] Program which consists of two levels: low-carb and low-fat diets. The dependent variable is 1st Period, 2nd Period, and 3rd Period. We also have the ID where each respondent in the study is associated with a unique number.

Since this study has one independent variable and we plan to measure the diet effects for the same participants in two different groups over three-period points, the one-way ANOVA for repeated measures would be the right approach.

Before preceding with the ANOVA for repeated measures analysis, it is important to make sure we align with the required assumption for the ANOVA test:

• Independence: all observations must be independent therefore each group in the study must have unique participants. A participant can only be part of one group and there is no way the subject can influence members of another group.
• Sphericity: the variance between groups must be equal.
• Normality: data must have a multivariate normal distribution in the population under study.

Alright. With that out of the way, it is time to launch SPSS, and finally, have some fun!

## Perform One-Way ANOVA For Repeated Measures in SPSS [Practice]

Import the dataset you downloaded earlier in SPSS by navigating to Open → Data and selecting the .sav file or simply double-click on the .sav file to automatically open it in SPSS.

Here are the steps to conducting one-way repeated measures ANOVA analysis in SPSS:

1. Navigate to Analyze → General Linear Model → Repeated Measures in the SPSS top menu.
2. On the Repeated Measure Define Factor(s) window, specify:
• The Within-Subject Factor Name, e,g., Period or Time Frame. You can rename the name with something appropriate in the case is needed.
• The Number of Levels respectively the number of dependent variables in the study. In our case, this is three.
• Click the Add button to move the factor and the defined variables into the respective box.
1. Click the Define button.
1. In the Repeated Measures window we have to specify in the right order a dependent variable for each Within-Subjects Variables

For instance, In our SPSS sample dataset, we have three dependent variables representing three periods: 1st Period, 2nd Period, and 3rd Period. In your study, these

The 1st Period will be moved to the _?_(1) position, the 2nd Period to the _?_(2) position, the 3rd Period to _?_(3), and so on. You can select each variable and use the arrow to move it in the appropriate box or even easier, use the mouse to drag and drop each dependent variable to its appropriate position.

4. Add the independent variable of interest to the Between-Subject Factor(s) box. In our case, the independent variable is the Program

Before we proceed with the one-way ANOVA for repeated measures in SPSS, we need to change some settings for the analysis. Click on the Plots button.

1. On the Profile Plots window, move the independent factor (Program) to the Horizontal Axis box, and the dependent factor (Period) to the Separate Lines box. Click the Add button.

The Plots box will get populated. For instance, for our dataset, the plot should be Program*Period as in the picture below.

Click Continue. You should be back at the Repeated Measures: Options window.

Since we only have two levels for the independent variable (Low Carbs and Low Fat Diets) we do not need to run the Post Hoc test (also known as the multiple comparison test). However, if the ANOVA for repeated measures analysis consists of three or more groups, a Post Hoc test is necessary to investigate which groups’ mean is different and control the familywise error rate. This is only the case when the ANOVA P-value is significant for the means of all groups.

1. Next, click on the EM Means (Estimated Marginal Means) button. Here we need to adjust the following settings:
• We want to see the means for the dependent variable so move the Period to the Display Means box.
• Check the Compare main effects checkbox.
• Select the Bonferroni on the Confidence interval adjustment drop-down menu.

The Bonferroni correction is the simplest way to control the risk of encountering the type I error (false-positive) and rejecting the null hypothesis when is actually true.

Click Continue to save the settings and exit the EM Means window.

1. [Optional] Once on the Repeated Mesures: Options, click on the Options button and make sure the following checkboxes are checked:
• Descriptive statistics
• Estimates of effect size
• Homogeneity tests

Click Continue to save the settings and exit the Options window.

1. Finally, on the Repeated Measures window, click OK to proceed with the ANOVA for repeated measures analysis in SPSS.

## Interpret ANOVA for Repeated Measures Output in SPSS

1. The first table in the ANOVA repeated measures output is Within-Subjects Factors which is represented by three periods, respectively 1st Period, 2nd Period, and 3rd Period in our example.
1. The Between-Subjects Factors table shows the treatments (conditions) applied to the subjects. In our examples, these conditions are Low Carbs Diet and Low Fat Diet. We can also observe that the population N is equal for both treatments (N = 25 subjects).
1. In the Descriptive Statistics table we can see that the mean is overall higher in the 1st Period (Total Mean = 54.76), followed by the 2nd Period (Total Mean = 45.74) and 3rd Period (42.16) which can indicate a link between the diet programs and weight loss of the participants.

Moreover, when we look at the mean between the groups for each diet program, we can observe that the mean for Low Carbs Diet group is lower than that of the Low Fat Diet group which may indicate that a low carbs diet program is more efficient – with the exception of 1st Period where the means between the two programs are the closest.

1. The Box’s Test of Equality of Covariance Matrices test also known as the Box’s M Test is a parametric test for comparing variability in multivariate samples. This test explicitly checks to see whether two or more covariance matrices are homogeneous (equal).

As seen in the output below, the Box’s Test result is 14.961, and the Significance P-value of 0.030. It is important to keep in mind that the Box’s Test α level is 0.01 (Significant if <0.01). Therefore we have a Box’s Test that has a non-statistical significant output of 0.030. Therefore, we fail to reject the null hypothesis and meet the equal population covariance matrices assumption.

1. The Multivariate Test shows us the overall mean difference in the repeated measures. The multivariate test implies observational independence and multivariate normality. One advantage of using the Multivariate Test is that it does not imply sphericity, as the univariate approach does – as the case in this example.

The Multivariate Test is conducted using four different test statistics (Pillai’s Trace, Wilks’ Lambda, Hotelling’s Trace, and Roy’s Largest Root) which provide basically the same information. The most important metric here is the P-value (Sig. column) with values across all statistical tests for Period and Period*Program of 0.000 therefore statistically significant (Significant if <0.05)

1. Mauchly’s Test of Sphericity test determines if the variances between all differences between all possible pairs of groups are equal (whether the sphericity assumption is violated or not).

The Mauchly’s Test has an α level of 0.05 and to meet the sphericity assumption we need to have a value greater than that. In our case, the calculated P-value is 0.02 therefore we are not meeting the sphericity assumption.

1. The Tests of Within-Subjects Effects test determines if there were any significant differences between means at any point in time. As with the previous tests, the Sphericity Assumed has an α level of 0.05, and a P-value <0.05 shows statistical significance.

In our case, we can assume sphericity for both Period and Period * Program.

1. The Tests of Within-Subjects Contrasts test determines if there was a statistically significant change between the means at various time points and is useful when performing trend analysis. The Tests of Within-Subjects Contrasts has an α = 0.05. In our case study, we can see that Period and Period * Program are statistically significant with P-values <0.05 as highlighted in the table below.
1. Levene’s Test of Equality of Error Variances tests the homogeneity of variance by comparing the variances of two or more groups given a variable. Levene’s Test of Equality of Error Variances has an α level of 0.05 where any P-value lower than 0.05 violates the homogeneity of variance assumption.

Looking at Levene’s Test of Equality of Error Variance output for our case study, we can see that all P-values are >0.05 therefore we do not violate the assumption of homogeneity of variance.

1. The Tests of Between-Subjects Effects investigates the differences between respondents. The Tests of Between-Subjects Effects have an α level of 0.05. Here we are looking at the effect of the Program variable which shows no statistical significance at P-value = 0.253 as only 0.027 (Partial Eta Squared) of the variance in the dependent variable can be explained by the Program variable.
1. The Estimated Margin Means table shows us an estimate summary for the mean and standard error for each period as well as the lower and upper bound values at a 95% confidence interval. You can observe that the Mean in the Estimates table is actually the equivalent of the Total Mean in the Descriptive Statistics table (3).
1. The Pairwise Comparison test determines if there are any statistical differences between the pairs – in our case the three Periods of the study. You can see that we have statistical significance between each pair (P-value <0.05).

12. Finally, the Multivariate Test table shows us a similar output as the Multivariate Test we discussed earlier (5) and shows statistical significance for all the different test statistics used in the ANOVA for repeated measures analysis.

## Key Takeaways

Before you decide to proceed with the next lesson, here are some important things to remember:

• ANOVA for repeated measures is useful when looking to compare the mean scores between three or more groups on different observations. For comparing the means between two groups, the sample T-Test is sufficient.
• One-way repeated measures ANOVA test is used when a repeated measure design study consists of one independent variable while with the two-way repeated measures ANOVA we use two predictors.
• To be able to conduct the repeated measures ANOVA test, the study repeated measure design should consist of at least one categorical independent variable and one continuous dependent variable.

## References

Cohen, J. (1988). Statistical power for the behavioral sciences (2nd edition). Lawrence Earlbaum: Hillsdale, NJ.

Field, A. (2018). Discovering statistics using IBM SPSS statistics (5th edition). Sage: Thousand Oaks, CA.

Pallant, J. (2010). SPSS survival manual: A step-by-step guide to data analysis using SPSS. Maidenhead: Open University Press/McGraw-Hill.

Pituch, K.A. and Stevens, J.P. (2016) Applied Multivariate Statistics for the Social Sciences.