3
$\begingroup$

I have run a multiple regression analysis and have three explanatory variables (two quantitative and one categorical).

The categorical variable has 4 levels; therefore I have 3 dummy variables in my regression model.

I am wondering whether in the model equation, I am supposed to include a separate term for each dummy variable of the categorical variable, or I'm supposed to simply write out the term for the categorical variable and not include terms for the dummies?

The variables are: $\text{Height}$ (Quantitative), $\text{Age}$ (Quantitative), $\text{Country}$ (Categorical with four levels: England, Wales, Scotland, Ireland)

So is the equation supposed to be:

  1. $$\text{Life Expectancy} = b_0 + b_1 \text{Height} + b_2 \text{Age} + b_3 \text{Country}$$

or

  1. $$\text{Life Expectancy} = b_0 + b_1 \text{Height} + b_2 \text{Age} + b_3 \text{Scotland} + b_4 \text{Wales} + b_5 \text{Ireland}$$

Note: The reference variable for the dummy variables is England and therefore I did not include it in the second equation as of course the regression model doesn't produce a coefficient for it.

$\endgroup$
4
  • 2
    $\begingroup$ Could you tell us what you intend "Country" in equation (1) to mean? On the face of it, it's not a number at all, so how are we supposed to make sense of multiplying it by the number "b3" and adding that to other numbers? There is a comparable difficulty with (2) but by reading it generously we can understand "Scotland" etc to refer to numerical binary indicators equal to $1$ for observations from Scotland and $0$ otherwise, for instance. No such reading seems natural or possible for (1). $\endgroup$
    – whuber
    Commented Jan 20, 2018 at 20:16
  • $\begingroup$ @whuber Country would be where a participant is from (either of those four countries). $\endgroup$ Commented Jan 20, 2018 at 20:25
  • $\begingroup$ Obviously. But just as obviously, "country" is not a number, is it? How, then, do you propose to make sense of the arithmetic presented in formula (1)? $\endgroup$
    – whuber
    Commented Jan 21, 2018 at 16:05
  • $\begingroup$ If I answered your question to your satisfaction, you can accept my answer by clicking the check mark under the voting arrows. $\endgroup$ Commented Jan 23, 2018 at 19:33

2 Answers 2

0
$\begingroup$

The first equation resembles R's notation for linear models, but it isn't correct. For example, you didn't estimate a single coefficient b3 for all three dummy variables. You estimated one coefficient for Scotland, one for Wales, and one for Ireland.

$\endgroup$
2
  • $\begingroup$ I didn't do them exactly for those countries though, I did it for those countries relative to the reference - which was England... $\endgroup$ Commented Jan 20, 2018 at 20:03
  • $\begingroup$ @MartinSloane Yes, I understand that. That's what I mean. $\endgroup$ Commented Jan 20, 2018 at 20:23
0
$\begingroup$

The second equation:

Life Expectancy = b0 + b1 * Height + b2 * Age + b3 * Scotland + b4 * Wales + b5 * Ireland

...accurately describes the model you are running. The first one does not, and implies that you stupidly treated "country" as a continuous variable with a single coefficient, which is an egregious error, but one that people do make from time to time. So I would strongly recommend the second equation.

However, you do sometimes see equations where people use different greek letters with added subscripts to denote that they are controlling for a particular type of "fixed effects" - which is basically just another way of saying "including a bunch of dummy variables to control for this categorical variable." Maybe this is what you were thinking of when you wrote the first equation.

In that approach you might write this as:

$Life Expectancy = \beta_0 + \beta_1 * Height + \beta_2 * Age +\alpha_j*Country$

Here the "j" subscript on the alpha coefficient tells the reader that this isn't just one coefficient but a bunch of them - j in fact (where j=1-the number f countries). This approach is a little more concise than your second equation, which can be nice if you are including multiple sets of dummies. If you also wanted to include dummies for (say) race, then you could do the same trick, but make the race coefficient $\delta_k$ or something, with the different greek letter denoting that it's a different group of coefficients, and a different subscript because this set has k different coefficients, as opposed to j for countries. However this approach doesn't explicitly tell you what the reference group is.

So feel free to choose whichever you think makes the most sense in your context.

$\endgroup$

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.