Hello Stata users,
I'm using a gravity model in order to estimate the effects of being part of ASEAN by using a dummy on trade flows.
My basic regression which works perfectly is : reg lFlow lGDP_exp lGDP_imp lDistw Comlang Contig Curcol Evercol GATT ASEAN.
After that I want to include fixed effects by country pair and country-year.
First, for the country-pair fixed effects, my command is :
egen countrypair=group (Exporter Importer)
xtset countrypair year
xtreg lFlow lGDP_exp lGDP_imp lDistw Comlang Contig Curcol Evercol GATT ASEAN, fe which gives me a positive coefficient for ASEAN which is intuitively normal.
The problem is when I want to include fixed effects for country-years.
I have:
egen exporters_year = group(Exporter year)
egen importers_year = group(Importer year)
reghdfe lFlow lGDP_exp lGDP_imp lDistw Comlang Contig Curcol Evercol GATT ASEAN, absorb (exporters_year importers_year) and then I get a negative result for my dummy ASEAN. How is it possible that I have coefficients that have a different sign for the two fixed effects? Are my command incorrect? Or do I need to mix all fixed effects in one equation and not separate them? Because when I make the regression with all my fixed effects, the coefficient is also positive.
Thank you in advance for your help,
Ben.
Related Posts with Gravity model - fixed effects problems
Word cloud and sentiment analysis using StataDear Stata Forum members, I wish to find a user-written program to perform high quality "word clou…
Is there an 'or' function when coding variables?I am coding a binary variable (done) to denote if a diagnostic test was done, 1=yes, 0=no. I want i…
Sample ExtractionDear All, I have a panel monthly dataset (id and month), from 2001 - 2018, and I need 10 year (120 …
Duplicating previous year data Code: +----------------------------------------+ | country year dbagdp pcrdbgd…
Comparing 3 correlation coefficientsI have a group of about 1300 patients who had had disease 1 (subgroup 1), disease 2 (subgroup 2), or…
Subscribe to:
Post Comments (Atom)
0 Response to Gravity model - fixed effects problems
Post a Comment