Monday, June 24, 2013

Can a normal citizen make sense of Economics?

Can a normal citizen make sense of Economics?

Can a normal citizen make sense of Economics?

Graph: Real Gross Domestic Product, 1 Decimal (GDPC1)

Here's a few links that inspired me to explore this:

If I wanted to understand what was happening and get around all the garbage that is being spewed at me by politicians and the so called media, then it seems that I need to start learning to do the analysis for myself.

Can one do the analysis for themselves?

Perhaps something along the lines of using autoregressive integrated moving average (ARIMA) models with the R Project for Statistical Computing software:

Dataset Information:

y <- Quandl("FRED/GDP", type = "xts")
layout(matrix(c(1, 1, 2, 3), 2, 2, byrow = TRUE))
plot.ts(y, main = "FRED/GDP", ylab = "FRED/GDP")
acf(y, main = "Autocorrelations", ylim = c(-1, 1))
pacf(y, main = "Partial Autocorrelations", ylim = c(-1, 1))

plot of chunk unnamed-chunk-2

The autocorrelations trail off slowly, so we'll need to difference at least once. The single spike at lag one in the partial autocorrelations indicates an AR(n)-process.

library(forecast)
## This is forecast 4.05
fcst <- forecast(auto.arima(y), h = 20)
## Warning: p-value smaller than printed p-value
## Warning: p-value smaller than printed p-value
## Warning: p-value greater than printed p-value
plot(fcst, main = "FRED/GDP")

plot of chunk unnamed-chunk-3

Of course this is garbage, because I haven't actually figured out what I'm doing yet, run any diagnostics, validated anything, nor extracted any results.

Besides the substance, I need to clean it up, put dates on the plots and setup to track my forecasts and compare them to published forecasts.

Gary Young

No comments:

Post a Comment