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.
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.
Comment