First try: AR(1) yt      yt 1  at Use MINITAB’s ARIMA-procedure.

Download Report

Transcript First try: AR(1) yt      yt 1  at Use MINITAB’s ARIMA-procedure.

First try: AR(1)
yt      yt 1  at
Use MINITAB’s ARIMA-procedure
ARIMA Model
ARIMA model for CPIChnge
Final Estimates of Parameters
Type
AR
1
Constant
Mean
Coef
StDev
T
P
0,8247
0,1048
7,87
0,000
0,7634
0,3347
2,28
0,030
4,354
1,909
Number of observations:
Residuals:
33
SS =
111,236
MS =
3,588
(backforecasts excluded)
DF = 31
Modified Box-Pierce (Ljung-Box) Chi-Square statistic
Lag
Chi-Square
DF
P-Value
12
24
36
48
25,9
32,2
*
*
10
22
*
*
0,004
0,075
*
*
ARIMA Model
ARIMA model for CPIChnge
Final Estimates of Parameters
Type
AR
1
Constant
Mean
Coef
StDev
T
P
0,8247
0,1048
7,87
0,000
0,7634
0,3347
2,28
0,030
4,354
1,909
Number of observations:
Residuals:
33
SS =
111,236
MS =
3,588
(backforecasts excluded)
DF = 31
Modified Box-Pierce (Ljung-Box) Chi-Square statistic
Lag
Chi-Square
DF
P-Value
12
24
36
48
25,9
32,2
*
*
10
22
*
*
0,004
0,075
*
*
Ljung-Box statistic:
K
Q* K   n  d  n  d  2   n  d  l   rl 2 (aˆ )
l 1
where
n is the sample size
d is the degree of nonseasonal differencing used to tranform
original series to be stationary. Nonseasonal means taking
differences at lags nearby, which can be written (1–B)d
rl2(â) is the sample autocorrelation at lag l for the residuals
of the estimated model.
K is a number of lags covering multiples of seasonal cycles,
e.g. 12, 24, 36,… for monthly data
Under the assumption of no correlation left in the residuals the
Ljung-Box statistic is chi-square distributed with K – nC degrees of
freedom, where nC is the number of estimated parameters in model
except for the constant 
 A low P-value for any K should be taken as evidence for
correlated residuals, and thus the estimated model must be revised.
ARIMA Model
ARIMA model for CPIChnge
Final Estimates of Parameters
Type
AR
1
Constant
Mean
Coef
StDev
T
P
0,8247
0,1048
7,87
0,000
0,7634
0,3347
2,28
0,030
4,354
1,909
Number of observations:
Residuals:
33
SS =
111,236
MS =
3,588
(backforecasts excluded)
DF = 31
Modified Box-Pierce (Ljung-Box) Chi-Square statistic
Lag
Chi-Square
DF
P-Value
12
24
36
48
25,9
32,2
*
*
10
22
*
*
0,004
0,075
*
*
Low P-value for K=12.
 Problems with residuals
at nonseasonal level
Study SAC and SPAC for the original series:
PACF look not fully consistent with AR(1)
More than one significant spike (2 it seems)
If an AR(p)-model is correct, the ACF should
decrease exponentially (montone or oscillating)
and PACF should have exactly p significant
spikes
 Try an AR(2)
ARIMA Model
ARIMA model for CPIChnge
Final Estimates of Parameters
Type
Coef
StDev
T
P
AR
1
1,1872
0,1625
7,31
0,000
AR
2
-0,4657
0,1624
-2,87
0,007
1,3270
0,2996
4,43
0,000
4,765
1,076
Constant
Mean
Number of observations:
Residuals:
OK!
33
SS =
88,6206
MS =
2,9540
(backforecasts excluded)
DF = 30
Modified Box-Pierce (Ljung-Box) Chi-Square statistic
Lag
Chi-Square
DF
P-Value
12
24
36
48
19,8
25,4
*
*
9
21
*
*
0,019
0,231
*
*
Still not OK
Might still be problematic.
Could it be the case of an Moving Average (MA)
model?
MA(1):
yt    at   at 1
at
are still assumed to be
uncorrelated and identically
distributed with mean zero and
constant variance
MA(q):
yt    at 1  at 1  q  at q
• always stationary
• mean= 
• is in effect a moving average with weights
1,1,2, ,q
for the (unobserved) values at , at 1 ,, at q
Time Series Plot of AR(1)_0.2
Time Series Plot of MA(1)_0.2
5
3
2
3
MA(1)_0.2
AR(1)_0.2
4
2
1
0
-1
1
-2
0
1
20
40
60
80
100
Index
120
140
160
180
-3
200
1
30
60
Time Series Plot of AR(1)_0.8
120
150
Index
180
210
240
270
300
240
270
300
Time Series Plot of MA(1)_0.8
4
14
13
3
12
2
11
1
MA(1)_0.8
AR(1)_0.8
90
10
9
8
0
-1
-2
7
-3
6
5
-4
1
20
40
60
80
100
Index
120
140
160
180
200
1
30
60
90
120
150
Index
180
210
Time Series Plot of AR(1)_(-0.5)
Time Series Plot of MA(1)_(-0.5)
5
4
4
3
2
2
MA(1)_(-0.5)
AR(1)_(-0.5)
3
1
0
1
0
-1
-1
-2
-2
-3
-3
1
20
40
60
80
100
Index
120
140
160
180
200
1
30
60
90
120
150
Index
180
210
240
270
300
Try an MA(1):
ARIMA Model
ARIMA model for CPIChnge
Final Estimates of Parameters
Type
Coef
StDev
T
P
-0,9649
0,1044
-9,24
0,000
Constant
4,8018
0,5940
8,08
0,000
Mean
4,8018
0,5940
MA
1
Number of observations:
Residuals:
33
SS =
104,185
MS =
3,361
(backforecasts excluded)
DF = 31
Modified Box-Pierce (Ljung-Box) Chi-Square statistic
Lag
Chi-Square
DF
P-Value
12
24
36
48
33,8
67,6
*
*
10
22
*
*
0,000
0,000
*
*
Still seems to be problems with residuals
Look again at ACF and PACF of original series:
The pattern corresponds neither with AR(p), nor
with MA(q)
Could it be a combination of these two?
Auto Regressive Moving Average (ARMA) model
ARMA(p,q):
yt    1  yt 1    p  yt  p  at 1  at 1 q  at q
• stationarity
conditions harder to define
• mean value calculations more difficult
• identification patterns exist, but might be
complex: exponentially decreasing patterns or
sinusoidal decreasing patterns in both ACF and
PACF (no cutting of at a certain lag)
Time Series Plot of ARMA(1,1)_(-0.2)(-0.2)
3
2
2
ARMA(1,1)_(-0.2)(-0.2)
3
1
0
-1
-2
1
0
-1
-2
-3
-3
1
30
60
90
120
150
Index
180
210
240
270
300
1
30
60
90
120
Time Series Plot of ARMA(2,1)_(0.1)(0.1)_(-0.1)
3
ARMA(2,1)_(0.1)(0.1)_(-0.1)
ARMA(1,1)_(0.2)(0.2)
Time Series Plot of ARMA(1,1)_(0.2)(0.2)
2
1
0
-1
-2
-3
-4
1
30
60
90
120
150
Index
180
210
240
270
300
150
Index
180
210
240
270
300
Always try to keep p and q small.
Try an ARMA(1,1):
ARIMA Model
ARIMA model for CPIChnge
Unable to reduce sum of squares any further
Final Estimates of Parameters
Type
Coef
StDev
T
P
AR
1
0,6513
0,1434
4,54
0,000
MA
1
-0,9857
0,0516
-19,11
0,000
1,5385
0,4894
3,14
0,004
4,412
1,403
Constant
Mean
Number of observations:
Residuals:
33
SS =
61,8375
MS =
2,0613
(backforecasts excluded)
DF = 30
Modified Box-Pierce (Ljung-Box) Chi-Square statistic
Lag
Chi-Square
DF
P-Value
12
24
36
48
9,6
17,0
*
*
9
21
*
*
0,386
0,713
*
*
Calculating forecasts
For AR(p) models quite simple:
yˆ t 1  ˆ  ˆ1  yt  ˆ2  yt 1    ˆp  yt ( p 1)
yˆ t  2  ˆ  ˆ1  yˆ t 1  ˆ2  yt    ˆp  yt ( p  2 )

yˆ t  p  ˆ  ˆ1  yˆ t  ( p 1)  ˆ2  yˆ t  ( p  2 )    ˆp  yt
yˆ t  p 1  ˆ  ˆ1  yˆ t  p  ˆ2  yˆ t  ( p 1)    ˆp  yˆ t 1
at  k is set to 0 for all values of k
For MA(q) ??
MA(1):
yˆt  ˆ  at ˆ  at 1
If we e.g. would set a t and at 1 equal to 0
the forecast would constantly be ˆ .
which is not desirable.
Note that
yt 1    at 1    at  2
yt    at    at 1
at  2  0 
at  yt    yt 1  (1   )  

aˆt  yt  ˆ  yt 1  (1  ˆ)  ˆ
Similar investigations for ARMA-models.