2
$\begingroup$

I am running an OLS regression using dummy variables built from categorical variables. Say, race became race1, race2 and race3. I omit race1 in order to escape the dummy variable trap and run OLS and gain some coefficients for race2 and race3.

What would be the coefficient for race1 in the regression equation? Or I just should not include the omitted dummy variable into the final equation to estimate the predicted value?

$\endgroup$
1
  • $\begingroup$ This question includes additional material on a closely related subject: stats.stackexchange.com/questions/24242 In fact, doesn't it answer your prediction question outright? $\endgroup$
    – whuber
    Mar 9, 2012 at 22:16

1 Answer 1

3
$\begingroup$

How to use / interpret the coefficients from a regression model with categorical variables to get predicted variables depends on how your variables are coded. There are many different coding schemes (see here for a good overview). It sounds like you used 'reference cell coding', which most people call 'dummy coding'. I gather your race1 category is the reference category. In this case, the intercept is the mean of the race1 group. To compute the predicted value, you would solve the equation using whatever values for other variables apply and omitting the coefficients for the other categories (i.e., race2 & race3). There is some good, relevant info here, and here.

edit: The way the question is phrased made me think about situations in which there is only one factor in the model, however, @Michelle raises the question of the more general case. To keep this relatively simple, imagine a case with just two factors, e.g. race and sex, plus some continuous covariates. Using reference cell coding, we will create a dummy for male. Now, solving the regression equation without including any of the factor coefficients (i.e., just the intercept + continuous covariates) yields the predicted mean of the reference cell, which in this case is the race1 female group. Should you want to know the value for race1 males, you would solve as above, but also include the coefficient for male. If you wanted to ignore sex, or make a prediction for a mixed-sex group, you would calculate a weighted average of the above two predictions. Obviously, this will get more complicated as the number of factors, $J$, increases, but the pattern should be clear enough.

$\endgroup$
3
  • $\begingroup$ Just to add to your well-explained answer, wouldn't the intercept equal the value for the omitted dummy category only in the case where there is only one set of dummy variables? So, for example, if there was a gender dummy code as well, this wouldn't hold? $\endgroup$
    – Michelle
    Mar 9, 2012 at 20:28
  • $\begingroup$ @Michelle, good point. I edited the answer to make the general pattern clear. $\endgroup$ Mar 9, 2012 at 21:43
  • $\begingroup$ I'm happy to delete my comment now, if you would like. :) $\endgroup$
    – Michelle
    Mar 9, 2012 at 21:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.