May 2016:
March 2014:

Friday, November 16, 2018

Frequency Error: The Plot Thickens

To get to the meat, skip down to the bold line near the bottom. To make sense of it, read the whole.

November. I'm writing up something for my econ blog. I refer to my previous look at the same topic, back in March of this year. There is a comment there from my son Jerry. He writes:
Exponential graphs are hard to look at on a linear scale like this -- the right side always looks bigger than the left side, even if it's not really. Maybe look like this?
https://fred.stlouisfed.org/graph/?g=iYoI
It does look by eyeball there like there is a pre/post 1980 change. The blue is always above the red from 1980 to 2008. Whereas they're closer for the rest of the range. I don't know if that means anything...
I looked again at Jerry's graph for the new bit I'm writing. Here's his graph:

Graph #1: Jerry's Graph, created & URL captured in March 2018; screen captured November 16th.
I also screen-grabbed the line edit setting window for each of the lines on that graph:
I captured them today, November 16th, which is to say after the recent FREDGraph revision.

I looked at them a few days ago (also after the recent FREDGraph revision) in relation to my current writing. I noticed then that the Line 1 settings say the frequency is quarterly and the Line 2 settings say the frequency is monthly. This made perfect sense to me, as those are the defaults for GDPC1 and PAYEMS respectively. I figured Jerry forgot to make them match. Here's what I wrote:
... it turns out that Jerry's graph compares quarterly growth rates (for Real GDP) to monthly rates (for employment). This makes his employment line run reliably on the low side of his GDP line (even before 1980)."
I wrote that with Full Faith and Credit that the things FRED was telling me were true. That was a mistake.

Jerry didn't compare monthly employment growth to quarterly RGDP growth. The frequency error is not his. The error is FREDGraph's. Here's how I know:

Today I was proofreading, and when I got to Jerry's Quarterly versus Monthly error and what the graph would look like with that error, I said Let me just check that. So I made a new graph:

Graph #2: PAYEMS Monthly (blue) and Quarterly (red), and GDPC1 (gray)
One difference I see is in the Line Titles. On Graph #2 the blue line is identified as showing monthly data, and the red as showing quarterly data. That's correct. This is a nice feature, and new with this revision I think.

The colors on Graph #2 don't match Graph #1. My bad. What's gray on Graph #2 is blue on Graph #1. But while they differ in color, these two are identical in shape (I hope!).

The other lines (red on #1, red and blue on #2) all show PAYEMS. On Graph #2, the blue is monthly and the red is quarterly. On Graph #1 the red is quarterly but the line edit settings tell me it is monthly. The error is FREDGraph's.


For the hell of it I took Graph #2 and got the Page short URL for it. On the URL version, the titles are right. No lines are missing. And the Units settings are the same as what I had before I got the URL. Looks good!

Uh-oh! In the Edit Line Settings windows, Line 1 says Monthly frequency, which is correct; but Line 2 also says Monthly frequency, which is wrong. Looks like the frequency field is getting its information from the wrong place.

1 comment:

The Arthurian said...

There should be two separate objects: one containing values from the source dataset, or derived therefrom; and another, containing values from (or derived from) the settings for one particular line on a graph.

I think these are not kept separate in the FREDgraph code, and this is a source of problems.