Doug Miller’s Stata code page 

This page has Stata code used in some of my papers.

Multi-way clustering with OLS

cgmreg.ado – This is the multi-way clustering regression code used in “Robust Inference with multi-way clustering” by Cameron, Gelbach, and Miller (2006, NBER TWP 327).  Some sample Stata code that uses this ado file is cgmreg_example.do .

Percentile-t cluster bootstrap example

In Cameron, Gelbach, Miller (ReStat 2008), we suggest using a “Wild cluster-bootstrap percentile-t procedure, imposing the null hypothesis,” for improved inference with few clusters.  I don’t have an .ado file that will automatically run this, but I do have a .do file, which is adopted from the Gruber-Poterba Application of our paper, that can serve as an example.  The file is bs_example.do, and it uses the dataset collapsed.dta.  The code produces p-values for “pairs cluster bootstrap,” “cluster residual bootstrap,” and “Wild bootstrap.”  (Note:  The numbers for the Wild bootstrap are different than those in our paper, because in the old version of the code we used different (and less intuitive) weights for the wild bootstrap, and we did not "impose the null hypothesis".  Because our base recommendation is to use the Wild Bootstrap, impose the null, and use the +1 -1 weights, I've modified the code to reflect those recommendations.)

Nonparametric Regression Discontinuity Code

An earlier version of this code was used in Ludwig and Miller (2007).

Start with the readme.txt file.  The code to run is the example.do file.  The actual nonparametric RD code is in the flexporter1v9.do file.  An example of the graphs that can be made is in example_graph.wmf file.

 

To UC Davis or the Economics Department


This page last updated on April 27, 2007.