0% found this document useful (0 votes)
22 views16 pages

ARIMA

The document discusses ARIMA (Autoregressive Integrated Moving Average) models, which are used for analyzing and forecasting time series data. It explains the structure of AR(p), MA(q), and ARMA(p,q) models, and outlines the process for building an ARIMA model, including checking for stationarity and determining the appropriate differencing. The document also presents examples of model fitting and residual analysis, concluding that simpler models are preferred for forecasting.

Uploaded by

Sand Rukshan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views16 pages

ARIMA

The document discusses ARIMA (Autoregressive Integrated Moving Average) models, which are used for analyzing and forecasting time series data. It explains the structure of AR(p), MA(q), and ARMA(p,q) models, and outlines the process for building an ARIMA model, including checking for stationarity and determining the appropriate differencing. The document also presents examples of model fitting and residual analysis, concluding that simpler models are preferred for forecasting.

Uploaded by

Sand Rukshan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

Time Series and Forecasting

Dr.K.D.Prasangika
Department of Mathematics

1
ARIMA (Box-Jenkins) Models
Introduction to ARIMA models
 The Autoregressive Integrated Moving Average (ARIMA)
models, or Box-Jenkins methodology, are a class of linear
models that is capable of representing stationary as well as
nonstationary time series.

 ARIMA models rely heavily on autocorrelation patterns in


data  both ACF and PACF are used to select an initial
model.
Autoregressive Models AR(p)
 A pth-order autoregressive model, or AR(p), takes the form:

Yt  0  1Yt 1  2Yt  2  ...   pYt  p   t

AR(1) AR(2)

ACF  0 ACF  0
PACF = 0 for lag > 1 PACF = 0 for lag > 2
Moving Average Models MA(q)
 A qth-order moving average model, or MA(q), takes the form:

Yt     t  1 t 1  2 t  2  ...  q t q


:

MA(1) MA(2)

ACF = 0 for lag > 1; PACF  0 ACF = 0 for lag > 2; PACF  0
ARMA(p,q) Models
 A model with autoregressive terms can be combined with a model having
moving average terms to get an ARMA(p,q) model:

Yt  0  1Yt 1  2Yt  2  ...   pYt  p   t  1 t 1  2 t  2  ...  q t  q

 Theoretical behavior of the ACF and PACF for autoregressive-moving average


processes:

ACF PACF

AR(p) Die out Cut off after the order p of


the process

MA(q) Cut off after the order q of Die out


the process

ARMA(p,q) Die out Die out


Building an ARIMA model
 The first step in model identification is to determine whether the series is
stationary. It is useful to look at a plot of the series along with the sample
ACF.

 If the series is not stationary, it can often be converted to a stationary


series by differencing: the original series is replaced by a series of
differences and an ARMA model is then specified for the differenced
series (in effect, the analyst is modeling changes rather than levels)

 Models for nonstationary series are called Autoregressive Integrated


Moving Average models, or ARIMA(p,d,q), where d indicates the amount
of differencing.

 Once a stationary series has been obtained, the analyst must identify the
form of the model to be used by comparing the sample ACF and PACF to
the theoretical ACF and PACF for the various ARIMA models.
ARIMA

Time Series Plot of Index


290

280

270

260
The series show an
Index

250
upward trend.

240

230

220

210
1 6 12 18 24 30 36 42 48 54 60
Index
Autocorrelation Function for Index
(with 5% significance limits for the autocorrelations)

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
ARIMA

Comparing the autocorrelations with their error limits, the only significant
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. The
ACF appears to cut off after lag 1, indicating MA(1) behavior  we will try:
ARIMA(1,1,0) and ARIMA(0,1,1)

Autocorrelation Function for Diff1 Partial Autocorrelation Function for Diff1


(with 5% significance limits for the autocorrelations) (with 5% significance limits for the partial autocorrelations)

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
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
ARIMA

ARIMA(1,1,0) ARIMA(0,1,1)

The LBQ statistics are not significant as indicated by


the large p-values for either model.
The Ljung-Box test
• This is a statistical test that checks if autocorrelation exists
in a time series.

H0 :The residuals are independently distributed.


HA : The residuals are not independently distributed; they
exhibit serial correlation.
ARIMA
Autocorrelation Function for RESI1
(with 5% significance limits for the autocorrelations)

1,0
0,8
0,6
0,4
Autocorrelation

0,2
0,0
-0,2
-0,4
-0,6
-0,8
-1,0
Autocorrelation Function for RESI2
(with 5% significance limits for the autocorrelations)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Lag 1,0
0,8
0,6
0,4

Autocorrelation
0,2
Finally, there is no significant residual 0,0

autocorrelation for the ARIMA(1,1,0) model. -0,2


-0,4
The results for the ARIMA(0,1,1) are similar. -0,6
-0,8
-1,0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Therefore, either model is adequate Lag

and provide nearly the same one-


step-ahead forecasts.
ARIMA
The time series of readings appears to vary about
Time Series Plot of Readings
110 a fixed level of around 80, and the
100 autocorrelations die out rapidly toward zero  the
90 time series seems to be stationary.
80
Readings

70

60
The first sample ACF coefficient is significantly different form
50
zero. The autocorrelation at lag 2 is close to significant and
40

30
opposite in sign from the lag 1 autocorrelation. The remaining
20 autocorrelations are small. This suggests either an MA(1)
1 7 14 21 28 35
Index
42 49 56 63 70
model or an MA(2) model.
The first PACF coefficient is significantly different from zero,
but none of the other partial autocorrelations approaches
Autocorrelation Function for Readings
(with 5% significance limits for the autocorrelations) significance, This suggests an AR(1) or ARIMA(1,0,0)
1,0
0,8 Partial Autocorrelation Function for Readings
(with 5% significance limits for the partial autocorrelations)
0,6
0,4 1,0
Autocorrelation

0,2 0,8

0,0 0,6
Partial Autocorrelation

-0,2 0,4

-0,4 0,2

-0,6 0,0

-0,8 -0,2

-1,0 -0,4
-0,6
2 4 6 8 10 12 14 16 18
Lag -0,8
-1,0

2 4 6 8 10 12 14 16 18
Lag
ARIMA
A constant term is
MA(2) =
included in both
AR(1) = ARIMA(0,0,2)
ARIMA(1,0,0) models to allow for
the fact that the
readings vary about a
level other than zero.

Both models appear to


fit the data well. The
estimated coefficients
are significantly different
from zero and the mean
square (MS) errors are
similar.

Let’s take a look at the residuals ACF…


ARIMA
Autocorrelation Function for RESI1 Autocorrelation Function for RESI2
(with 5% significance limits for the autocorrelations) (with 5% significance limits for the autocorrelations)

1,0 1,0
0,8 0,8
0,6 0,6
0,4 0,4
Autocorrelation

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

Finally, there is no significant residual autocorrelation


for the ARIMA(1,0,0) model. The results for the
ARIMA(0,0,2) are similar.

Therefore, either model is adequate and provide nearly the same three-step-
ahead forecasts. Since the AR(1) model has two parameters (including the
constant term) and the MA(2) model has three parameters, applying the
principle of parsimony we would use the simpler AR(1) model to forecast future
readings.

You might also like