Part Ii - Time Series Analysis: C5 ARIMA (Box-Jenkins) Models
Part Ii - Time Series Analysis: C5 ARIMA (Box-Jenkins) Models
Autoregressive models are appropriate for stationary time series, and the
coefficient Ф0 is related to the constant level of the series.
Theoretical behavior of the ACF and PACF for AR(1) and AR(2) models:
AR(1) AR(2)
AR(1) AR(2)
ACF 0 ACF 0
ACF 0 ACF 0
PACF = 0 for lag > 1 PACF = 0 for lag > 2
PACF = 0 for lag > 1 PACF = 0 for lag > 2
2.5.3: Moving Average Models MA(q)
A qth-order moving average model, or MA(q), takes the form: The term Moving
The term Moving
Average is
Average is
YYt t 1t 1 2t 2 ......qt q YYt tresponse
responsevariable
variableatattime
timet t
historical and
historical and
should not be
t t 1 t 1 2 t 2 q t q should not be
constant
constantmean
meanofofthe
theprocess
process
confused with the
confused with the
moving average
An MA(q) model is a regression model with the dependent moving average
An MA(q) model is a regression model with the dependent
variable, Yt, depending on previous values of the errors i regression
regressioncoefficients
coefficientstotobebeestimated
estimated
smoothing
smoothing
procedures.
variable, Yt, depending on previous values of the errors i procedures.
rather than on the variable itself.
rather than on the variable itself. t k error
errorinintime
timeperiod
periodt t- -kk
t k
MA models are appropriate for stationary time series. The weights ωi do not
necessarily sum to 1 and may be positive or negative.
Theoretical behavior of the ACF and PACF for MA(1) and MA(2) models:
MA(1) MA(2)
MA(1) MA(2)
ACF = 0 for lag > 1; PACF 0 ACF = 0 for lag > 2; PACF 0
ACF = 0 for lag > 1; PACF 0 ACF = 0 for lag > 2; PACF 0
2.5.4: ARMA(p,q) Models
A model with autoregressive terms can be combined with a model Note that:
Note that:
having moving average terms to get an ARMA(p,q) model: • ARMA(p,0) = AR(p)
• ARMA(p,0) = AR(p)
• ARMA(0,q) = MA(q)
• ARMA(0,q) = MA(q)
YYt 0 1YYt 1 2YYt 2 ......pYYt p t 1t 1 2t 2 ......q t q
t 0 1 t 1 2 t 2 p t p t 1 t 1 2 t 2 q t q In practice, the values
In practice, the values
of p and q each rarely
of p and q each rarely
exceed 2.
exceed 2.
ARMA(p,q) models can describe a wide variety of behaviors for
stationary time series.
Theoretical behavior of the ACF and PACF for autoregressive-
moving average processes:
ACF PACF
Die out Cut off after the order
AR(p) p of the process
Once a stationary series has been obtained, the analyst must By counting the number of
By counting the number of
significant sample
identify the form of the model to be used by comparing the significant sample
autocorrelations and partial
autocorrelations and partial
autocorrelations, the orders
sample ACF and PACF to the theoretical ACF and PACF for the autocorrelations, the orders
of the AR and MA parts can
of the AR and MA parts can
be determined.
various ARIMA models. be determined.
Principle of parsimony: “all things being equal, simple models Advice: start with a model
Advice: start with a model
containing few rather than
containing few rather than
are preferred to complex models” many parameters. The
many parameters. The
need for additional
need for additional
parameters will be evident
Once a tentative model has been selected, the parameters for parameters will be evident
from an examination of the
from an examination of the
residual ACF and PACF.
that model are estimated using least squares estimates. residual ACF and PACF.
2.5.5: Building an ARIMA model (2/2)
Many of the same
Before using the model for forecasting, it must be checked for Many of the same
residual plots that are
residual plots that are
useful in regression
adequacy. Basically, a model is adequate if the residuals cannot be useful in regression
analysis can be
analysis can be
used to improve the forecasts, i.e., developed for the
developed for the
residuals from an
residuals from an
ARIMA model
The residuals should be random and normally distributed ARIMA model
(histogram, normal
(histogram, normal
probability plot, time
probability plot, time
The individual residual autocorrelations should be small. Significant sequence plot, etc.)
sequence plot, etc.)
residual autocorrelations at low lags or seasonal lags suggest the
model is inadequate
In general, the
In general, the
longer the forecast
After an adequate model has been found, forecasts can be made. longer the forecast
lead time, the larger
lead time, the larger
the prediction
Prediction intervals based on the forecasts can also be constructed. the prediction
interval (due to
interval (due to
greater uncertainty)
greater uncertainty)
As more data become available, it is a good idea to monitor the
forecast errors, since the model must need to be reevaluated if:
The magnitudes of the most recent errors tend to be consistently
larger than previous errors, or
The recent forecast errors tend to be consistently positive or negative
In addition, for
In addition, for
nonstationary
Seasonal ARIMA (SARIMA) models contain: nonstationary
seasonal series,
seasonal series,
an additional
an additional
Regular AR and MA terms that account for the correlation at low lags seasonal
seasonal
difference is often
difference is often
required
Seasonal AR and MA terms that account for the correlation at the required
seasonal lags
2.5.6: ARIMA with Minitab – Ex. 1 (1/4)
File: PORTFOLIO_INVESTMENT.MTW A consulting corporation wants
A consulting corporation wants
to try the Box-Jenkins
to try the Box-Jenkins
Stat > Time Series > … technique for forecasting the
technique for forecasting the
Transportation Index of the
Transportation Index of the
Dow Jones.
Dow Jones.
Time Series Plot of Index
290
280
The series show an
The series show an
upward trend.
upward trend.
270
260
Index
250
240
230
4
A plot of the
A plot of the 3
differenced data
differenced data 2
appears to vary about
appears to vary about
a fixed level.
Diff1
1
a fixed level.
0
-1
-2
-3
-4
1 6 12 18 24 30 36 42 48 54 60
Comparing the autocorrelations with their error limits, the only significant
Comparing the autocorrelations with their error limits, the only significant Index
autocorrelation is at lag 1. Similarly, only the lag 1 partial autocorrelation is
autocorrelation is at lag 1. Similarly, only the lag 1 partial autocorrelation is
significant. The PACF appears to cut off after lag 1, indicating AR(1) behavior.
significant. The PACF appears to cut off after lag 1, indicating AR(1) behavior.
The ACF appears to cut off after lag 1, indicating MA(1) behavior we will A constant term in each model will be included to allow for the fact that
The ACF appears to cut off after lag 1, indicating MA(1) behavior we will A constant term in each model will be included to allow for the fact that
try: ARIMA(1,1,0) and ARIMA(0,1,1) the series of differences appears to vary about a level greater than zero.
try: ARIMA(1,1,0) and ARIMA(0,1,1) the series of differences appears to vary about a level greater than zero.
1,0 1,0
0,8 0,8
0,6 0,6
Partial Autocorrelation
0,4 0,4
A utocorrelation
0,2 0,2
0,0 0,0
-0,2 -0,2
-0,4 -0,4
-0,6 -0,6
-0,8 -0,8
-1,0 -1,0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Lag Lag
2.5.6: ARIMA with Minitab – Ex. 1 (3/4)
ARIMA(1,1,0) ARIMA(0,1,1)
ARIMA(1,1,0) ARIMA(0,1,1)
1,0
0,8
0,6
0,4
Autocorrelation
0,2
0,0
-0,2
-0,4
-0,6
-0,8
-1,0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Lag
1,0
0,8
Finally, there is no significant residual 0,6
Finally, there is no significant residual
autocorrelation for the ARIMA(1,1,0) model.
autocorrelation for the ARIMA(1,1,0) model. 0,4
Autocorrelation
70
60
The first sample ACF coefficient is significantly different form zero. The
The first sample ACF coefficient is significantly different form zero. The
autocorrelation at lag 2 is close to significant and opposite in sign from the lag 1
50 autocorrelation at lag 2 is close to significant and opposite in sign from the lag 1
autocorrelation. The remaining autocorrelations are small. This suggests either an
autocorrelation. The remaining autocorrelations are small. This suggests either an
40 AR(1) model or an MA(2) model.
AR(1) model or an MA(2) model.
30 The first PACF coefficient is significantly different from zero, but none of the other
The first PACF coefficient is significantly different from zero, but none of the other
20 partial autocorrelations approaches significance, This suggests an AR(1) or
partial autocorrelations approaches significance, This suggests an AR(1) or
1 7 14 21 28 35 42 49 56 63 70 ARIMA(1,0,0)
Index ARIMA(1,0,0)
1,0 1,0
0,8 0,8
0,6 0,6
Partial Autocorrelation
0,4 0,4
Autocorrelation
0,2 0,2
0,0 0,0
-0,2 -0,2
-0,4 -0,4
-0,6 -0,6
-0,8 -0,8
-1,0 -1,0
2 4 6 8 10 12 14 16 18 2 4 6 8 10 12 14 16 18
Lag Lag
2.5.7: ARIMA with Minitab – Ex. 2 (2/3)
A constant term is
A constant term is
included in both MA(2) =
included in both MA(2) =
AR(1) = models to allow for ARIMA(0,0,2)
AR(1) = models to allow for ARIMA(0,0,2)
ARIMA(1,0,0) the fact that the
ARIMA(1,0,0) the fact that the
readings vary about a
readings vary about a
level other than zero.
level other than zero.
1,0
0,8
0,6
0,4
Autocorrelation
0,2
0,0
-0,2
-0,4
-0,6
-0,8
-1,0
2 4 6 8 10 12 14 16 18
Lag
1,0
Finally, there is no significant residual 0,8
Finally, there is no significant residual
autocorrelation for the ARIMA(1,0,0) model. 0,6
autocorrelation for the ARIMA(1,0,0) model.
The results for the ARIMA(0,0,2) are similar.
The results for the ARIMA(0,0,2) are similar. 0,4
A utocorrelation
0,2
0,0
-0,2
-0,4
Therefore, either model is adequate and provide nearly the same three- -0,6
Therefore, either model is adequate and provide nearly the same three-
step-ahead forecasts. Since the AR(1) model has two parameters
step-ahead forecasts. Since the AR(1) model has two parameters -0,8
(including the constant term) and the MA(2) model has three parameters,
(including the constant term) and the MA(2) model has three parameters, -1,0
applying the principle of parsimony we would use the simpler AR(1)
applying the principle of parsimony we would use the simpler AR(1)
model to forecast future readings. 2 4 6 8 10 12 14 16 18
model to forecast future readings.
Lag