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

  1. 01

    Open wide-format data

    Open a file with one row per subject and one column per measurement, then switch to Statistics mode.

  2. 02

    Choose GLM Repeated Measures

    In the General linear model group, pick GLM Repeated Measures.

  3. 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.

  4. 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.

  5. 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.

  6. 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.

Try with example data

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.

Mauchly's Test of Sphericity
Within Subjects EffectMauchly's WApprox. Chi-SquaredfSig.Greenhouse-GeisserHuynh-FeldtLower-bound
time0.6216.6652.0360.7250.7830.500
Tests of Within-Subjects Effects
SourceCategoryType III Sum of SquaresdfMean SquareFSig.Partial Eta Squared
timeSphericity Assumed658.132.000329.0720.111<.0010.573
Greenhouse-Geisser658.131.451453.7120.111<.0010.573
Huynh-Feldt658.131.565420.4520.111<.0010.573
Lower-bound658.131.000658.1320.111<.0010.573
Error(time)Sphericity Assumed490.8830.00016.36
Greenhouse-Geisser490.8821.75922.56
Huynh-Feldt490.8823.48020.91
Lower-bound490.8815.00032.73
Pairwise Comparisons: time
(I) time(J) timeMean Difference (I-J)Std. ErrorSig.95% CI
124.40*0.888<.0012.01 to 6.79
139.07*1.619<.0014.71 to 13.43
21−4.40*0.888<.001−6.79 to −2.01
234.67*1.652.0380.22 to 9.12
31−9.07*1.619<.001−13.43 to −4.71
32−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.

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.

Open the workspace

SPSS is a trademark of IBM Corp. Crosstabs is not affiliated with or endorsed by IBM.