Search code examples
spsscontrast

Trying to calculate special contrast analysis in SPSS for rmANOVA but I keep getting the same error


my study design includes three Treatment groups (coded as 1, 2 and 3). I did a cognitive test before (KL_1) and after the Treatment (KL_2) and now want to calculate custom contrasts on if the three groups are different from each other and different from the other two groups combined.

Now I wrote the following Syntax (closely following the recommendations of Andy Field's "Discovering Statistics Using IBM SPSS Statistics"):

MANOVA

    KL_1 KL_2 BY Intervention_num (1 3)
    /WSFACTORS time (2)
    /CONTRAST (time)=special(1 1, 1 -1)
    /CONTRAST (Intervention_num) = special(1 1 1, 1 -2 1, -2 1 1, -1 1 0, 0 -1 1, -1 0 1) 
    /CINTERVAL JOINT (.95) MULTIVARIATE(BONFER)
    /METHOD UNIQUE
    /ERROR WITHIN+RESIDUAL
    /PRINT TRANSFORM HOMOGENEITY (BARTLETT COCHRAN BOXM)
         /SIGNIF (UNIV MULT AVERF)
         /PARAM (ESTIM EFSIZE).

And Keep getting the following error messages:

Note: there are 2 levels for the TIME effect.  Average tests are identical to the univariate tests of significance.


>Error # 12027 in column 64.  Text: -1
>There are too many elements in the vector or matrix specification.
>Execution of this command stops.

>Error # 12024 in column 64.  Text: -1
>The matrix in the CONTRAST subcommand is incorrect.

>Error # 12241 in column 6.  Text: SIGNIF
>An illegal subcommand was specified.  The valid subcommands are: WSFACTOR,
>TRANSFORM, WSDESIGN, PRINT, NOPRINT, PLOT, MATRIX, MEASURE, METHOD, ANALYSIS,
>PARTITION, CONTRAST, ERROR, MISSING, PMEANS, OMEANS, PCOMP, DISCRIM, RENAME,
>RESIDUALS, POWER, CINTERVAL, and DESIGN.

>Error # 12057 in column 13.  Text: ESTIM
>The factor name in PARTITION(factor) is incorrect.

I honestly can't figure out what they refer to and how to fix the issue. Any ideas?

Cheers, Ninke


Solution

  • So there were two issues:

    1. As @user45392 pointed out there was a punctuation error in the last two lines, there is not supposed to be a slash in front of PARAM and SIGNIF.

    2. The main issue was the number of the contrasts entered though. Apparently the MANOVA command won't take more contrasts than there are steps to the independent variable. With my three intervention variables I could only enter two additional contrasts additionally to the baseline contrast (1 1 1). The example Andy Field used had an independent variable with five steps, so he could enter four additional contrasts instead. Ended up copying the syntax and calculating the four most important contrasts two by two. Not quite beautiful, but it worked so I'll be pragmatic for once. If anyone has a more elegant solution feel free to add it.