Hey I want to estimate a rather big gravity regression, I first tried it with xtreg and importer-year and exporter-year fixed effects. but it takes quite some time..
So I also tried it with reghdfe, but the resulting coefficients are different now..
I also tried it with some example data and there I have the same problem, so maybe I am just setting up the regression in the wrong way.
Here is what it looks like with example data:
Trying with reghdfe:
However when I try to run it with xtreg and imp-year and exp-year dummies:
then the coefficient for fta is much lower.
Really thankful for any comments about what went wrong here..
(and sorry for the wrong title, should be reghdfe not hdfereg)
Best regards
So I also tried it with reghdfe, but the resulting coefficients are different now..
I also tried it with some example data and there I have the same problem, so maybe I am just setting up the regression in the wrong way.
Here is what it looks like with example data:
Trying with reghdfe:
Code:
clear all set more off * load example data use http://fmwww.bc.edu/RePEc/bocode/e/EXAMPLE_TRADE_FTA_DATA if category=="TOTAL", clear gen ln_trade = log(trade) cap egen imp=group(isoimp) cap egen exp=group(isoexp) * using reghdfe reghdfe ln_trade fta ln_distw contig colony, a(imp#year exp#year) cluster(imp#exp)
However when I try to run it with xtreg and imp-year and exp-year dummies:
Code:
* using xtreg * Country pairs egen pairid = group(isoimp isoexp) * country pair dummies (sometimes also included in panel gravity models) * tab pairid, gen(pair_) * to identify the dimension of the panel with need the country pair and time xtset pairid year * regression wit xtreg (same result as below using generated dummies) * xtreg ln_trade fta ln_distw contig colony imp#year exp#year, robust * just to check if we get different results with dummies cap egen imp_year = group(isoimp year) cap egen exp_year = group(isoexp year) cap tab(imp_year), gen (imp_year_) cap tab(exp_year), gen (exp_year_) * regression with xtreg using dummies xtreg ln_trade fta ln_distw contig colony imp_year_* exp_year_*, robust
Really thankful for any comments about what went wrong here..
(and sorry for the wrong title, should be reghdfe not hdfereg)
Best regards
Comment