Dear Prof.Tom, Prof.Joao and other Statalsists,
I am a postgraduate student from China, I am working with a gravity model and want to include ‘country-year fixed effects’ and ‘country-pair fixed effects’ in my model and a panel of 14 countries—91country pairs(14×13÷2)—across 20 years. To control for unobserved heterogeneity, I have already include country-pair fixed effects, but I also want to include fixed effects into my model for the country--year combination, regardless of whether the country is an exporter or an importer.
The gravity model is as follow:
Where Xijt is the trade flow from country i to j in year t.
is the country pair fixed effect which controls for the impact on trade of the distance between countries, and any unobserved characteristics of the country pair that are constant over time. The fixed effect
(exporter—year) captures the change in country i ’ s overall exports in year t. The fixed effect
(importer—year) captures the change in country j ’ s overall imports in year t. FTA dummy valuables means Free Trade Agreement. The effect on trade of not only GDP and population but also other variables that are more difficult to measure such as infrastructure, factor endowments, multilateral trade liberalition or openness, and unobserved time—specific shocks are captured by the exporter—year and importer—year fixed effects. (Just like and in the equation)
My original Stata commands are something like this:
reghdfe lnexport fta1 fta2 fta3, absorb(i.exporter#i.year i.importer#i.year) vce(cluster exporter#importer)
But I am afraid that makes sense as it means one fixed effect for every exporter—year and importer—year, not capture the change in country i or j ‘ overall exports/imports in year t. Professors, can you show me the Stata code to achieve my requirement (capture the change in country i or j ‘ overall exports/imports in year t) ?
I would be extremely grateful for any suggestions.
Thank you very much!
Karen
I am a postgraduate student from China, I am working with a gravity model and want to include ‘country-year fixed effects’ and ‘country-pair fixed effects’ in my model and a panel of 14 countries—91country pairs(14×13÷2)—across 20 years. To control for unobserved heterogeneity, I have already include country-pair fixed effects, but I also want to include fixed effects into my model for the country--year combination, regardless of whether the country is an exporter or an importer.
The gravity model is as follow:
Where Xijt is the trade flow from country i to j in year t.
is the country pair fixed effect which controls for the impact on trade of the distance between countries, and any unobserved characteristics of the country pair that are constant over time. The fixed effect
(exporter—year) captures the change in country i ’ s overall exports in year t. The fixed effect
(importer—year) captures the change in country j ’ s overall imports in year t. FTA dummy valuables means Free Trade Agreement. The effect on trade of not only GDP and population but also other variables that are more difficult to measure such as infrastructure, factor endowments, multilateral trade liberalition or openness, and unobserved time—specific shocks are captured by the exporter—year and importer—year fixed effects. (Just like and in the equation)
My original Stata commands are something like this:
reghdfe lnexport fta1 fta2 fta3, absorb(i.exporter#i.year i.importer#i.year) vce(cluster exporter#importer)
But I am afraid that makes sense as it means one fixed effect for every exporter—year and importer—year, not capture the change in country i or j ‘ overall exports/imports in year t. Professors, can you show me the Stata code to achieve my requirement (capture the change in country i or j ‘ overall exports/imports in year t) ?
I would be extremely grateful for any suggestions.
Thank you very much!
Karen
Comment