Contrasts for WSFACTOR (GLM: Repeated Measures command)
The levels of a within-subjects factor are represented by different dependent variables. Therefore, contrasts between levels of such a factor compare these dependent variables. Specifying the type of contrast amounts to specifying a transformation to be performed on the dependent variables.
- In testing the within-subjects effects, an orthonormal transformation is automatically performed on the dependent variables in a repeated measures analysis.
- The contrast for each within-subjects factor is entered
after the number of levels. If no contrast keyword is specified,
POLYNOMIAL(1,2,3...)
is the default. This contrast is used in comparing the levels of the within-subjects factors. Intrinsically orthogonal contrast types are recommended for within-subjects factors if you wish to examine each degree-of-freedom test, provided compound symmetry is assumed within each within-subjects factor. Other orthogonal contrast types areDIFFERENCE
andHELMERT
. - If there are more than one within-subjects factors, the transformation matrix (M matrix) is computed as the Kronecker product of the matrices generated by the contrasts specified.
- The transformation matrix (M matrix) generated by the specified contrasts can be
displayed by using the keyword
TEST(MMATRIX)
on the subcommandPRINT
. - The contrast types available for within-subjects factors are the same as those on the
CONTRAST
subcommand for between-subjects factors, described in CONTRAST Subcommand (GLM: Univariate command).
The following contrast types are available:
DEVIATION. Deviations from the grand mean. This is
the default for between-subjects factors. Each level of the factor
except one is compared to the grand mean. One category (by default
the last) must be omitted so that the effects will be independent
of one another. To omit a category other than the last, specify the
number of the omitted category in parentheses after the keyword DEVIATION
. For example
GLM Y1 Y2 Y3 BY GROUP
/WSFACTOR = Y 3 DEVIATION (1)
Deviation contrasts are not orthogonal.
POLYNOMIAL. Polynomial contrasts. This is the default
for within-subjects factors. The first degree of freedom contains
the linear effect across the levels of the factor, the second contains
the quadratic effect, and so on. In a balanced design, polynomial
contrasts are orthogonal. By default, the levels are assumed to be
equally spaced; you can specify unequal spacing by entering a metric
consisting of one integer for each level of the factor in parentheses
after the keyword POLYNOMIAL
. (All metrics specified cannot be equal; thus (1,1,...,1) is not
valid.) For example:
/WSFACTOR=D 3 POLYNOMIAL(1,2,4).
Suppose that factor D has three levels. The specified contrast indicates that the three levels of D are actually in the proportion 1:2:4. The default metric is always (1,2,...,k), where k levels are involved. Only the relative differences between the terms of the metric matter (1,2,4) is the same metric as (2,3,5) or (20,30,50) because, in each instance, the difference between the second and third numbers is twice the difference between the first and second.
DIFFERENCE. Difference or reverse Helmert contrasts. Each level of the factor except the first is compared to the mean of the previous levels. In a balanced design, difference contrasts are orthogonal.
HELMERT. Helmert contrasts. Each level of the factor except the last is compared to the mean of subsequent levels. In a balanced design, Helmert contrasts are orthogonal.
SIMPLE. Each level of the factor except the last is compared
to the last level. To use a category other than the last
as the omitted reference category, specify its number in parentheses
following keyword SIMPLE
. For
example:
/WSFACTOR=B 3 SIMPLE (1).
Simple contrasts are not orthogonal.
REPEATED. Comparison of adjacent levels. Each level of the factor except the last is compared to the next level. Repeated contrasts are not orthogonal.
SPECIAL. A user-defined contrast. Values specified
after this keyword are stored in a matrix in column major order. For
example, if factor A has three levels, then WSFACTOR(A)=
SPECIAL(1 1 1
1 -1 0 0 1 -1)
produces the following contrast matrix:
1 1 0
1 –1 1
1 0 –1
Example
GLM X1Y1 X1Y2 X2Y1 X2Y2 X3Y1 X3Y2 BY TREATMNT GROUP
/WSFACTOR=X 3 Y 2
/DESIGN.
- The
GLM
variable list names six dependent variables and two between-subjects factors, TREATMNT and GROUP. -
WSFACTOR
identifies two within-subjects factors whose levels distinguish the six dependent variables. X has three levels, and Y has two. Thus, there are 3 × 2 = 6 cells in the within-subjects design, corresponding to the six dependent variables. - Variable X1Y1 corresponds to levels 1,1 of the two within-subjects factors; variable X1Y2 corresponds to levels 1,2; X2Y1 to levels 2,1; and so on up to X3Y2, which corresponds to levels 3,2. The first within-subjects factor named, X, varies most slowly, and the last within-subjects factor named, Y, varies most rapidly on the list of dependent variables.
- Because there is no
WSDESIGN
subcommand, the within-subjects design will include all main effects and interactions: X, Y, and X by Y. - Likewise, the between-subjects design includes all main effects and interactions (TREATMNT, GROUP, and TREATMNT by GROUP) plus the intercept.
- In addition, a repeated measures analysis always includes interactions between the within-subjects factors and the between-subjects factors. There are three such interactions for each of the three within-subjects effects.
Example
GLM SCORE1 SCORE2 SCORE3 BY GROUP
/WSFACTOR=ROUND 3 DIFFERENCE
/CONTRAST(GROUP)=DEVIATION
/PRINT=PARAMETER TEST(LMATRIX).
- This analysis has one between-subjects factor, GROUP, and one within-subjects factor, ROUND, with three levels that are represented by the three dependent variables.
- The
WSFACTOR
subcommand also specifies difference contrasts for ROUND, the within-subjects factor. - There is no
WSDESIGN
subcommand, so a default full factorial within-subjects design is assumed. This could also have been specified as WSDESIGN=ROUND, or simply WSDESIGN. - The
CONTRAST
subcommand specifies deviation contrasts for GROUP, the between-subjects factor. This subcommand could have been omitted because deviation contrasts are the default. -
PRINT
requests the display of the parameter estimates for the model and the L matrix. - There is no
DESIGN
subcommand, so a default full factorial between-subjects design is assumed. This could also have been specified as DESIGN=GROUP, or simply DESIGN.