I am currently trying to estimate the following regression specification with the ppmlhdfe command developed by Correia, Guimarães and Zylkin.:
Here, trade includes count data on international- and intra-national trade flows, EMU_INTL is a dummy variable indicating common membership in the European Monetary Union, non_EMU_cu is a dummy for common membership in a non-EMU currency union, and RTA_INTL is a dummy, which is set to one for international trade flows among mebers, and is zero otherwise. Additionally, I added a set of exporter-time fixed effects, importer-time fixed effects and dyadic country-pair fixed effects. This is my baseline specification which I want to enhance with more variables in the following.
However, when I run the model, I receive the following error message:
I have absolutely no clue what could be the reason for this error and would be grateful for any recommendations. In case it is helpful, here is additional information on how I installed the command...
... how I created the fixed effects ...
... and my output after tsset
Does the panel maybe need to be balanced for the ppmlhdfe? I though that missing entries are omitted automatically...
Code:
ppmlhdfe trade EMU_INTL non_EMU_cu_INTL RTA_INTL if exporter != importer, /// absorb(EXPORTER_TIME_FE* IMPORTER_TIME_FE* PAIR_FE*) cluster(pair_id) /// estimates store ppml_11
However, when I run the model, I receive the following error message:
Code:
(warning: absorbing 9120 dimensions of fixed effects; check that you really want that)
(dropped 239 observations that are either singletons or separated by a fixed effect)
Factor::sort(): 3900 unable to allocate real <tmp>[120790,1]
FixedEffects::update_sorted_weights(): - function returned error
FixedEffects::load_weights(): - function returned error
fixed_effects(): - function returned error
GLM::init_fixed_effects(): - function returned error
<istmt>: - function returned error
r(3900);
end of do-file
r(3900);
Code:
cap ado uninstall ftools cap ado uninstall reghdfe cap ado uninstall ppmlhdfe cap ado uninstall estout ssc install ftools // necessary for ppmlhdfe ssc install reghdfe // necessary for ppmlhdfe ssc install ppmlhdfe // as developed by Correia et al. (2019) ssc install estout // export estimates to text format clear all ftools, compile reghdfe, compile
Code:
egen exp_time = group(exporter year) quietly tabulate exp_time, generate(EXPORTER_TIME_FE) egen imp_time = group(importer year) quietly tabulate imp_time, generate(IMPORTER_TIME_FE) egen pair_id = group(exporter importer) quietly tabulate pair_id, generate(PAIR_FE)
Code:
. tsset pair_id year panel variable: pair_id (unbalanced) time variable: year, 1993 to 2014, but with gaps delta: 1 unit

Comment