CONTRAST Subcommand (COXREG command)
CONTRAST
specifies the type of contrast used for categorical covariates. The
interpretation of the regression coefficients for categorical covariates depends on the contrasts
used. The default is INDICATOR
. For illustration of contrast types, see the
appendix.
- The categorical covariate is specified in parentheses
following
CONTRAST
. - If the categorical variable has n values, there will be n−1 rows in the contrast matrix. Each contrast matrix is treated as a set of independent variables in the analysis.
- Only one variable can be specified per
CONTRAST
subcommand, but multipleCONTRAST
subcommands can be specified. - You can specify one of the contrast keywords in parentheses following the variable specification to request a specific contrast type.
The following contrast types are available:
- INDICATOR(refcat)
- Indicator variables. This is the default. Contrasts indicate the
presence or absence of category membership. By default, refcat is the first category (represented in
the contrast matrix as a row of zeros). To omit a category other than the first, specify the
sequence number of the category (which is not necessarily the same as its value) in parentheses
after the keyword
INDICATOR
. - DEVIATION(refcat)
- Deviations from the overall effect. The effect for each category of
the independent variable except one is compared to the overall effect. Refcat is the category
for which parameter estimates are not displayed (they must be calculated from the others). By
default, refcat is the first category. To omit a category other than the first, specify the
sequence number of the omitted category (which is not necessarily the same as its value) in
parentheses following the keyword
DEVIATION
. - SIMPLE(refcat)
- Each category of the independent variable (except the first category) is
compared to the first category. To use a category other than the first as the omitted reference
category, specify its sequence number (which is not necessarily the same as its value) in
parentheses following the keyword
SIMPLE
. - DIFFERENCE
- Difference or reverse Helmert contrasts. The effects for each category of the covariate except the first are compared to the mean effect of the previous categories.
- HELMERT
- Helmert contrasts. The effects for each category of the independent variable except the last are compared to the mean effects of subsequent categories.
- POLYNOMIAL(metric)
- Polynomial contrasts. The first degree of freedom contains the linear
effect across the categories of the independent variable, the second contains the quadratic effect,
and so on. By default, the categories are assumed to be equally spaced; unequal spacing can be
specified by entering a metric consisting of one integer for each category of the independent
variable in parentheses after the keyword
POLYNOMIAL
. For example, CONTRAST (STIMULUS) = POLYNOMIAL(1,2,4) indicates that the three levels of STIMULUS are actually in the proportion 1:2:4. The default metric is always (1,2,...,k), where k categories 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. - REPEATED
- Comparison of adjacent categories. Each category of the independent variable except the last is compared to the next category.
- SPECIAL(matrix)
- A user-defined contrast. After this keyword, a matrix is entered in
parentheses with k−1 rows and k columns, where k is the number of categories of
the independent variable. The rows of the contrast matrix contain the special contrasts indicating
the desired comparisons between categories. If the special contrasts are linear combinations of each
other,
COXREG
reports the linear dependency and stops processing. If k rows are entered, the first row is discarded and only the last k−1 rows are used as the contrast matrix in the analysis.
Example
COXREG VARIABLES = SURVIVAL WITH GROUP
/STATUS SURVSTA (1)
/STRATA=LOCATION
/CATEGORICAL = GROUP
/CONTRAST(GROUP)=SPECIAL(2 -1 -1
0 1 -1).
- The specification of GROUP on
CATEGORICAL
replaces the variable with a set of contrast variables. - GROUP identifies whether a case is in one of the three treatment groups.
- A
SPECIAL
type contrast is requested. A three-column, two-row contrast matrix is entered in parentheses.