How do I perform a non-standard comparison of means in a repeated measures anova in SPSS ?

Suppose we have five measurements at different time points measured on a sample of people. We wish to compare the average of the first three time point measurements with the average of the last two. This is not one of the default contrasts in SPSS so we need literally something special to compute them.

This can be done in SPSS using the below syntax which uses the special option in the MANOVA procedure or by using GLM syntax. The MANOVA syntax is a bit cumbersome in that you need to specify a 5 x 5 matrix of contrasts (in general a k x k for k repeated measures). The contrasts need to be orthogonal so the sum of their products should equal zero. One tip is to use a row of '1s' for the first contrast. The actual contrast of interest here is the second specified contrast = (-0.333,-0.333,-0.333,0.5,0.5).

MANOVA A B C D E
 /WSFACTORS = TIME(5)
 /CONTRAST (TIME)= SPECIAL(1 1 1 1 1 -0.333 -0.3333 -0.333  0.5 0.5 1 -1 0 0 0 1 0-1 0 0 0 0 0 1 -1)
/PRINT = TRANSFORM PARAMETERS(ESTIM) 
/WSDESIGN. 

The output will include something like this for each of the k contrasts whjich SPSS calls T1 to Tk. Since the contrast of interest is the second contrast we look in the output for T2.

Contrast T2 tests whether the difference between the first three means and the last two means equals zero.

Parameter

Coeff.

Std. Err.

t-value

Sig. t

Lower -95%

% CL- Upper

1

-0.45323949

.43002

-1.05400

.31448

-1.39970

.49322

Note that SPSS orthonormalises the contrast coefficients which simply signifies the squares of the contrast coefficients sum to unity. The contrast coefficients can be outputted using the /PRINT=TRANSFORM subcommand and are in our case (-0.365,-0.365,-0.365,0.548,0.548). Notice the first three contrast vector elements and last two elements are equal confirming we wish to compare the first three and last two means.

Multiplying each of the elements in this contrast vector by the five time means gives -0.365(4.1666 + 4.25 + 4.583) + 0.548(4.333+3.5) = 0.45 = the outputted contrast coefficient above.