CONTRAST Subcommand (ONEWAY command)
CONTRAST
specifies a priori contrasts to be tested by the t statistic. The specification on CONTRAST
is a vector of coefficients, where
each coefficient corresponds to a category of the independent variable.
The Contrast Coefficients table displays the specified contrasts for
each group and the Contrast Tests table displays the value of the
contrast and its standard error, the t statistic, and the degrees of freedom and two-tailed probability
of t for each variable. Both
pooled- and separate-variance estimates are displayed.
- A contrast coefficient must be specified or implied for every group defined for the independent variable. If the number of contrast values is not equal to the number of groups, the contrast test is not performed.
- The contrast coefficients for a set should sum to
0. If they do not, a warning is issued.
ONEWAY
will still give an estimate of this contrast. - Coefficients are assigned to groups defined by ascending values of the independent variable.
- The notation n*c can be used to indicate that coefficient c is repeated n times.
Example
ONEWAY V1 BY V2
/CONTRAST = -1 -1 1 1
/CONTRAST = -1 0 0 1
/CONTRAST = -1 0 .5 .5.
- V2 has four levels.
- The first
CONTRAST
subcommand contrasts the combination of the first two groups with the combination of the last two groups. - The second
CONTRAST
subcommand contrasts the first group with the last group. - The third
CONTRAST
subcommand contrasts the first group with the combination of the third and fourth groups.
Example
ONEWAY V1 BY V2
/CONTRAST = -1 1 2*0
/CONTRAST = -1 1 0 0
/CONTRAST = -1 1.
- The first two
CONTRAST
subcommands specify the same contrast coefficients for a four-group analysis. The first group is contrasted with the second group in both cases. - The first
CONTRAST
uses the n*c notation. - The last
CONTRAST
does not work because only two coefficients are specified for four groups.