Real Personal Consumption Expenditures

Inroduction

Quarterly Real Personal Consumption Expenditures

library(Quandl)
## Loading required package: xts
## Loading required package: zoo
## 
## Attaching package: 'zoo'
## The following objects are masked from 'package:base':
## 
##     as.Date, as.Date.numeric
library(zoo)
library(xts)
library(dygraphs)
library(knitr)
library(forecast)
Quandl.api_key('CEFP3eWxEJwr_uUP9a2D ')
RPCE <- Quandl("FRED/PCECC96", type="ts")

Data

x <- 100* diff(log(RPCE),lag=1)
plot(x, main="Quarterly Log Change in RPCE")

Methodology

The ts of first log differences is stationary. We need to check both ACF and PACF to suggest an ARIMA for our analysis

acf(x, type="correlation", xlab="Lags", ylab="ACF", main="graph 1")

According to our graph above, we can see that our TS might be either MA(1) or MA(2).

acf(x, type="partial", xlab="Lags", ylab="PACF", main="graph 2")

PACF has decaying pattern, so we are going to reject our previous hypothesi. And our model should include both AR and MA components.Now will use “auto.arima” function using both AICc and BIC criterias to find the model with the best forecating power.

arima.aicc <- auto.arima(x, seasonal = FALSE, stationary = TRUE, stepwise = FALSE, ic="aicc")
arima.aicc
## Series: x 
## ARIMA(1,0,2) with non-zero mean 
## 
## Coefficients:
##          ar1      ma1     ma2    mean
##       0.1844  -0.1297  0.3622  0.8168
## s.e.  0.1515   0.1407  0.0597  0.0686
## 
## sigma^2 estimated as 0.5864:  log likelihood=-319.56
## AIC=649.13   AICc=649.35   BIC=667.28
arima.bic <- auto.arima(x, seasonal = FALSE, stationary = TRUE, stepwise = FALSE, ic="bic")
arima.bic
## Series: x 
## ARIMA(0,0,2) with non-zero mean 
## 
## Coefficients:
##          ma1     ma2    mean
##       0.0279  0.3656  0.8166
## s.e.  0.0564  0.0581  0.0635
## 
## sigma^2 estimated as 0.5874:  log likelihood=-320.3
## AIC=648.6   AICc=648.75   BIC=663.12

Is dara stationary ?

plot.Arima(arima.aicc)

plot.Arima(arima.bic)

Our model specifications tells us that data is stationarity and also invertibility of their AR and MA roots.

Now,

tsdiag(arima.aicc)

and

tsdiag(arima.bic)

Conclusion

In this exercise, examined ARIMA(1,0,2) and ARIMA(0,0,2) of first differences in Quarterly Real Personal Consumption Expenditures. Both these models were suggested by (auto.arima) function. Both models have close values of AICc and BIC criterias and do not differ much in ACF of residuals. However, ARIMA(1,0,2) seems to be preferable for forecasting as PACF of the time series suggests to include AR - component in the model.