Skip to content
Prev 65684 / 398506 Next

contrast matrix for aov

Prof Brian Ripley <ripley at stats.ox.ac.uk> writes:
Actually, that's not "usual" in SAS (and not SPSS either, I believe)
in things like

proc glm;
        model y1-y4= ;
        repeated row 2 col 2;

[Not that SAS/SPSS is the Gospel, but they do tend to set the
terminology in these matters.]

There you'd get the analysis split up as analyses of three contrasts
corresponding to the main effects and interaction, c(-1,-1,1,1),
c(-1,1,-1,1), and c(-1,1,1,-1) in the 2x2 case (up to scale and sign).
In the 2x2 case, this corresponds exactly to the 4-stratum model
row*col + Error(block/(row*col)).

(It is interesting to note that it is still not the optimal analysis
for arbitrary covariance patterns because dependence between contrasts
is not utilized - it is basically assumed to be absent.)

With more than two levels, you get the additional complications of
sphericity testing and GG/HF epsilons and all that.