Files for MacKinnon, Nielsen, and Webb (Working Paper 1415, 2019)


This directory contains a .do file to replicate the empirical analysis of

James G. MacKinnon, Morten Ø. Nielsen, and Matthew D. Webb, "Wild bootstrap and asymptotic inference with multiway clustering", QED Working Paper No. 1415, 2019. Get the paper

This version assumes that the dataset is called nw.csv and that it is in the local directory. If not, modify and uncomment the "PATH" statement. Then modify the "import delimited" statement.

This program has several features at the moment. It allows users to calculate the three-term CRVE and P values for tests based on it using the correct number of degrees of freedom, unlike cgmreg.ado. It can also calculate the two-term CRVE, and it allows users to specify which clustering variable to use for the bootstrap DGP. Users can choose between the 2-point (Rademacher) and the 6-point (Webb) distribution.

There is a block of code at the end which allows users to generate all the CRVE and bootstrap P values from Table 3. However, it might easily take a day to generate them all with B=9999. The authors hope to speed up the code in a future release.

An alternative is to use the boottest package for Stata by David Roodman. It is much faster for bootstrapping, but it does not attempt to check whether the three-term covariance matrix is positive definite, and it cannot compute the two-term CRVE. See

David Roodman, James G. MacKinnon, Morten Ø. Nielsen, and Matthew D. Webb, "Fast and wild: Bootstrap inference in Stata using boottest," The Stata Journal, 19, 2019, 4-60, or QED Working Paper No. 1406, 2018. Get the paper

When a bootstrap test statistic cannot be computed (which can happen when the covariance matrix is not positive definite), boottest simply drops that bootstrap sample. If that happens very often, the resulting bootstrap P value can differ substantially from the value produced by our program.

  • MNWBOOT_table_final.do
  • nw.csv