Dear Stata Community,
I am wondering why ppmlhdfe returns error (3201) when multiple, heterogeneous slopes are absorbed. For example, running
returns
In contrast, asking reghdfe to perform a somehow similar estimation by running
returns
I am fully aware that year#c.(imp exp) is not equivalent to year#imp year#exp. I am just wondering why ppmlhdfe returns the error whereas reghdfe does not.
Thank you,
Mihai
I am wondering why ppmlhdfe returns error (3201) when multiple, heterogeneous slopes are absorbed. For example, running
Code:
use "http://fmwww.bc.edu/RePEc/bocode/e/EXAMPLE_TRADE_FTA_DATA" if category=="TOTAL", clear egen imp = group(isoimp) egen exp = group(isoexp) ppmlhdfe trade fta, a(year#c.(imp exp) imp#exp) cluster(imp#exp)
Code:
. ppmlhdfe trade fta, a(year#c.(imp exp) imp#exp) cluster(imp#exp) reghdfe_panel_precondition(): 3201 vector required FixedEffects::load_weights(): - function returned error fixed_effects(): - function returned error GLM::init_fixed_effects(): - function returned error <istmt>: - function returned error r(3201);
Code:
use "http://fmwww.bc.edu/RePEc/bocode/e/EXAMPLE_TRADE_FTA_DATA" if category=="TOTAL", clear egen imp = group(isoimp) egen exp = group(isoexp) gen ltrade = ln(trade) reghdfe ltrade fta, a(year#c.(imp exp) imp#exp) cluster(imp#exp)
Code:
. reghdfe ltrade fta, a(year#c.(imp exp) imp#exp) cluster(imp#exp) (MWFE estimator converged in 4 iterations) HDFE Linear regression Number of obs = 5,932 Absorbing 2 HDFE groups F( 1, 1189) = 13.62 Statistics robust to heteroskedasticity Prob > F = 0.0002 R-squared = 0.9308 Adj R-squared = 0.9133 Within R-sq. = 0.0042 Number of clusters (imp#exp) = 1,190 Root MSE = 0.5901 (Std. Err. adjusted for 1,190 clusters in imp#exp) Robust ltrade Coef. Std. Err. t P>t [95% Conf. Interval] fta .1877008 .0508547 3.69 0.000 .0879259 .2874757 _cons 13.16649 .01622 811.74 0.000 13.13467 13.19831 Absorbed degrees of freedom: Absorbed FE Categories - Redundant = Num. Coefs - year#c.imp 5 0 5 ? year#c.exp 5 0 5 ? imp#exp 1190 1190 0 * ? = number of redundant parameters may be higher * = FE nested within cluster; treated as redundant for DoF computation
Thank you,
Mihai
Comment