Code

Code for My Papers

Paper Description Language
Quasi-Experimental Shift-Share Designs Replication archive for the application to Autor et al. (2013) and ssaggregate command that helps implement shift-share (Bartik) designs (link) (updated Aug 2018) STATA
Revisiting Event Study Designs Implements estimators, graphical, and statistical tests developed in the paper (by request) STATA

 

Other useful Commands

Below are some STATA commands that I wrote and found useful in data work. Hope you will find them useful, too. More detailed usage instructions are provided in each file.

Module Description
reclink4 (by request) Updates the reclink2 package by Wasi and Flaaen for exact and fuzzy merging of firm names and addresses. Substantially improves performance by minimizing loops.
MostFreq.ado

Reports the list of most frequent values of a set of variables. For example, in a dataset of counties, it can print 20 largest states (by population), their population shares in the country, and the average income per capita in all counties of each state.

binscatter2.ado

Adds more functionality to the binscatter command: variable labels, robust standard errors, automatic footnotes, etc.

Demean.ado

Demeans a list of variables (optionally within cells), with replace or generating new variables.

recover.ado Fills in empty variables after running fillin or tsfill.
share.ado

Reports the share of observations (or weights) which satisfy some condition, within a subsample defined by another condition.