0
$\begingroup$

I have a simple question that I cannot figure out. When specifying a regression model with categorical variables as an independent variable, it's possible to perform the coding in two ways. For a nominal variable with multiple levels (example: four countries), what is the difference in modelling the variable as 3 dummy variables (and an intercept) in comparison with coding it as four levels within one variable and setting a reference in a regression model and setting one of the categories as the reference? Are they equivalent and is there an advantage or disadvantage to either approach (is the regression equation the same?). Thanks for your responses.

$\endgroup$
  • $\begingroup$ If I understand your question, the answer is that your software will convert the categorical variable into a set of dichotomous dummy variables behind the scenes. There are some different ways this might be done. $\endgroup$ – Sal Mangiafico Oct 26 '19 at 11:49
  • $\begingroup$ Hi Sal. That is exactly my question. What are the different ways? I also wanted to know if I specify the model with three dummy variables (each 1,0 for different levels) and the intercept would be the reference, would I get the same estimate as if I specified the model with a single variable with four levels (in essence I would do the work for the software)? Thanks again. $\endgroup$ – Jay Oct 26 '19 at 12:57
  • $\begingroup$ You can see some different coding schemes here: stats.idre.ucla.edu/r/library/… . Well, yes, if you do the same thing that the software does behind-the-scenes, then, of course, yes, you will get the same results. I think the best thing to so is try a simple example and run it both ways to confirm you understand what the software is actually doing in the $\endgroup$ – Sal Mangiafico Oct 26 '19 at 13:26
  • $\begingroup$ That's great. Thanks again for your help. $\endgroup$ – Jay Oct 27 '19 at 1:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.