Software

Published

Stata packages

xtcdf calculates the CD-test for cross-sectional dependence described in Pesaran (2004) and Pesaran (2015) for a varlist of any length. The test can best be seen as an investigation of the mean correlation between panel units. The main insight of Pesaran (2004) is that a transformation of the sum of pairwise correlations between panel units is standardnormally distrubuted. The null hypothesis is either strict cross-sectional independence (Pesaran, 2004) or weak cross-sectional dependence (Pesaran, 2015). sendtoslack allows you to send messages from Stata to your smartphone, passing through Slack. Setup is very fast and for Windows users requires no additional programs. Particularly useful to get updated once your long regressions have finished. You can even ask people in your team to add a snippet of code to their dofiles to get live updates on their progress. xtqptest, xtistest, xthrtest implement four different tests for serial correlation in panels. xtqptest can perform the Q(p) test for serial correlation up to lag p and the LM(k) test for serial correlation of order k, see Born & Breitung (2016). xtistest performs the portmanteau IS(q) test for serial correlation up to lag p introduced in Inoue & Solon (2006). Finally, xthrtest implements the time heteroskedasticity-robust HR(1) test, also introduced in Born & Breitung (2016). For an introduction and examples, see the slides I presented the UK Stata User Group Meeting 2017 (downloadable here) as well as a paper published in the Stata Journal.censusapi connects the US census API to Stata. It makes it easier to access data from e.g. the 1990 census by taking care of the behind-the-scenes technicalities and solving some ease-of-use issues such as variable limitations and variable range selectionsbatcher provides an easy way to parallelise your dofiles. Imagine you want to run 12 specifications of a particular regressions, each of which can easily take hours if not days to run. With some minor tweaking, batcher allows you to conveniently start 12 instances of Stata each running their respective specification. A live tracker tells you which specs have finished. You can also watch the execution logs for a sneak peek of the results.timeit provides single-line timers. Instead of adding bulky "timer on x/command/timer off x" everywhere, using timeit you can simply prefix the line you want to time, e.g. "timeit y: command". Additionally, you can give your timers specific names and store them as an r-result (allowing coding conditional on the timing).pwcorrf is a faster alternative to Stata's pwcorr. Particularly interesting if you are interested in correlations between groups - "pwcorrf, reshape" allows you to calculate those without going through Stata's slow reshape command.stop interrupts dofiles, closes any running logfiles and optionally sends a message to your smartphone (see sendtoslack). This is particularly useful when you are running the same dofile in multiple instances (potentially on different machines). In those situations, you often get errors that the logfile cannot be accessed (because it is still open in the other instance). Moreover, if your dofiles take ages to run, it is convenient to get message on your smartphone when they’re done. cdo is an alternative to do/run. Allows for easy logging, timing execution and most crucially, error handling. Instead of aborting, using cdo you can send a text message to your cellphone upon errors, or run a self-defined program. Additionally, cdo runs a copy of the original dofile, allowing you to save any changes you make during dofile execution (with standard do/run, this gives a sharing violation). Particularly useful if your program has a tendency to crash Stata.

Powershell tools

sfv Small file versioning. Essentially this program saves a backup of all files in the folders you specify without ever overwriting old versions. I use it if I ever need to go back to an old version of a file. It saves me the effort of renaming and saving old versions and makes it less risky to just recode entire portions of dofiles, because I know I can always go back to the old version. Also been useful a few times to figure out why new results differ from old results. As this is a powershell script, you cannot download it from ssc, but it is available on github. Feedback very welcome.

Upcoming (send me an email if interested)

alttef (Stata) is a wrapper for teffects that facilitates creating the matched sample, identifying outliers and generating summary statistics tables and graphs.twowaycluster (Stata) is a post-estimation command to allow twoway clustered standard errors after popular estimation techniques (e.g. OLS, Heckman, Probit, ...) which does not require estimating the model three times. Uses Stata's powerful _robust programming command.stackedEventStudy (Stata) transforms regular data into event study format, runs the event study regressions and plots the resultsstackedBinnedEventStudy (Stata) is the binned equivalent of the stacked event study