= 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 [[FAQ/glmrm| 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.
Estimates for T2
--- Individual univariate .9500 confidence intervals
TIME
||||||||||||||||