Thursday, April 18, 2013

Four times they call it a "coding error"


From WSJ: Reinhart, Rogoff Admit Excel Mistake:

Herndon, Ash and Pollin accurately point out the coding error that omits several countries from the averages in figure 2.

If you're not so hot with Excel, I guess you could call it a "coding" error. It's a goddam click-and-drag mistake, that's all it is. An embarrassingly amateurish mistake.

Here's the thing: When they selected the values for a list of 20 countries, they missed the last five values. Konczal has a screen clip:
New link for the Konczal post, 25 April 2018


See the dark blue rectangle with a dot in each corner? Column L, rows 30 to 44. That's a "range" of cells that somebody used in a calculation.

What calculation? Lower right corner, Cell L51, the calculation begins with an equal sign and takes the average value of the cells in the dark blue box.

The blue box should have gone all the way down to row 49. If it did, it would have included one more actual value. Would it have made much difference? I don't know. But the cell-selection would have been right, at least.

If I made a mistake like that in a spreadsheet at work, the boss would somehow figure it out right away and I'd get reamed for it, fairly. And then we would go back to work. So should y'all now.


Having gone back to work myself, the focus of this post changes.

Last December, in Simulacron: Make that three trends I showed this graph of inflation-adjusted GDP with three different trend paths:

Graph #1: Stages of the slowdown in real growth

I wrote:

By the fourth quarter of 2007 when real GDP reached 13.3 trillion, blue trend GDP was 17 trillion, more than 25% greater.

Twenty-five percent.

In the "R&R Admit" post linked at the top, Reinhart and Rogoff write:

It is utterly misleading to speak of a 1% growth differential that lasts 10-25 years as small. If a country grows at 1% below trend for 23 years, output will be roughly 25% below trend at the end of the period, with massive cumulative effects.

Twenty-five percent. Reinhart and Rogoff got this one right, guys.

Give 'em a break.

// 10:54 pm Update:

Come to think of it, the Gross Federal Debt fell from over 90% of GDP in the late 1940s to just over 30% in 1974, skidded along the bottom until 1981, and then started going up:

Graph #2: Gross Federal Debt as a Percent of GDP

According to Graph #1, the economy grew with vigor until the Federal Debt reached a low point. And then, with Federal debt at a low, the economy lost its vigor. And for the three decades since the early 1980s the economy grew about 1% slower than in the three decades before the early 1980s.

So according to these two graphs, one could say it was the lowness of the Federal debt that caused the slowdown in economic growth.

And as Reinhart and Rogaine point out, a long period of 1% slower growth has "massive cumulative effects".

What everybody seems to miss in all of this, is that when the Federal debt was high in the early years of Graph #2, private debt was at a low point. Today the Federal debt is high again, and private debt is also at a high point.

In the early years, accumulated private debt did not interfere with private sector growth. Today it does.

7 comments:

Luke The Debtor said...

You can put this one up there next to the crashed Mars expedition due to conversion failure. I usually use Ctrl+D and Ctrl+R to drag and paste.

1% over 25 years? Yeah, kind of a big deal when there are big numbers involved.

Clonal said...

It is not a drag issue the white rows, that are not included are interspersed with blue rows. I was deliberate and not a mistake.

Just like with Milton and his inflation & money supply.

See also Arindrajit Dube's analysis Guest Post: Reinhart/Rogoff and Growth in a Time Before Debt

Clonal said...

Why do people continue to say that "R&R averaged rows 30-44 instead of rows 30-49." They did not do that. Rows 30, 32, 34-36, 38-43, 45 and 47-48 were averaged. This is clearly visible in the graphic of the spreadsheet that has circulated. So why do people continue to say that it was a dragging error? It could only have been done by selective choice, and not by a dragging error.

The Arthurian said...

Oh I see what you're looking at, the blue versus white cell background color.

I don't know what that coloration is supposed to represent. But it looks to me like they just selected those cells and set the background color, just as they did for the country names US, New Zealand, and Ireland. And just as they did for the green areas.

In Konczal's screen clip, all four columns I, J, K, and L show the same background coloration. But only column L has the dark blue box with a dot in each corner. And only column L shows the formula (rather than the result of the calculation) in row 51 at the bottom. (As displayed, the formula runs over from column L to column M, but that is just so we can see the whole thing. Excel does that automatically. The formula is really only in cell L51.)

If you want to check your work in Excel, you can go (for example) to cell L51 and then press the F2 key. (That's probably what Konczal did, press the F2 key.) This will show you the formula in the cell (as we see in Konczal's clip) PLUS it draws a box around the cells used in the calculation -- the dark blue box shown in the screen clip.

Notice also the color coordination between the dark blue box color and the text (L30:L44) in cell L51 where the formula is displayed. The range of cells shown by the box is described for Excel's purposes by the starting cell L30 and the ending cell L44, with a colon between the two cell names.

I know for a fact that cell L51 calculates the average of the cells in the dark blue box, because those are the cells identified in parentheses after the word AVERAGE in the lower right corner of the screen clip.

By the way, I did the math: The three other averages shown on row 51 in the clip ALSO exclude the values on rows 45 thru 49. ALL FOUR columns have the same mistake. This suggests to me that it *is* a mistake, not an intentional thing. I've done it many times: compound a dumb mistake by copying it and using it everywhere!

shtove said...

Rogaine? Yes, it is all about growth!

Clonal said...

Art,
You are right. My mistake. It could well have been a dragging mistake.

The Arthurian said...

RE R&R's "coding error":

"Herndon, Ash, and Pollin ... found a dumb error in Reinhart and Rogoff’s spreadsheet– Reinhart and Rogoff left the first 5 countries in the alphabet (Australia, Austria, Belgium, Canada, and Denmark) out of the set of cells selected for averaging. This is a numbskull error..."

Yup. What I said.

"... but it turns out it would only have changed the estimate they reported by a few tenths of a percent." -- James Hamilton