Economists Carmen Reinhart and Ken Rogoff (“R&R”) have been widely cited for a study that concluded that growth rates for countries with public debt over 90% of GDP are lower than for countries with less debt. A recent critique by Thomas Herndon and two other economists examined R&R’s analysis and challenged their conclusions. Their most sensational finding was that R&R’s calculations were skewed in part by a spreadsheet error. R&R acknowledge the error but defend their conclusions.
The spreadsheet error is described here in detail. Instead of averaging the results for all twenty countries in the analysis, R&R included only the first fifteen in the list (which is in reverse alphabetical order for some reason). This has been widely described as “coding” error, as if someone had typed
when they meant to type
I don’t think this is what happened.
It is more likely that whoever built the spreadsheet began with a smaller list of countries, and created an average formula that included all of those countries. Later on, more countries were added in new rows, and the analyst assumed that the calculation would adjust to include the additional countries. Sometimes Excel updates formulas like this automatically. But not always. This time, Excel did not adjust the formula, making it appear that highly indebted countries had negative average growth when the average was actually positive.
Similar problems have led to spreadsheet disasters in the past. In Good Fences Make Good Spreadsheet, Part 1, I explained how to use “fences”, or bracket rows, to prevent this sort of error.
Another tool of preventative medicine is the Excel table, as I described in Tables vs. Fences. Tables are a good way to organize data and calculations. Once you set up a block of data or calculations, use CTRL+T to make it into a table. Make sure it has header rows and total rows. The total row allows not only for regular totals, but also for averages and other ways to summarize data:
Just click on each cell in the bottom row to select the appropriate summary calculation.
A nice feature of tables is that the summary calculations remain stable even if the data evolves and you need to insert or delete rows.
I find it good practice in Excel to use tables as much as possible. If Reinhart and Rogoff had done so they could have avoided their error.
Note: my spreadsheet is for illustrative purposes only, and it may not exactly replicate R&R’s work because of rounding.