CATEGORICAL Subcommand (LOGISTIC REGRESSION command)
CATEGORICAL
identifies independent variables that are nominal or ordinal. Variables
that are declared to be categorical are automatically transformed
to a set of contrast variables as specified on the CONTRAST
subcommand. If a variable that
is coded as 0 – 1 is declared as categorical, its coding scheme
is given indicator contrasts by default.
- Independent variables that are not specified on
CATEGORICAL
are assumed to be at least interval level, except for string variables. - Any variable that is specified on
CATEGORICAL
is ignored if it does not appear either afterWITH
on theVARIABLES
subcommand or on anyMETHOD
subcommand. - Variables that are specified on
CATEGORICAL
are replaced by sets of contrast variables. If the categorical variable has n distinct values, there will be n−1 contrast variables generated. The set of contrast variables associated with a categorical variable is entered or removed from the model as a step. - If any one of the variables in an interaction term
is specified on
CATEGORICAL
, the interaction term is replaced by contrast variables. - All string variables are categorical. Only the first eight characters of each value of a string variable are used in distinguishing between values. Thus, if two values of a string variable are identical for the first eight characters, the values are treated as though they were the same.
Example
LOGISTIC REGRESSION VARIABLES = PASS WITH GPA, GRE, MAT, CLASS, TEACHER
/CATEGORICAL = CLASS,TEACHER.
- The dichotomous dependent variable PASS is regressed on the interval-level independent variables GPA, GRE, and MAT and the categorical variables CLASS and TEACHER.