Stata code:

kinkyX.ado -- Stata command for two-stage estimation of distribution discontinuity determinants (updated on 7/13/2018), from "Modeling the Determinants of Meet-or-Just-Beat Behavior in Distribution Discontinuity Tests" (with Sudipta Basu)


It turns out that we've reinvented the wheel with bigreg. To estimate a model with thousands of firm-specific slopes, just use reghdfe with the option absorb(gvkey##c.(var1 var2)). It is quicker, more flexible, and better supported than bigreg.
bigreg.ado -- Stata command for the estimation of an OLS regression with thousands of firm-specific slope coefficients, from "The misuse of regression-based x-Scores as dependent variables" (with Sudipta Basu)
Code example Instructions