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.