I am using SPSS 26. Whenever I conduct a binary logistic regression, the first group of the categorical independent variable does not get dummy coded, and thus, does not get included in the model. In the example below, in where the the dependent variable is sex (0 = female, 1 = male), the first race, White, is not encoded, and not included in analysis as stated above. What is the solution to this?
$\begingroup$
$\endgroup$
2
-
4$\begingroup$ This gets asked all the time; the reference level of your categorical variable is absorbed in the main intercept. See e.g. here. $\endgroup$– PBullsCommented Aug 23 at 6:32
-
$\begingroup$ There is no solution needed as it is not a problem. See the thread @PBulls mentioned. $\endgroup$– Peter FlomCommented Aug 23 at 9:15
Add a comment
|
1 Answer
$\begingroup$
$\endgroup$
1
If you have a categorical variable with:
- $4$ factors, then $3$ dummy variables will be created.
- $n$ factors, then $n-1$ dummy variables will be created.
For example, assume that you have a model with a 2 factor categorical variable, e.g. "Male" and "Female". Only one dummy variable is needed (which could represent Male as $0$, and Female as $1$).
In your case, since we have a Race
variable with 4 groups, then we would expect that 3 dummy variables will be created to encode this.
-
1$\begingroup$ I think your answer suffers from not explaining the underlying reason for this behavior. The thread mentioned by Pbulls in the comments above gives a good explanation, for those interested. $\endgroup$– J-J-JCommented Aug 23 at 6:49