Time Series ARIMA Models Example
-
Upload
nitin-nath-singh -
Category
Documents
-
view
215 -
download
14
description
Transcript of Time Series ARIMA Models Example
7/17/2019 Time Series ARIMA Models Example
http://slidepdf.com/reader/full/time-series-arima-models-example 1/11
Time Series ARIMA Models Example
Ani Katchova
© 2013 by Ani Katchova. All rights reserved.
7/17/2019 Time Series ARIMA Models Example
http://slidepdf.com/reader/full/time-series-arima-models-example 2/11
1
Time Series ARIMA Models Example
We have time series data on ppi (producer price index). Data are quarterly from 1960 to 2002.
Summary statistics: Mean(ppi)=64, mean ((Δ ppi)=0.464.
Graphs in Stata
Original variable (ppi) Differenced variable (Δ ppi)
Original variable does not look stationary.
Differenced variable looks stationary (although the variance increases).
2 0
4 0
6 0
8 0
1 0 0
1 2 0
p r o d u c e r p r i c e i n d e
x
1960q1 1970q1 1980q1 1990q1 2000q1time in quarters
- 4
- 2
0
2
4
p r o d u c e r p r i c e i n d e x ,
D
1960q1 1970q1 1980q1 1990q1 2000q1time in quarters
7/17/2019 Time Series ARIMA Models Example
http://slidepdf.com/reader/full/time-series-arima-models-example 3/11
2
Graphs in R of the original and differenced variable
Graphs in SAS of the original and differenced variable
7/17/2019 Time Series ARIMA Models Example
http://slidepdf.com/reader/full/time-series-arima-models-example 4/11
3
Dickey-Fuller Test
Original variable
D.y or Δyt
With trend
D.y or Δyt
Differenced variable
D2.y or ΔΔyt
Const 0.5036* 0.5861* 0.2067*
L1.y or yt-1 -0.0006
(-0.26)
-0.0084
(-0.793)LD.y or Δyt-1 -0.4452*
(-6.86)
Trend or t 0.0050
Test stat -0.26 -0.793 -6.86
p-value 0.398(Stata)
0.927(SAS)
0.99 (SAS)
0.96 (Stata & R)
<0.001
Conclusion Variable is
not stationary
Variable is not trend
stationary
Differenced variable is
stationary
The Dickey Fuller test shows that the original variable is not stationary, but the differences
variable is stationary so we need to use differences d=1 in the ARIMA models.
7/17/2019 Time Series ARIMA Models Example
http://slidepdf.com/reader/full/time-series-arima-models-example 5/11
4
Correlograms, Autocorrelation function (ACF), and partial autocorrelation function (PACF)
Original variable (ppi) Differenced variable (Δ ppi)LAG ACF PACF LAG ACF PACF
1 0.990 0.999 1 0.553 0.555
2 0.978 -0.555 2 0.336 0.066
3 0.966 -0.069 3 0.319 0.203
4 0.952 -0.209 4 0.217 -0.0315 0.937 0.023 5 0.086 -0.130
6 0.923 0.125 6 0.153 0.149
7 0.908 -0.153 7 0.082 -0.118
8 0.894 0.114 8 -0.078 -0.213
9 0.880 0.210 9 -0.080 -0.051
10 0.866 0.049 10 0.023 0.166
7/17/2019 Time Series ARIMA Models Example
http://slidepdf.com/reader/full/time-series-arima-models-example 6/11
5
ACF and PACF of original variable
For original variable, ACF is a slow decay function (indicating non-stationarity) and PACF cuts off
at lag 1 or 2.
- 1 . 0
0
- 0 . 5
0
0 . 0
0
0 . 5
0
1 . 0
0
A u t o c o r r e l a t i o n s o f p p i
0 10 20 30 40Lag
Bartlett's formula for MA(q) 95% confidence bands
- 0 . 5
0
0 . 0
0
0 . 5
0
1 . 0
0
P a r t i a l a u t o c o r r e l a t i o n s o f p p i
0 10 20 30 40Lag
95% Confidence bands [se = 1/sqrt(n)]
7/17/2019 Time Series ARIMA Models Example
http://slidepdf.com/reader/full/time-series-arima-models-example 7/11
6
7/17/2019 Time Series ARIMA Models Example
http://slidepdf.com/reader/full/time-series-arima-models-example 8/11
7
ACF or PACF of the differenced variable
For differenced variable, ACF tails off and PACF cuts off after lag 1 – use AR(1)?
- 0 . 2
0 0 . 0
0 0 . 2
0 0 . 4
0 0 . 6
0
A u t
o c o r r e l a t i o n s o f D . p p i
0 10 20 30 40Lag
Bartlett's formula for MA(q) 95% confidence bands
- 0 . 2
0 0 . 0
0 0 . 2
0 0 . 4
0 0 . 6
0
P a r t i a l
a u t o c o r r e l a t i o n s o f D . p p i
0 10 20 30 40Lag
95% Confidence bands [se = 1/sqrt(n)]
7/17/2019 Time Series ARIMA Models Example
http://slidepdf.com/reader/full/time-series-arima-models-example 9/11
8
7/17/2019 Time Series ARIMA Models Example
http://slidepdf.com/reader/full/time-series-arima-models-example 10/11
9
ARIMA Models
ARIMA(1,0,0)
ARIMA(2,0,0)
ARIMA(0,0,1)
ARIMA(1,0,1)
ARIMA(1,1,0)
ARIMA(0,1,1)
ARIMA(1,1,1)
ARIMA(1,1,3)
ARIMA(2,1,3)
Const 64.37 64.18 64.69* 64.67* 0.46* 0.47* 0.43* 0.43* 0.44*
L1.ar 0.999* 1.64* 0.99* 0.55* 0.72* 0.73* 1.51*
L2.ar -0.64* -0.71*
L1.ma 1.00* 0.53* 0.48* -0.25* -0.24 -1.05*
L2.ma -0.10 0.21
L3.ma 0.12 0.32*
AIC 502 424 1401 441 393 405 393 392 390
BIC 511 426 1420 543 402 414 406 411 412* These are the Stata results. R has very similar coefficients. In the SAS output, the MA components have reverse
signs than what is reported in this table and some coefficients have different magnitudes.
We know that the variable is not stationary so we need to use differenced variable ARIMA
(p,1,q). But here we also include models with the original variable ARIMA (p,0,q).
The coefficient on the lagged dependent variable is close to 1 indicating non-stationarity.
To select a model to use, look at the significance of the coefficients and also low AIC or BIC.
Usually, there are a few models that perform similarly, so it is up to the researcher to try a fewmodels and decide which one to use. The recommendation is to go with the simplest model.
ARIMA(1,1,1) is a good choice based on low AIC and BIC.
ARIMA(2,1,3) is also a good choice based on the significance of the lags.