All of my public code can be found on Github. Below are links to some more polished, stand-alone packages. Details about how to use and install these packages can (usually) be found on their respective Github pages.

Astronomical Algorithms
Sunset, sunrise, and sunlight duration calculator for Stata and Matlab. Code to produce maps of the solar terminator. And R code to calculate time zone offsets. If you make use of this code, I would ask that you cite Astronomical Algorithms by Jean Meeus (.bib). The code was created for and used in the paper Gibson and Shrader (2018).

An R package to run data envelopement analysis (DEA) and industry-wide efficiency calculations (Johansen industry model). The main benefit of this package over other existing packages is the ability to specify non-convex solutions (although the models then take a long time to solve). If you make use of this code, I kindly ask that you cite Shrader and Squires (2012).

A little helper function to load Stata two-sample t-tests into e() so that they can be exported by common LaTeX table creation packages. This code was created for and used in the paper Gibson and Shrader (2018). The code was inspired by one of Ben Jann’s estout examples.

NEW! Ankit Bhutani has released great new code for estimating two-sample, two-stage least squares models with GMM standard errors. It is built in Python. You can likely run it in Stata using Stata 16’s new python command or in R using any number of packages.

My Stata code can be found here. WARNING: The Stata code will only calculate correct standard errors for a single instrument. Ankit’s code will handle multiple instruments just fine!

Anna Papp’s and Vincent Bagilet’s code for TWFE
This is not my code, but I want to share it. Anna and Vincent wrote great examples and code to work through lots of recent methods for two-way fixed effects and dynamic diff-in-diff estimation. Read the original announcement on this website about the code here.