For an ordinary least square (OLS) regression problem of the form $y = \beta + w_1 x_1 + \ldots + w_n x_n$, let's say I have 3 categorical variables.
- gender: male, female
- type: office, field, manager
- ethnicity: white, black, other
And let's also say I have some other continuous variables (not made explicit here). I know that when I dummy encode (e.g. one-hot encode) the categorical variables, I will have the following variables.
- gender_male, gender_female
- type_office, type_field, type_manager
- ethnicity_white, ethnicity_black, ethnicity_other
I know that I should drop one of the gender dummy variables; let's say, gender_female. What about the other dummy variables? Should I drop one from each too? Or can I leave them all in?
I found one post that seem to suggest that I should drop 1 dummy variable and leave the rest alone. Is this the right approach?
Let's say I decide to drop one dummy variable derived from each of the categorical ones. My model might look like the following.
$y = 1.0 + 0.8 \mathrm{gender_{male}} + 0.7 \mathrm{type_{field}} + 0.2\mathrm{type_{manager}} - 0.8 \mathrm{ethnicity_{white}} + 0.5 \mathrm{ethnicity_{black}} + w_6 x_6 + \ldots + w_n x_n$
With the exception of gender, which is binary, how do I account and explain for the dummy variables that I dropped out? (e.g. type_office and ethnicity_other).
I guess I am having problems reconciling what to do to avoid mathematical problems (e.g. singularities) and then dealing with the side-effects of how to explain or interpret the model. In this post, one reply suggest to leave everything in for OLS regression if regularization is used.