binscatter icon indicating copy to clipboard operation
binscatter copied to clipboard

faster fixed effects (or simply any regression)

Open laszlosandor opened this issue 10 years ago • 6 comments

-areg- is fast on Stata 12 and above (three times faster than -xtreg-), but -_regress, absorb()- is even faster. Maybe it is less able to parse some factor/time-series variable lists or there are other pitfalls, but it seems worth investigating. If the usual use case is perfectly fine with _regress, and esp. if the problematic cases are easy to identify and the user can be asked or expected to set a flag for these cases herself, _regress could be used by default.

Btw, for multiple FEs, and interactions, and group-specific trends, a speedy option seems to come from -reghdfe- on SSC.

Note though that -_regress- only allows conventional standard errors, but it can be fine for many applications/exploration. Three times faster than -regress- or -areg-.

laszlosandor avatar Sep 05 '14 13:09 laszlosandor

See more about this here: http://www.statalist.org/forums/forum/general-stata-discussion/general/118137-new-command-reghdfe-available-on-ssc

laszlosandor avatar Sep 05 '14 14:09 laszlosandor

@michaelstepner: I checked and I think _regress should be fine everywhere, the extra reporting and tests for areg or regress is not used by binscatter, and no vce options are allowed, I think. Also, note that a single -_regress, absorb()- would work both with and without an absorb-variable for FE: an empty option is the same as not typing it out at all.

laszlosandor avatar Sep 17 '14 16:09 laszlosandor

This sounds like a good idea for an efficiency bump. I'll look into implementing it in the next version.

michaelstepner avatar Sep 18 '14 21:09 michaelstepner

Yepp, this was my meaningful comment. The rest was just stream of consciousness. I am using _regress in my version, and seems to work fine.

laszlosandor avatar Sep 18 '14 21:09 laszlosandor

_predict also seems to work fine, I don't know what difference it would make.

laszlosandor avatar Sep 18 '14 23:09 laszlosandor

Note the corresponding pull request: https://github.com/michaelstepner/binscatter/pull/17.

laszlosandor avatar Apr 18 '15 13:04 laszlosandor