I stumbled upon this question about including both country dummies and continent dummies.

AlexK comments: "Well, to be precise: let's say North America (continent) includes Canada, U.S. and Mexico. If you included all three countries as dummies, then the "North America" dummy would be perfectly collinear with those 3 country dummies and its coefficient could not be estimated. This is because for all observations in North America, the value of "North America" would just be the sum of values in three country dummies. If you have a continent dummy that is not exhaustive of the country dummies for that continent, then you would not have this issue for that continent."

As far as perfectly collinearity goes, that is clear and makes sense. He then suggests to "remove one country on each continent, in addition to removing one continent." I am wondering if this would be a logical idea (apart from solving the a dummy variable trap) because of the following:

If you were to run the regression

$$y_i = B_0 + B_1countryDummies + B_2continentDummies + u$$

The software package is going to throw out two coefficients due to perfect collinearity. In Stata, you can choose which it throws out by altering the order. So by doing:

$$y_i = B_0 + B_1countryDummies + B_2continentDummies + u$$

Two of the continents are thrown out. If you do:

$$y_i = B_0 + B_1countryDummies + B_2continentDummies + u$$

Two countries are thrown out. Now the interesting things (which I should have maybe already realised) is that, when you look at the coefficients, the coefficients of $continent$ for the levels which are not thrown out will be exactly the same as the coefficients on the $countries$ when they are not thrown out.

Now I know that AlexK suggests to throw more variables out. Actually, one continent and a country for each continent.

What is achieved by AlexK's suggestion?

And what is now picked up by the variable $continent$ if we assume that $y_i$ is income for example?

In other words, if you are already controlling for country effects, what would there be left to be controlled for at the continental level?

  • $\begingroup$ Are you familiar with dummy variables? Also see stats.stackexchange.com/questions/7948/… $\endgroup$
    – Tim
    Commented May 11, 2021 at 12:37
  • $\begingroup$ @Tim Thank you for your comment. I am familiar with dummy variables. Am I missing something obvious? I am going trough your CrossValidated right now, but I have not yet stumbled on anything that really relates to my question (Are you assuming that there is no intercept in my model? Because that was not intended.. I will change it). $\endgroup$
    – Tom
    Commented May 11, 2021 at 13:30
  • $\begingroup$ @Tim I have made some tweaks in the hope my question is a bit clearer now. $\endgroup$
    – Tom
    Commented May 11, 2021 at 13:36
  • $\begingroup$ If you dummy encode categorical variable with $k$ categories, you always end up with $k-1$ binary columns that encode it. The remaining category is the baseline, relative to which are parameters for the other categories. So if you have two categories, you drop one of the categories from each of them i.e. intercept + 0 + 0. This is what the comment says. $\endgroup$
    – Tim
    Commented May 11, 2021 at 13:37
  • $\begingroup$ @Tim I think we are having some miscommunication (or as I said, I am missing something very very obvious). In any case, as I explained, I am familiar with dummy variables. My question is about what possible variation there is left. It is nice that they are no longer perfectly collinear, but I am wondering what has been achieved by doing so. $\endgroup$
    – Tom
    Commented May 11, 2021 at 13:54

1 Answer 1


Let's suppose your dummy variables follow the suggestion are

            Ct1 Cy1 Cy2 Cy3  
    USA      0   0   0   0
    Canada   0   1   0   0
    Mexico   0   0   1   0
    Germany  1   0   0   0
    France   1   0   0   1


  • the base data will be as if for the USA (no dummies),
  • the coefficient of $Ct_1$ will be for Germany (representing base Europe) relative to the USA,
  • the coefficient of $Cy_1$ will be for Canada relative to the USA,
  • the coefficient of $Cy_2$ will be for Mexico relative to the USA,
  • the coefficient of $Cy_3$ will be for France relative to Germany, and if you want France relative to the USA then you need to add the coefficient of $Ct_1$ and the the coefficient of $Cy_3$

This allows every country to have distinct dummy variables and so coefficients. Having the continental dummies does not affect the number of dummy variables: overall counting continents and countries you still need $1$ less than the total number of countries, as each extra continent dummy allows you to reduce the number of country dummies by one, following the suggestion

  • $\begingroup$ Thank you for your answer. I see that I was looking at this all wrong, although I guess it confirms my suspicion that the coefficient on "continent" is not what you (read I) think it is (as in has little to do with continental variation), if I understand your explanation correctly. $\endgroup$
    – Tom
    Commented May 12, 2021 at 9: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.