Written and maintained by CASRAI Editorial Board
Last updated
Repeated-measures ANOVA in SPSS runs through Analyze > General Linear Model > Repeated Measures, and it needs three things set up correctly before the F-test means anything: your data in wide format (one column per condition), a within-subjects factor defined with the right number of levels in the right order, and a read of Mauchly’s Test of Sphericity before you trust the uncorrected output row. This guide walks through the setup itself — the part that trips people up before the statistics even start — and points to CASRAI’s dedicated guide for the sphericity decision once you get there.
Get the data into wide format first
SPSS’s Repeated Measures procedure needs wide-format data: one row per subject, and one column for each condition or timepoint (e.g., score_time1, score_time2, score_time3). This is the opposite of the long format some other tools and some SPSS procedures expect, where each subject contributes multiple rows — one per condition — with a separate variable identifying which condition that row belongs to.
If your data arrived in long format (common when it’s exported from a database, a survey platform, or R), restructure it first via Data > Restructure > Convert selected cases from rows to columns, or rebuild it manually before you open the Repeated Measures dialog. Submitting long-format data to this procedure doesn’t produce a clear error — SPSS will simply treat whatever variables you select as if they were your conditions, so the output looks plausible while measuring the wrong thing entirely. If a “repeated measures” run produces a result that doesn’t match your expected number of levels, checking the data layout is the first thing to rule out.
Defining the within-subjects factor
Go to Analyze > General Linear Model > Repeated Measures. This opens the Repeated Measures Define Factor(s) dialog before the main procedure window — SPSS needs the factor structure defined before it can offer you variables to assign to it:
- Within-Subject Factor Name — a short label for what varies across your conditions (e.g.,
time,condition,trial). This is a name you’re assigning, not a variable already in your dataset. - Number of Levels — how many conditions or timepoints that factor has (e.g.,
3for a pre/mid/post design). - Click Add to register the factor. You can define more than one within-subjects factor here for a factorial repeated-measures design (e.g., a
timefactor crossed with aconditionfactor) — add each one the same way before continuing. - Measure Name is optional and only matters if you have more than one dependent variable measured repeatedly (e.g., both accuracy and reaction time at each timepoint) — give each its own measure name so the output labels them distinctly.
Click Define to open the main Repeated Measures dialog. Here, move your level variables — the actual wide-format columns, e.g. score_time1, score_time2, score_time3 — into the Within-Subjects Variables box. The order you move them in matters: SPSS assigns them to Level 1, Level 2, Level 3 (and so on) strictly in the order you select them, not by any property of the variable itself. If your conditions have a meaningful order (a time sequence, an intensity ramp), moving them in the wrong order silently mislabels which level is which in every table that follows — there’s no on-screen warning, since SPSS has no way to know your intended order.
If your design also has a between-subjects grouping variable (e.g., treatment vs. control measured at the same three timepoints — a mixed design), move it into the Between-Subjects Factor(s) box in the same dialog. This is what produces the within-subjects × between-subjects interaction row in the output, which needs to be read before either main effect the same way a factorial two-way ANOVA’s interaction row does.
Options worth setting before you click OK
In the Options tab: check Descriptive statistics for condition means and SDs, and Estimates of effect size to get partial eta-squared alongside the F-test rather than computing it by hand afterward. If you need pairwise follow-up comparisons between levels of the within-subjects factor once the omnibus test is significant, move the factor into Display Means for and check Compare main effects with a Bonferroni or Sidak adjustment — the separate Post Hoc tab in this dialog only applies to between-subjects factors, so it stays greyed out for a purely within-subjects design; that’s expected behavior, not a bug.
Read Mauchly’s test before you read anything else
Once you run the procedure, SPSS produces several tables. Before looking at the F-test itself, find the table titled Mauchly’s Test of Sphericity — it appears automatically for any within-subjects factor with three or more levels (it’s skipped for exactly two levels, since sphericity is trivially met with only one pairwise difference to compare). Its Sig. value decides whether you’re allowed to report the uncorrected “Sphericity Assumed” row of the results table that follows, or whether you need a corrected row instead.
CASRAI has a dedicated guide to this exact table — Mauchly’s Test of Sphericity in SPSS — covering what Mauchly’s W and each epsilon column mean, and it’s worth reading in full rather than summarized here. The short version needed to keep moving through setup: a significant Mauchly’s test (Sig. below .05) means sphericity is violated and you report a corrected row; a non-significant result (Sig. .05 or above) means you can report the uncorrected row as-is.
Applying the correction SPSS already computed for you
SPSS doesn’t make you choose a correction before running the analysis — the Tests of Within-Subjects Effects table it produces already contains all four rows (Sphericity Assumed, Greenhouse-Geisser, Huynh-Feldt, and Lower-bound) for every within-subjects effect, every time. Your job is only to pick which single row to report, using the Mauchly’s result above plus the decision rule covered in full on the Mauchly’s test guide: Greenhouse-Geisser when its epsilon is below .75, Huynh-Feldt when it’s .75 or above. All four rows share the identical F-value — only the degrees of freedom and, as a result, the Sig. value differ between them — so the one thing to never do is mix a corrected df with a different row’s p-value.
Reporting the result
Report the F-value together with the degrees of freedom and Sig. from the single row your sphericity decision points to, plus the epsilon value if you applied a correction, using the standard pattern: “Mauchly’s test indicated the assumption of sphericity had been violated, χ²(2) = 9.86, p = .007, so degrees of freedom were corrected using Greenhouse-Geisser estimates (ε = .70). There was a significant effect of time, F(1.40, 25.20) = 5.42, p = .018.” If your sphericity test wasn’t significant, drop the correction clause and report the Sphericity Assumed row’s integer degrees of freedom instead.
Common setup mistakes
- Long-format data run as if it were wide. The procedure doesn’t error — it just produces a within-subjects test on whatever variables you handed it, which usually isn’t your actual conditions. Check the data layout first if a result looks implausible.
- Level variables added to the Within-Subjects Variables box out of order. SPSS labels them Level 1, 2, 3… by selection order, not by variable name or column position in the dataset.
- Expecting the Post Hoc tab to work for the within-subjects factor. It’s for between-subjects factors only. Within-subjects follow-up comparisons come from the Options tab’s Compare main effects setting instead.
- Reading a main effect before checking a significant interaction. In a mixed design, a significant within-subjects × between-subjects interaction changes what either main effect is allowed to mean on its own — the same logic that applies in a two-way ANOVA.
- Skipping Mauchly’s test because the design “looks fine.” It’s printed automatically and costs nothing to check; the uncorrected row is anti-conservative exactly when sphericity is violated, which is not something you can eyeball from the data.
Frequently asked questions
Do group sizes need to be equal for a repeated-measures ANOVA?
No group-size balance requirement applies the way it can for a between-subjects design, since every subject serves as their own control across all levels of the within-subjects factor. What does matter is complete data: a case missing any one level’s score is excluded from the whole within-subjects analysis by default (listwise deletion), which can shrink your effective sample more than expected if missingness isn’t random.
Can I have more than one within-subjects factor?
Yes — define both in the Repeated Measures Define Factor(s) dialog (e.g., a time factor and a separate condition factor), and assign each wide-format variable to the correct combination of levels in the main dialog. SPSS then reports sphericity and its correction separately for each within-subjects effect that has three or more levels, including the interaction between the two factors.
What if my design mixes within-subjects and between-subjects factors?
That’s a mixed design, and it uses the same Repeated Measures procedure — add the grouping variable to the Between-Subjects Factor(s) box alongside your within-subjects factor definition. The output adds an interaction row between the two, which needs to be read before either main effect on its own.
Do I still need to check sphericity with only two levels?
No. Sphericity requires at least three levels to be a meaningful constraint — with two levels there’s only one pairwise difference, so the assumption is automatically satisfied and SPSS won’t print a Mauchly’s Test row for that effect.
Why does SPSS give me a non-integer degrees of freedom?
Because you’re reading a sphericity-corrected row. Greenhouse-Geisser and Huynh-Feldt both work by multiplying the uncorrected degrees of freedom by an epsilon value between 0 and 1, which is why the corrected df come out as decimals (e.g., 1.40 rather than 2) rather than whole numbers — that’s expected, not a sign anything went wrong.
Related CASRAI guides
For the full read of the sphericity check itself — Mauchly’s W, the epsilon columns, and the complete Greenhouse-Geisser/Huynh-Feldt decision rule with worked examples — see Mauchly’s Test of Sphericity in SPSS. For the underlying logic of the F-test and how repeated-measures designs relate to one-way and two-way ANOVA, see CASRAI’s ANOVA guide and the ANOVA dictionary term. For the non-repeated designs this procedure is often confused with, see one-way ANOVA in SPSS and two-way ANOVA in SPSS; for the two-timepoint, two-group case, see CASRAI’s t-test in SPSS guide. For software background, see what SPSS is and who uses it, or compare it against alternatives in SPSS vs. R, SPSS vs. Stata, and jamovi vs. JASP (both free, SPSS-menu-style alternatives). For the effect-size figures this procedure can output, see the effect size term.








