Solved – How to deal with non-binary categorical variables in logistic regression (SPSS)

categorical datacategorical-encodinglogisticordinal-dataspss

I have to do binary logistic regression with a lot of independent variables. Most of them are binary, but a few of the categorical variables have more than two levels.

What is the best way to deal with such variables?

For example, for a variable with three possible values, I suppose that two dummy variables have to be created. Then, in a step-wise regression procedure, it is better to test both of the dummy variables at the same time, or to test them separately?

I will use SPSS, but I do not remember it very well, so: how does SPSS deal with this situation?

Moreover, for an ordinal categorical variable, it is a good thing to use dummy variables which recreate the ordinal scale? (For example, using three dummy variables for a 4-state ordinal variable, put 0-0-0 for level $1$, 1-0-0 for level $2$, 1-1-0 for level $3$ and 1-1-1 for level $4$, instead of 0-0-0, 1-0-0, 0-1-0 and 0-0-1 for the 4 levels.)

Best Answer

The UCLA website has a bunch of great tutorials for every procedure broken down by the software type that you're familiar with. Check out Annotated SPSS Output: Logistic Regression -- the SES variable they mention is categorical (and not binary). SPSS will automatically create the indicator variables for you. There's also a page dedicated to Categorical Predictors in Regression with SPSS which has specific information on how to change the default codings and a page specific to Logistic Regression.