f

#### Repeated Measures contrast comparison. Error #12265 Singular matrix

```I am trying to do a user-specified contrast in a single factor repeated mea=
sures design.

These are fictions data.  This is a one-way, repeated measures with measure=
s at four time points.  Variables are:  Time 1, Time 2, Time 3, Time 4, N =
=3D 10. =20

There is essentially no difference from T1 to T2.  Improvement at T3.  More=
improvement at T4. =20

I want syntax for a contrast comparison for the following:

T1 & 2 vs 3
T1 & 2 vs 4
3 vs 4

Here is the syntax I=E2=80=99m using:

MANOVA time1 time2 time3 time4
/TRANSFORM(time1 time2 time3 time4)=3DSPECIAL (1 1 1 1, -1 -1 2 0, -1 -1 0 =
2, 0 0 1 -1)
/RENAME=3Dskip one2vs3 one2vs4 threevs4.

Here is the error message:

Error # 12265
>Singular matrix for MANOVA--The special transformation matrix is singular.
>The analysis is terminated.

The problem appears to be with the last contrast:  0 0 -1 1

If I change it to anything else, the syntax works.  For example, it works i=
f I replace the last comparison with any of the following:

1 0 -1 0
0 -1 -1 2
-1 0 0 1

And on and on=E2=80=A6

Thoughts?
```
 0
KSM
11/12/2016 8:43:42 PM
comp.soft-sys.stat.spss 5679 articles. 0 followers.

2 Replies
516 Views

Similar Articles

[PageSpeed] 35

```On Sat, 12 Nov 2016 12:43:42 -0800 (PST), KSM <kand.mcqueen@gmail.com>
wrote:

>I am trying to do a user-specified contrast in a single factor repeated measures design.
>
>These are fictions data.  This is a one-way, repeated measures with measures at four time points.  Variables are:  Time 1, Time 2, Time 3, Time 4, N = 10.
>
>There is essentially no difference from T1 to T2.  Improvement at T3.  More improvement at T4.
>
>I want syntax for a contrast comparison for the following:
>
>T1 & 2 vs 3
>T1 & 2 vs 4
>3 vs 4
>
>Here is the syntax I’m using:
>
>MANOVA time1 time2 time3 time4
>/TRANSFORM(time1 time2 time3 time4)=SPECIAL (1 1 1 1, -1 -1 2 0, -1 -1 0 2, 0 0 1 -1)
>/RENAME=skip one2vs3 one2vs4 threevs4.
>
>Here is the error message:
>
>Error # 12265
>>Singular matrix for MANOVA--The special transformation matrix is singular.
>>The analysis is terminated.
>
>The problem appears to be with the last contrast:  0 0 -1 1

That is because it is, in its effect, exact the same as the
difference, (contrast 1 minus contrast 2), so the matrix
is singular.

If that isn't obvious: Your groups 1&2  are treated together, so
imagine that you have only 3 groups.  With 3 groups, you can
only have two independent contrasts since the d.f  is 2.

So you could not, independently, contrast 1 to 2, 1 to 3, and 2 to 3.
That's what your dependency looks like.

>
>If I change it to anything else, the syntax works.  For example, it works if I replace the last comparison with any of the following:
>
>1 0 -1 0
>0 -1 -1 2
>-1 0 0 1
>
>And on and on…
>
>Thoughts?

--
Rich Ulrich

```
 0
Rich
11/12/2016 9:47:58 PM
```On Saturday, November 12, 2016 at 3:43:45 PM UTC-5, KSM wrote:
> I am trying to do a user-specified contrast in a single factor repeated m=
easures design.
>=20
> These are fictions data.  This is a one-way, repeated measures with measu=
res at four time points.  Variables are:  Time 1, Time 2, Time 3, Time 4, N=
=3D 10. =20
>=20
> There is essentially no difference from T1 to T2.  Improvement at T3.  Mo=
re improvement at T4. =20
>=20
> I want syntax for a contrast comparison for the following:
>=20
> T1 & 2 vs 3
> T1 & 2 vs 4
> 3 vs 4
>=20
> Here is the syntax I=E2=80=99m using:
>=20
> MANOVA time1 time2 time3 time4
> /TRANSFORM(time1 time2 time3 time4)=3DSPECIAL (1 1 1 1, -1 -1 2 0, -1 -1 =
0 2, 0 0 1 -1)
> /RENAME=3Dskip one2vs3 one2vs4 threevs4.
>=20
> Here is the error message:
>=20
> Error # 12265
> >Singular matrix for MANOVA--The special transformation matrix is singula=
r.
> >The analysis is terminated.
>=20
> The problem appears to be with the last contrast:  0 0 -1 1
>=20
> If I change it to anything else, the syntax works.  For example, it works=
if I replace the last comparison with any of the following:
>=20
> 1 0 -1 0
> 0 -1 -1 2
> -1 0 0 1
>=20
> And on and on=E2=80=A6
>=20
> Thoughts?

I think that if you restructure your data from WIDE to LONG, and then use M=
IXED to carry out the analysis, you might find its TEST sub-command easier =
to work with than the special contrasts from either MANOVA or GLM.  E.g.,=
=20

COMPUTE Case =3D \$CASENUM.
FORMATS Case (F5.0).
VARSTOCASES
/MAKE Y FROM Time1 Time2 Time3 Time4
/INDEX=3DTime(4)=20
/KEEP=3DCase=20
/NULL=3DKEEP.

MIXED Y BY Time
/FIXED =3D Time
/REPEATED =3D Time | SUBJECT(Case) COVTYPE(CS)
/EMMEANS TABLES(Time) COMPARE
/TEST "[1,2] v 3" ALL 0 1 1 -2 0
/TEST "[1,2] v 4" ALL 0 1 1 0 -2
/TEST "3 v 4" ALL 0 0 0 1 -1
..

HTH.
```
 0
Bruce
11/14/2016 2:28:41 PM