pachadotdev / gravity

R package that provides estimation methods for Gravity Models
https://pacha.dev/gravity/
Apache License 2.0
34 stars 14 forks source link

Equivalent of ppmlhdfe? #18

Closed etiennebacher closed 3 years ago

etiennebacher commented 3 years ago

Hello,

I'm discovering this package, that I might need in the coming months as I will use PPML estimators. I've seen several articles using the Stata command ppmlhdfe, from the package of the same name. Since this Stata package is quite recent, I was wondering if gravity offers equivalent results/options/performance, and if it's not the case, is it something you are planning to work on in the future?

Thanks

pachadotdev commented 3 years ago

hi @etiennebacher so sorry, I lost thsis because of external factors ppmlhdfe is an excellent package, but for the case of gravity the performance is much slower due to the estimation method once I have completed v0.3 of eflm, I shall add it as a dependency to gravity, in order to provide competitive speed the results, to the best of my ability, are very similar, the slopes are exactly the same and the intercept is different because of how collinear terms are treated in Stata

etiennebacher commented 3 years ago

Thank you for your answer. In the meantime, I discovered the package fixest, that seems to provide a faster equivalent of ppmlhdfe (some benchmarks compare fixest to ppmlhdfe). Haven't tried it though.