## Sunday, April 14, 2013

### Average it is, then

How does FRED think? When you take a time series that's given in "quarterly" values and you change the aggregation to "annual" values, how does that work exactly?

In particular, I'm thinking of the GDP Deflator. You know: the one where the 2005 value is 100, making it easy to compare prices of other years.

GDPDEF, FRED's GDP Deflator, defaults to quarterly values. So, which of the four quarters of 2005 has the value 100??? None of them, as it turns out:

 Graph #1
Second quarter is a little low, third quarter is a little high. First and fourth are worse. I figured as much. It's gotta be the annual numbers that will turn up the special value that has to be there.

But when you look at FRED's GDPDEF page and change the aggregation from quarterly to annual, an option field appears asking whether you want average, sum, or end of period aggregation. Three ways to turn the four quarterly values into the value 100. Which method will work?

I was pretty sure that "sum" would take the four values from 2005 -- all of them in the neighborhood of 100 -- and add them together to give me a result in the neighborhood of 400. And yes, that is what happens. So the "sum" option is not the one.

We are left with two options: the average of the four values, or the last of the four. When you switch quarterly data to annual aggregation, FRED defaults to average aggregation. So I figured that one would give me the value 100. But just to be sure, I plotted the data both ways:

 Graph #2: Aggregation by Average of Values (blue) and by Last of Values (red) Click Graph for FRED Source Page
The second set of red and blue of bars, second from the left, shows the blue bar right there at 100.0, and the red bar higher. For me, this confirms that the well-known GDP Deflator value 100, at FRED at least, is the average of the quarterly values.

I downloaded the numbers, just to be sure. The value for 2005 is 99.993. Close enough for government work. Funny thing, though: It's off by double-o-seven.