jmboehm / GLFixedEffectModels.jl

Fast estimation of generalized linear models with high dimensional categorical variables in Julia
Other
33 stars 6 forks source link

Feature requests #56

Open droodman opened 4 months ago

droodman commented 4 months ago

I'm adding support for this package to reghdfejl for Stata(!).

This leads me to a few comments;

Also, I think it shouldn't crash when passed a formula with no fe() terms.

jmboehm commented 4 months ago

Thank you, I agree on all points. I should say however that the coming weeks are quite busy and I don't know whether I'll have time for FOSS development....

droodman commented 4 months ago

Understood. Perhaps it will inspire you when the time comes to try the latest reghdfejl, which does call GLFixedEffectModels. It can be installed with

net install reghdfejl, replace from(https://raw.github.com/droodman/reghdfejl/master)

Then you can do the third example in the ppmlhdfe help file:

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(imp#year exp#year imp#exp) cluster(imp#exp)
reghdfejl trade fta, a(imp#year exp#year imp#exp) cluster(imp#exp) family(pois)

Here the runtimes are trivial. But in an example with ~10,000,000 observations, I found that using your package in this way halved run time.

(I still need to document the new functionality and make the regression output more appropriate, e.g., by showing the log likelihood.)

Right now the other two ppmlhdfe help file examples fail because of issues raised above.