SPSS command: SPSS GLM WSFACTOR
Repeated measures ANOVA in your browser
Repeated measures ANOVA tests whether the mean of the same measure changes across time points or conditions within the same people.
Free · No account · Files stay on your device · Updated 18 October 2026
What it tells you
Crosstabs runs SPSS GLM with WSFACTOR on wide columns, with one or two within-subject factors and up to two between-subject factors, and reports Mauchly's test, the sphericity-corrected F tests, multivariate tests, polynomial contrasts and Bonferroni- or Šidák-adjusted comparisons.
- Whether scores change across the repeated measurements (the within-subject effect), using each person as their own control.
- Whether sphericity holds (Mauchly's test) and, if not, the Greenhouse-Geisser, Huynh-Feldt and lower-bound corrected F tests.
- Whether change over time differs between groups — the time × group interaction in a mixed (split-plot) design.
- The shape of change — linear, quadratic or higher-order polynomial contrasts across ordered levels.
When to use it
Use it when
- The same respondents rated the same item at three or more waves, or under several conditions, stored as one column per measurement.
- You also want to compare groups (for example treatment vs control) on their trajectories.
- Every subject has all measurements; the design is complete after listwise deletion.
Use something else when
- Only two measurements and no groups: the paired-samples t test is simpler and gives the same p value.
- Many respondents miss some waves, or time points differ by person: a linear mixed model uses all available data.
- Ordinal ratings or strongly non-normal differences with small samples: use the Friedman test.
- Data are in long format (one row per measurement): restructure to wide columns first, or use MIXED.
How to run it in Crosstabs
- 01
Open wide-format data
Open a file with one row per subject and one column per measurement, then switch to Statistics mode.
- 02
Choose GLM Repeated Measures
In the General linear model group, pick GLM Repeated Measures.
- 03
Define the within-subject factors
Under Within-subject factors, set the Factor name and Number of levels (2–12); use Add a second within-subject factor for a two-way within design.
- 04
Fill the within-subject variables
Click the measurement columns in order to fill each (level) slot; with two factors the last factor varies fastest.
- 05
Add groups and options
Optionally tick up to two Between-subject factors, choose the Sum of squares type and Compare estimated marginal means (LSD (none), Bonferroni or Šidák), and tick Observed power if needed.
- 06
Run analysis
Click Run analysis. Subjects missing any measurement are excluded listwise.
Worked example
Computed by the Crosstabs engine from the synthetic data below when this page was built — not typed in.
Data
16 synthetic participants with an anxiety score at weeks 0, 4 and 8, stored as three wide columns (week0, week4, week8) and defined as one within-subject factor “time” with 3 levels. A person-level component makes the repeated scores correlate, and a person-specific improvement rate makes the variances of the differences unequal. Fixed seed.
| Within Subjects Effect | Mauchly's W | Approx. Chi-Square | df | Sig. | Greenhouse-Geisser | Huynh-Feldt | Lower-bound |
|---|---|---|---|---|---|---|---|
| time | 0.621 | 6.665 | 2 | .036 | 0.725 | 0.783 | 0.500 |
| Source | Category | Type III Sum of Squares | df | Mean Square | F | Sig. | Partial Eta Squared |
|---|---|---|---|---|---|---|---|
| time | Sphericity Assumed | 658.13 | 2.000 | 329.07 | 20.111 | <.001 | 0.573 |
| Greenhouse-Geisser | 658.13 | 1.451 | 453.71 | 20.111 | <.001 | 0.573 | |
| Huynh-Feldt | 658.13 | 1.565 | 420.45 | 20.111 | <.001 | 0.573 | |
| Lower-bound | 658.13 | 1.000 | 658.13 | 20.111 | <.001 | 0.573 | |
| Error(time) | Sphericity Assumed | 490.88 | 30.000 | 16.36 | |||
| Greenhouse-Geisser | 490.88 | 21.759 | 22.56 | ||||
| Huynh-Feldt | 490.88 | 23.480 | 20.91 | ||||
| Lower-bound | 490.88 | 15.000 | 32.73 |
| (I) time | (J) time | Mean Difference (I-J) | Std. Error | Sig. | 95% CI |
|---|---|---|---|---|---|
| 1 | 2 | 4.40* | 0.888 | <.001 | 2.01 to 6.79 |
| 1 | 3 | 9.07* | 1.619 | <.001 | 4.71 to 13.43 |
| 2 | 1 | −4.40* | 0.888 | <.001 | −6.79 to −2.01 |
| 2 | 3 | 4.67* | 1.652 | .038 | 0.22 to 9.12 |
| 3 | 1 | −9.07* | 1.619 | <.001 | −13.43 to −4.71 |
| 3 | 2 | −4.67* | 1.652 | .038 | −9.12 to −0.22 |
Based on estimated marginal means; Bonferroni adjustment. * Significant at the .05 level.
How to read it
Mauchly's W = 0.621 (p = .036) rejects sphericity, so the corrected rows are the ones to report; the Greenhouse-Geisser epsilon is 0.725. With sphericity assumed, time gives F(2, 30) = 20.11, p < .001; the Greenhouse-Geisser row, which shrinks both degrees of freedom by ε, gives F(1.45, 21.76) = 20.11, p < .001, partial η² = 0.573. The Bonferroni-adjusted pairwise comparisons show which weeks differ.
Output tables explained
- Mauchly's Test of Sphericity
- Mauchly's W, approximate chi-square, df and significance for each within-subject effect, with the Greenhouse-Geisser, Huynh-Feldt and lower-bound epsilons. Sphericity cannot be tested for a factor with only two levels.
- Tests of Within-Subjects Effects
- The averaged F tests with four rows per effect: Sphericity Assumed and the three epsilon-corrected versions, which keep F but shrink both df. Report the Greenhouse-Geisser row when Mauchly's test is significant.
- Multivariate Tests
- Pillai, Wilks, Hotelling and Roy tests of each within effect, which do not assume sphericity at all.
- Tests of Within-Subjects Contrasts
- Linear, quadratic and higher-order polynomial trends across the levels, each with its own error term.
- Tests of Between-Subjects Effects
- Group differences on the average of all measurements (transformed variable: average).
- Estimated Marginal Means and Pairwise Comparisons
- Means per level of each factor with standard errors and confidence intervals, adjusted pairwise differences, and a profile plot.
Assumptions and notes
- Subjects are independent of each other; measurements within a subject may correlate.
- Sphericity: the variances of all pairwise differences between levels are equal. When it fails, use the corrected rows or the multivariate tests.
- Residuals are roughly normal; with between-subject factors, the covariance matrices should be similar across groups.
- The panel takes no covariates; for covariate-adjusted repeated measures use a linear mixed model.
How the results are validated
One within factor is checked against pingouin 0.7 rm_anova (sums of squares to a relative 1e-10, F, Mauchly's W and the epsilons to 1e-9, Greenhouse-Geisser p to 1e-6); the mixed design against R 4.6 car 3.1.5 Anova with idata (between, averaged within and multivariate tests; p to 1e-7) and pingouin mixed_anova; two within factors against statsmodels 0.15 AnovaRM. Mauchly's significance follows the SPSS chi-square formula, and marginal means with Bonferroni comparisons match an independent implementation to 1e-10. Validation evidence
Questions
Which row of the within-subjects table should I report?
If Mauchly's test is not significant, report Sphericity Assumed. If it is, report Greenhouse-Geisser; when its epsilon is above about 0.75, Huynh-Feldt is less conservative. The multivariate tests are an alternative that needs no sphericity.
Why does Mauchly's test show W = 1 and no significance?
With two levels there is only one difference score, so sphericity holds by definition: W is 1, no p value is computed and the corrected rows equal the Sphericity Assumed row.
How do I enter a 2 × 3 within design?
Define the first factor with 2 levels and add a second with 3, then fill the six slots in the order shown: (1,1), (1,2), (1,3), (2,1), (2,2), (2,3).
What if some respondents missed a wave?
GLM drops them entirely (listwise). If that loses many cases, fit a linear mixed model to the long-format data with a repeated covariance structure instead.
Is my data uploaded?
No. The repeated measures model runs in your browser and the data stays on your device.
Related procedures
- Paired-Samples T TestT-TEST PAIRS
- Friedman TestNPAR TESTS /FRIEDMAN
- Linear Mixed ModelsMIXED
- GLM Multivariate (MANOVA)GLM
- Bayesian Repeated-Measures ANOVABAYES REPEATED
- GLM UnivariateUNIANOVA
- Free SPSS alternative: full coverage list
Run Repeated Measures ANOVA on your own data
Open a .sav, CSV or Excel file. Everything runs in your browser; the file never leaves your device.
SPSS is a trademark of IBM Corp. Crosstabs is not affiliated with or endorsed by IBM.