Cox Regression Define Categorical Variables
You can specify details of how the Cox Regression procedure will handle categorical variables.
Covariates. Lists all of the covariates specified in the main dialog box, either by themselves or as part of an interaction, in any layer. If some of these are string variables or are categorical, you can use them only as categorical covariates.
Categorical Covariates. Lists variables identified as categorical. Each variable includes a notation in parentheses indicating the contrast coding to be used. String variables (denoted by the symbol < following their names) are already present in the Categorical Covariates list. Select any other categorical covariates from the Covariates list and move them into the Categorical Covariates list.
Change Contrast. Allows you to change the contrast method. Available contrast methods are:
- Indicator. Contrasts indicate the presence or absence of category membership. The reference category is represented in the contrast matrix as a row of zeros.
- Simple. Each category of the predictor variable except the reference category is compared to the reference category.
- Difference. Each category of the predictor variable except the first category is compared to the average effect of previous categories. Also known as reverse Helmert contrasts.
- Helmert. Each category of the predictor variable except the last category is compared to the average effect of subsequent categories.
- Repeated. Each category of the predictor variable except the first category is compared to the category that precedes it.
- Polynomial. Orthogonal polynomial contrasts. Categories are assumed to be equally spaced. Polynomial contrasts are available for numeric variables only.
- Deviation. Each category of the predictor variable except the reference category is compared to the overall effect.
If you select Deviation, Simple, or Indicator, select either First or Last as the reference category. Note that the method is not actually changed until you click Change.
String covariates must be categorical covariates. To remove a string variable from the Categorical Covariates list, you must remove all terms containing the variable from the Covariates list in the main dialog box.
Defining Categorical Variables
This feature requires Custom Tables and Advanced Statistics.
- From the menus choose:
- In the Cox Regression dialog box, select at least one variable in the Covariates list and then click Categorical.
- In the Categorical Covariates list, select the covariate(s) whose contrast method you want to change. You can change multiple covariates simultaneously.
- Select a contrast method from the Contrast drop-down list.
- Click Change.