Real Personal Consumption Expenditures , General View

## Loading required package: xts
## Loading required package: zoo
## 
## Attaching package: 'zoo'
## The following objects are masked from 'package:base':
## 
##     as.Date, as.Date.numeric
## 'data.frame':    280 obs. of  2 variables:
##  $ DATE   : Date, format: "2016-10-01" "2016-07-01" ...
##  $ PCECC96: num  11670 11569 11485 11365 11319 ...
##  - attr(*, "freq")= chr "quarterly"
##       DATE               PCECC96     
##  Min.   :1947-01-01   Min.   : 1199  
##  1st Qu.:1964-06-08   1st Qu.: 2253  
##  Median :1981-11-16   Median : 4064  
##  Mean   :1981-11-15   Mean   : 5097  
##  3rd Qu.:1999-04-23   3rd Qu.: 7753  
##  Max.   :2016-10-01   Max.   :11670
##         DATE PCECC96
## 1 2016-10-01 11669.8
## 2 2016-07-01 11569.0
## 3 2016-04-01 11484.9
## 4 2016-01-01 11365.2
## 5 2015-10-01 11319.3
## 6 2015-07-01 11255.9
##           DATE PCECC96
## 275 1948-04-01  1244.1
## 276 1948-01-01  1229.8
## 277 1947-10-01  1223.6
## 278 1947-07-01  1223.3
## 279 1947-04-01  1219.3
## 280 1947-01-01  1199.4

Basic Data plot The purpose of plotting the data is to check whether our variable is stationary or non-stationary. In this case, the expenditure variable is non-stationary. For this reason we have to run the Augmented Dickey-Fuller Test. But first, we have to take the first difference of the logarithm of the data.

## Warning in plot.window(...): "Ylab" is not a graphical parameter
## Warning in plot.xy(xy, type, ...): "Ylab" is not a graphical parameter
## Warning in axis(side, at = z, labels = labels, ...): "Ylab" is not a
## graphical parameter
## Warning in axis(side = side, at = at, labels = labels, ...): "Ylab" is not
## a graphical parameter
## Warning in box(...): "Ylab" is not a graphical parameter
## Warning in title(...): "Ylab" is not a graphical parameter

Construction of Partial Autocorrelation Function (PACF) and Auto-correlation Function(ACF) helps us to understand the relation between data over period of time. Hence, those functions are designed.

ACF Plot

n AR(p) model, PACF cuts off after p lag while in MA(q) model, ACF cuts off after q lag. In our case, I didn’t clear condition in ACF and PACF. However, I saw change in trend after lag of three.

ESTIMATION AND CHECKING FOR ADEQUACY OF MODELS

Designing AR(p) model

Lets look at AR(1)- AR(5) models. Value of AIC is considered while examining the adequacy of the model.

## 
## Call:
## arima(x = dlconsumption, order = c(1, 0, 0))
## 
## Coefficients:
##          ar1  intercept
##       0.0912    -0.0082
## s.e.  0.0596     0.0005
## 
## sigma^2 estimated as 6.561e-05:  log likelihood = 947.75,  aic = -1889.5

## 
## Call:
## arima(x = dlconsumption, order = c(2, 0, 0))
## 
## Coefficients:
##          ar1     ar2  intercept
##       0.0613  0.3188    -0.0082
## s.e.  0.0566  0.0566     0.0007
## 
## sigma^2 estimated as 5.888e-05:  log likelihood = 962.73,  aic = -1917.47

## 
## Call:
## arima(x = dlconsumption, order = c(3, 0, 0))
## 
## Coefficients:
##          ar1     ar2     ar3  intercept
##       0.0560  0.3179  0.0156    -0.0082
## s.e.  0.0599  0.0567  0.0599     0.0008
## 
## sigma^2 estimated as 5.887e-05:  log likelihood = 962.77,  aic = -1915.53

## 
## Call:
## arima(x = dlconsumption, order = c(4, 0, 0))
## 
## Coefficients:
##          ar1     ar2     ar3      ar4  intercept
##       0.0585  0.3648  0.0238  -0.1447    -0.0082
## s.e.  0.0593  0.0594  0.0593   0.0592     0.0007
## 
## sigma^2 estimated as 5.762e-05:  log likelihood = 965.72,  aic = -1919.44

## 
## Call:
## arima(x = dlconsumption, order = c(5, 0, 0))
## 
## Coefficients:
##          ar1     ar2     ar3      ar4      ar5  intercept
##       0.0583  0.3649  0.0243  -0.1446  -0.0013    -0.0082
## s.e.  0.0600  0.0594  0.0635   0.0593   0.0599     0.0007
## 
## sigma^2 estimated as 5.762e-05:  log likelihood = 965.72,  aic = -1917.44

As we have relatively small sample size (i.e. 280), calculation of BIC will provide another approach for estimation of model adequacy. BICs are calculated in each model.

## [1] -1878.603
## [1] -1902.94
## [1] -1897.377
## [1] -1897.654
## [1] -1892.023

Among all 5 AR models, AR(4) has lowest AIC and that is -1919.44.However, AR2 has lowest BIC of -1902.94. Since in smaller sample, BIC gives more accuracy, AR2 is good model.This makes AR(2)adequate model.

Constructing MA(q) Models

## 
## Call:
## arima(x = dlconsumption, order = c(0, 0, 1))
## 
## Coefficients:
##          ma1  intercept
##       0.0557    -0.0082
## s.e.  0.0468     0.0005
## 
## sigma^2 estimated as 6.582e-05:  log likelihood = 947.29,  aic = -1888.59

## 
## Call:
## arima(x = dlconsumption, order = c(0, 0, 2))
## 
## Coefficients:
##          ma1     ma2  intercept
##       0.0278  0.3657    -0.0082
## s.e.  0.0564  0.0581     0.0006
## 
## sigma^2 estimated as 5.811e-05:  log likelihood = 964.54,  aic = -1921.09

## 
## Call:
## arima(x = dlconsumption, order = c(0, 0, 3))
## 
## Coefficients:
##          ma1     ma2     ma3  intercept
##       0.0557  0.3688  0.0709    -0.0082
## s.e.  0.0600  0.0575  0.0575     0.0007
## 
## sigma^2 estimated as 5.779e-05:  log likelihood = 965.3,  aic = -1920.6

## 
## Call:
## arima(x = dlconsumption, order = c(0, 0, 4))
## 
## Coefficients:
##          ma1     ma2     ma3      ma4  intercept
##       0.0556  0.3677  0.0710  -0.0042    -0.0082
## s.e.  0.0599  0.0605  0.0575   0.0742     0.0007
## 
## sigma^2 estimated as 5.779e-05:  log likelihood = 965.3,  aic = -1918.61

## 
## Call:
## arima(x = dlconsumption, order = c(0, 0, 5))
## 
## Coefficients:
##          ma1     ma2     ma3      ma4     ma5  intercept
##       0.0558  0.3672  0.0789  -0.0056  0.0118    -0.0082
## s.e.  0.0600  0.0606  0.0743   0.0748  0.0707     0.0007
## 
## sigma^2 estimated as 5.778e-05:  log likelihood = 965.32,  aic = -1916.63

## [1] -1877.693
## [1] -1906.561
## [1] -1902.448
## [1] -1896.82
## [1] -1891.216

MA (2) has lowest AIC among all 5 Models,ence, AR(2) and MA(2) are best among all the ten models studied.