Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Country specific variables omitted when using country-pair fixed effects in an OLS regression

    Hi, I am new on stata and I am trying to perform a Gravity model analysis of the effects on exports of being a landlocked nation in Sub-Saharan Africa for my bachelors thesis. I have panel data set of the exports from African countries to countries within the EU. I am using time specific effects and have created and included these manually. I want to use country-pair fixed effects in the model and I know this will lead to country-pair-specific variables being omitted. However, when I perform the regression country-specific variables are omitted as well, wich they shouldn't to my understanding.

    I created the panel and the effects by the code


    egen pairid = group(country_of_origin country_of_destination)


    xtset pairid year


    Then I run my regression:

    xtreg ln_tradeflow_baci ln_gdp_o ln_gdp_d ln_pop_o ln_pop_d ln_dist Island Landlocked comlang_off col45 year2 year3 year4 year5 year6 year7 year8 year9 year10 year11 year12 year13 year14 year15 year16 year17 year18 year19, fe robust

    I expected the variables for distance (ln_dist), a common official language (comlang_off) and colonial history (col45), to be omitted because of collinearity since they are country-pair specific variables. Which they were.

    However, two of the country-specific variables were omitted because of collinearity as well, the dummy variable for landlocked countries (Landlocked) and the dummy variable for island nations (Island).

    I do not understand why this happened and would be very thankful if someone could explain how this could occur? To my understanding country-pair fixed effects shouldn't ommit country-specific variables.

    Thank you in advance.






  • #2
    You need to show how the variables Landlocked and Island were defined. It seems that you do not have separate variables for the origin and destination countries for these constructs. So it seems likely that they are, in fact, constant among all observations of a given country pair. After all, these are geographic attributes and cannot vary over time. Indeed, I am having trouble thinking of any way to define these variables that would show variation within a country pair.

    Comment


    • #3
      Thank you Clyde for your help, the variables Island and Landlocked are dummy variables that turn to one when the African export country is an Island or is Landlocked respectively. I now understand how these were perceived as country-pair-specific variables in the regression though. Seems to be an issue that is hard to solve.

      Comment


      • #4
        Well, as I think you know, it is mathematically impossible to estimate an effect of a variable that is constant within panels in a fixed-effects model.

        So first you have to think clearly about why you are including these variables in your model. If your research question requires you to estimate the effects of landlocked and island, then you must not use a fixed-effects model. A purely random-effects model is one approach. There is also the Mundlak correlated random effects model, implemented as -xthybrid-, by Francisco Perales and Reinhard Schunk, available from Stata Journal. And there is also generalized estimating equations (-xtreg, pa).

        On the other hand, if you are including these variables only because you want the analysis to adjust for ("control", but in observational data you don't really control anything) their effects on the outcome, then there is no problem at all. Remember that in a fixed-effects model, the effects of all invariant attributes of the panels are automatically adjusted for, even ones that you didn't and can't observe. That's one of the real strengths of the fixed effects model. So if this is why you were including them, then there is nothing you need to do. You have your results and you can move on to the rest of your project.

        Comment

        Working...
        X