Reinhart & Rogoff: The Austerity spreadsheet error

We’ve discussed this on the yahoogroup of the European Spreadsheet Risk Interest Group, of which I’m the current chair. Here’s my summary of The Spreadsheet Error Heard Round the World, with my commentary followed by the background.

1) The authors did not catch the error, and only when they released the spreadsheet did others find it.
Lesson: review by a different pair of eyes can catch errors before they cause loss or embarrassment.
“Peer review” is the gold standard in academic research, and the best self-protection for business users of spreadsheets.
Here’s a story from Edward Krudy of Reuters quoted in the Toronto Star: the person who checked the R&R study also checked their own work:

http://www.thestar.com/business/2013/04/18/student_finds_glaring_spreadsheet_errors_in_study_used_to_justify_budget_slashing.html

Student finds glaring spreadsheet errors in study used to justify budget slashing
“I almost didn’t believe my eyes when I saw just the basic spreadsheet error,” said Herndon, 28. “I was like, am I just looking at this wrong? There has to be some other explanation. So I asked my girlfriend, ‘Am I seeing this wrong?’” His girlfriend, Kyla Walters, replied: “I don’t think so, Thomas.”

2) Like most spreadsheet creators, they possibly did not realise at the start how important it would become; in their case, frequently cited in support of austerity and arguably the cause of more grief to the world at large than other problems that have merely cost millions. (See http://www.eusprig.org/horror-stories.htm )
Lesson: The more important something is, the more care you have to take with it.

3) Technically, the error could have been spotted by simple tests, such as pressing Ctrl+[ on a formula to show what cells feed into the total.
There are many software tools, such as XLTEST, to point out structural flaws.
There is much guidance on safer spreadsheet construction, books such as “Spreadsheet Check and Control”, “Spreadsheet Safe”, etc.
In the business world, common checks include cross-total balances and reconciliations.

Eusprig papers are published at

http://www.eusprig.org/conference-abstracts.htm

Our Annual Conference will be in Greenwich on 4-5 July 2013.

http://www.eusprig.org/annual-conference.htm

This is a recent blogfire about the unravelling of the Rogoff & Reinhart paper that was influential in austerity policies.

http://www.businessinsider.com/thomas-herndon-michael-ash-and-robert-pollin-on-reinhart-and-rogoff-2013-4

In 2010, economists Carmen Reinhart and Kenneth Rogoff released a paper,
“Growth in a Time of Debt.”
Countries with debt-to-GDP ratios above 90 percent have a slightly
negative average growth rate, in fact.
In a new paper, “Does High Public Debt Consistently Stifle Economic
Growth? A Critique of Reinhart and Rogoff,” Thomas Herndon, Michael Ash,
and Robert Pollin of the University of Massachusetts, Amherst
successfully replicate the results. After trying to replicate the
Reinhart-Rogoff results and failing, they reached out to Reinhart and
Rogoff and they were willing to share their data spreadsheet. This
allowed Herndon et al. to see how how Reinhart and Rogoff’s data was
constructed.

They find that three main issues stand out. First, Reinhart and Rogoff
selectively exclude years of high debt and average growth. Second, they
use a debatable method to weight the countries. Third, there also
appears to be a coding error that excludes high-debt and average-growth
countries. All three bias in favor of their result, and without them you don’t get their controversial result.

At one point they set cell L51 equal to AVERAGE(L30:L44) when the
correct procedure was AVERAGE(L30:L49). By typing wrong, they
accidentally left Denmark, Canada, Belgium, Austria, and Australia out
of the average. When you fix the Excel error, a -0.1 percent growth rate turns into 0.2 percent growth.

Read more:

http://www.nextnewdeal.net/researchers-finally-replicated-reinhart-rogoff-and-there-are-serious-problems#ixzz2QhtHcRj7

http://www.latimes.com/business/money/la-fi-mo-debt-excel-error-20130416,0,4073638.story

http://www.slate.com/blogs/moneybox/2013/04/16/reinhart_rogoff_coding_error_austerity_policies_founded_on_bad_coding.html

http://www.washingtonpost.com/blogs/wonkblog/wp/2013/04/16/is-the-best-evidence-for-austerity-based-on-an-excel-spreadsheet-error/

The reported spreadsheet formula error explains 0.3% of a 2.3% error,
the rest is an argument about selective data, methodology, causation,
correlation, etc. From the look of that table, I doubt if the problem was one of rows added at the bottom. Even if it was, the technical solution from MS is the option “Extend data formats and formulas” which autocorrects formulas at the bottom of columns. Others have checked other averages and found discrepancies which may give rise to suspicion that this was not an unintentional error.

That Reinhart and Rogoff Committed a Spreadsheet Error Completely Misses the Point

http://www.forbes.com/sites/realspin/2013/04/18/that-reinhart-and-rogoff-committed-a-spreadsheet-error-completely-misses-the-point/

http://www.newrepublic.com/article/112951/kenneth-rogoff-carmen-reinhart-and-world-excel-error-research#

http://www.guardian.co.uk/politics/2013/apr/18/uncovered-error-george-osborne-austerity

http://www.guardian.co.uk/commentisfree/2013/apr/18/rogoff-reinhart-deficit-research-false

http://www.guardian.co.uk/commentisfree/2013/apr/16/unemployment-reinhart-rogoff-arithmetic-cause

After being unable to reproduce R&R’s results with publicly available data, HAP were able to get the spreadsheets (zip) that R&R had used for their calculations.

http://www.peri.umass.edu/fileadmin/pdf/working_papers/working_papers_301-350/HAP-RR-GITD-code.zip

(POB: the analysis spreadsheet, crucially, is not in that zip)

http://www.guardian.co.uk/politics/blog/2013/apr/18/comedy-errors-serious-story-missed

http://www.bbc.co.uk/news/magazine-22223190

Posted in Excel/VBA, Research, Risk, Software Testing, Uncategorized | Tagged , , , | Leave a comment

EuSpRIG 2013: The World’s Leading Spreadsheet Risk Management Conference

I’ll be there:

The European Spreadsheet Risks Interest Group 14th Annual Conference (EuSpRIG 2013) will be held at the University of Greenwich, London, on the 4th & 5th July 2013.

EuSpRIG is the world’s only independent, authoritative & comprehensive conference on the current state of the art in spreadsheet risk management. In this forum, researchers, practitioners and educators present and discuss the most recent innovations, trends, experiences and concerns in this critical aspect of end-user computing. The EuSpRIG archive on http://arxiv.org features an enviable range of peer reviewed evidence based scientific papers and presentations. There are plenty of opportunities to network with colleagues facing the same challenges and to meet practitioners and academics researching this rich subject area.

Have a look at the Call for Papers to see what is likely to be discussed.

Posted in Research, Risk | Tagged , , | Leave a comment

Excel 2013 Inquire Addin improved IQ

In my previous blog post I complained that the Excel 2013 INQUIRE addin showed every single formula in A1 style, which is useless for recognising blocks of identical formulas.

So I’ve now done something about that – I am making available for free IQHelper, an Excel addin that further processes the Inquire Workbook Analysis Report, adds a column to the formula listing sheets showing the formula in R1C1 style, and then sorts and groups by that in order to bring identical formulas together.  It also makes the Summary sheet hyperlinked.

The VBA code is unprotected so you can improve on it if you wish – if so, please tell me how it can be improved!

Download from http://www.sysmod.com/IQHelper2.xlam

 

Posted in Excel/VBA, Productivity, Risk | Tagged , , , | Leave a comment

Excel 2013 Inquire first looks

The Inquire Addin is better than nothing, but it seems to be only useful for small spreadsheets.

For example, the Workbook Analysis Report lists all formulas individually, with no concept of how the same formula in relative terms has been copied over areas. I find it hard to believe that such a list would have been accepted as useful in a commercial product.

The worksheet relationship diagram provides little useful information

Worksheet Relationship Diagram

The Cell relationship diagram tries to draw an arrow for every precedent cell including those in a LOOKUP block: again, not very useful:

Cell Relationship Diagram 7350 nodes

I can’t see this replacing XLTest or any other decent commercial spreadsheet auditing package. However, if it gets users aware of the bad smells which the Workbook Analysis Report lists, they may become aware of the need to look further, which is good.

 

Posted in Risk, Software Quality, Software Testing | Tagged , , | Leave a comment

Excel Developer conference London January 2013

Simon Murphy has put out a call for presentations for the meetup of professional Excel Devs end-Jan 2013 in London

http://smurfonspreadsheets.wordpress.com/2012/11/12/2013-excel-developer-conference-london-january-2013/

Posted in Excel/VBA, Software Quality | Tagged , , , | Leave a comment

Migrating an Excel VBA Add-in to a VB.Net XLL with Excel-Dna: update

This document has now grown to a 51 page tutorial.  Comments and corrections are requested.

http://www.sysmod.com/vba-to-vb.net-xll-add-in-with-excel-dna.pdf

I am providing a free addin QualifyVBACode. It takes the VBProject in a workbook and qualifies the xl constants with their enum types, and prefixes ones like ActiveSheet with Application. The search/replace strings are in a XML key/value config file that you can edit. Of course, please read the ReadMe.txt file first after unzipping this (XLL, DNA, DLL, CONFIG) :

 http://www.sysmod.com/QualifyVBAcode.zip

Posted in Excel/VBA, ExcelDna | Tagged , , , | 6 Comments

Chart defined name oddity

I’ve seen this before but can’t remember where. It was discussed on the Excel-L list starting 15 Oct 2012 with the subject line “charting challenge: cannot change title’s (formula) reference to a worksheet cell”
Try this in Excel 2010: in a new workbook, in Sheet1, enter the following data in A1 to A4: Test series, 1, 3, 2
Create three names for A1 :
Check_this
Heading
Retry_this
Create three names for A2:A4:
Any_data
Common_data
Raw_data
Save it as “mytest.xlsx”, select A1:A4, insert a default 2-D column chart. Now try using the named ranges.
1. Select the chart title. In the formula bar, type an = sign and point to A1. It enters =Check_this and you get an error message “The formula you typed contains an error”.
2. Change it to =Sheet1!A1 and it accepts it. Change the value in A1 and the title changes. Fine.
3. Change it to =Sheet1!Heading and it changes it to =mytest.xlsx!Heading and accepts it.
4. Change it to =mytest.xlsx!Retry_this and you get the formula error message.
5. Undo the error and proceed with the next test:
6. Select the series and in the formula bar you should see: =SERIES(Sheet1!$A$1,,Sheet1!$A$2:$A$4,1)
7. Change Sheet1!$A$1 to Sheet1!Check_This and it changes it to “Test series”, the value in A1. Same if you change it to Sheet1!Retry_this.
8. Change Sheet1!$A$1 to =Sheet1!Heading and it changes it to =mytest.xlsx!Heading and accepts it.
9. Change Sheet1!$A$2:$A$4 to Sheet1!Any_data and it changes it to mytest.xlsx!Any_data and accepts it.
10. Change Sheet1!$A$2:$A$4 to Sheet1!common_data and pressing Enter has no effect, and no error message appears. Same for Sheet1!Raw_data

So in summary, you cannot base a chart element on a name that begins with R or C.

Posted in Excel/VBA | Tagged , , , , , , | Leave a comment