This site contains additional analyses and portions of the code used in the paper Correcting for Cross-Sectional and Time-Series Dependence in Accounting Research by Ian Gow, Gaizka Ormazabal and Daniel Taylor.
This macro produces two-way cluster-robust standard errors using SAS. See below for code illustrating its use and discussion of how to produce two-way cluster-robust standard errors using other packages.
As part of our simulations, we developed a number of general purpose econometric routines. Details on these are provided here. To run the simulation you need access to Matlab and the files contained here (further instructions are included in the file).
Cost of capital pseudo-data: To illustrate the use of two-way cluster-robust standard errors in popular packages, we provide pseudo-data sets for our second application on the cost of capital in Stata, SAS and Matlab formats (to respect others' copyright, the data are fabricated, only the variable labels are retained from our analysis).
This file illustrates the application of two-way cluster-robust standard errors in Matlab. This file contains code to do the same in SAS using our macro (here is the output). This file illustrates two-way clustering in Stata using the cluster2.ado macro from Mitchell Petersen's site.