Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
and Planning
The Box-Jenkins Methodology for
ARIMA Models
Introduction
Introduction
Introduction
Introduction
Introduction
Identification
Estimation and testing
Application
Introduction
Identification
Data preparation
Model selection
Introduction
Estimation
Diagnostics
Introduction
Application
rk
(y
t k 1
y )( yt k y )
(y
t 1
y)2
Autocorrelation
0.6
0.4
0.2
0.0
-0.2
-0.4
-0.6
-0.8
-1.0
1
6
Lag
10
For example
1
1
1.96
.3099
n
40
If this is not the case then the series is not white noise.
The sampling distribution and standard error allow us to
distinguish what is randomness or white noise from what
is pattern.
Portmanteau tests
Q n rk2
Usually h 20 is selected
k 1
Portmanteau tests
Example
Example
Portmanteau tests
k 1
1 2
k
Partial Autocorrelation
0.8
0.6
0.4
0.2
0.0
-0.2
-0.4
-0.6
-0.8
-1.0
1
6
Lag
10
Random Walk
Random Walk
yt yt 1 et
Random Walk
Seasonal differencing
y t yt yt s
Seasonal differencing
Seasonal differencing
Seasonal differencing
Seasonal differencing
Seasonal differencing
Seasonal differencing
Seasonal differencing
Seasonal differencing
Seasonal differencing
Seasonal differencing
Seasonal differencing
Seasonal differencing
Seasonal differencing
Seasonal differencing
Where
yt represents the differenced series y t yt 1
The number of lagged terms p, is usually set to 3.
Autoregression
Define
x1 yt 1
x 2 yt 2
x p yt p
There is no AR part.
There is no MA part.
There is one difference.
ARIMA(2, 0, 0) = AR(2)
ARIMA (1, 0, 1) = ARMA(1, 1)
20
40
60
80
100
120
140
160
180
200
Autocorrelation
0.6
0.4
0.2
0.0
-0.2
-0.4
-0.6
-0.8
-1.0
1
10
15
20
25
Lag
30
35
40
45
50
Partial Autocorrelation
0.8
0.6
0.4
0.2
0.0
-0.2
-0.4
-0.6
-0.8
-1.0
2
10
Lag
12
14
16
18
20
20
40
60
80
100
120
140
160
180
200
Autocorrelation
0.6
0.4
0.2
0.0
-0.2
-0.4
-0.6
-0.8
-1.0
1
10
15
20
25
Lag
30
35
40
45
50
Partial Autocorrelation
0.8
0.6
0.4
0.2
0.0
-0.2
-0.4
-0.6
-0.8
-1.0
2
10
Lag
12
14
16
18
20
For p =1
-1< 1 < 1
For p = 2
-1< 2 < 1
1+ 2 <1
2- 1 <1
20
40
60
80
100
120
140
160
180
200
Autocorrelation
0.6
0.4
0.2
0.0
-0.2
-0.4
-0.6
-0.8
-1.0
1
10
15
20
25
Lag
30
35
40
45
50
Partial Autocorrelation
0.8
0.6
0.4
0.2
0.0
-0.2
-0.4
-0.6
-0.8
-1.0
2
10
Lag
12
14
16
18
20
For q =1
-1 < 1 < 1
For q =2
-1 < 2 < 1
1 + 2 < 1
2 - 1 < 1
Seasonal MA model:
ARIMA(0,0,0)(0,0,1)12
ARIMA(0,0,0)(1,0,0)12
Model identification
Model identification
Model identification
Check the plots again if they appear nonstationary, take the differences of the
differenced data.
Model identification
When the stationarity has been achieved,
check the ACF and PACF plots for any
pattern remaining.
There are three possibilities
AR or MA models
Model identification
Model identification
Example
Model identification
Time Series Plot of Number of Users
240
220
Number of Users
200
180
160
140
120
100
80
1
10
20
30
40
50
60
Minutes
70
80
90
100
Model identification
Autocorrelation Function for Number of Users
(with 5% significance limits for the autocorrelations)
1.0
0.8
Autocorrelation
0.6
0.4
0.2
0.0
-0.2
-0.4
-0.6
-0.8
-1.0
2
10
Lag
12
14
16
18
20
Model identification
Partial Autocorrelation Function for Number of Users
(with 5% significance limits for the partial autocorrelations)
1.0
Partial Autocorrelation
0.8
0.6
0.4
0.2
0.0
-0.2
-0.4
-0.6
-0.8
-1.0
2
10
Lag
12
14
16
18
20
Model identification
Model identification
Time Series Plot of first difference
15
first difference
10
5
0
-5
-10
-15
1
10
20
30
40
50
60
Minutes
70
80
90
100
Model identification
Autocorrelation Function for first difference
(with 5% significance limits for the autocorrelations)
1.0
0.8
Autocorrelation
0.6
0.4
0.2
0.0
-0.2
-0.4
-0.6
-0.8
-1.0
2
10
Lag
12
14
16
18
20
Model identification
Partial Autocorrelation Function for first difference
(with 5% significance limits for the partial autocorrelations)
1.0
Partial Autocorrelation
0.8
0.6
0.4
0.2
0.0
-0.2
-0.4
-0.6
-0.8
-1.0
2
10
Lag
12
14
16
18
20
Model identification
Model identification
Example
Model identification
Time Series Plot of Sales
1100
1000
900
Sales
800
700
600
500
400
300
200
Month J an
Year 1963
Jan
1964
Jan
1965
Jan
1966
Jan
1967
Jan
1968
Jan
1969
Jan
1970
Jan
1971
Jan
1972
Model identification
Autocorrelation Function for Sales
(with 5% significance limits for the autocorrelations)
1.0
0.8
Autocorrelation
0.6
0.4
0.2
0.0
-0.2
-0.4
-0.6
-0.8
-1.0
1
10
15
20
Lag
25
30
35
40
Model identification
Partial Autocorrelation Function for Sales
(with 5% significance limits for the partial autocorrelations)
1.0
Partial Autocorrelation
0.8
0.6
0.4
0.2
0.0
-0.2
-0.4
-0.6
-0.8
-1.0
2
10
Lag
12
14
16
18
20
Model identification
Model identification
Time Series Plot of first difference of seasonal
200
100
-100
-200
Month J an
Year 1964
Jan
1965
Jan
1966
Jan
1967
Jan
1968
Jan
1969
Jan
1970
Jan
1971
Jan
1972
Jan
1973
Model identification
Autocorrelation Function for first difference of seasonal
(with 5% significance limits for the autocorrelations)
1.0
0.8
Autocorrelation
0.6
0.4
0.2
0.0
-0.2
-0.4
-0.6
-0.8
-1.0
1
10
15
20
Lag
25
30
35
40
Model identification
Partial Autocorrelation Function for first difference of seasonal
(with 5% significance limits for the partial autocorrelations)
1.0
Partial Autocorrelation
0.8
0.6
0.4
0.2
0.0
-0.2
-0.4
-0.6
-0.8
-1.0
1
10
15
20
Lag
25
30
35
40
Model identification
Model identification
Model identification
Example 3
Model identification
Time Series Plot of shipment
6000
5000
shipment
4000
3000
2000
1000
0
Month
Year
J an
J an
1986 1987
J an
J an
1988 1989
J an
1990
J an
1991
J an
J an
1992 1993
Jan
J an
1994 1995
J an
1996
Model identification
Model identification
Time Series Plot of log shipment
3.8
3.6
log shipment
3.4
3.2
3.0
2.8
2.6
2.4
2.2
2.0
Month J an
Jan
Jan
J an
J an
Jan
Jan
Jan
Jan
Jan
Jan
Year 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996
Model identification
Autocorrelation Function for log shipment
(with 5% significance limits for the autocorrelations)
1.0
0.8
Autocorrelation
0.6
0.4
0.2
0.0
-0.2
-0.4
-0.6
-0.8
-1.0
1
10
15
20
Lag
25
30
35
40
Model identification
Partial Autocorrelation Function for log shipment
(with 5% significance limits for the partial autocorrelations)
1.0
Partial Autocorrelation
0.8
0.6
0.4
0.2
0.0
-0.2
-0.4
-0.6
-0.8
-1.0
1
10
15
20
Lag
25
30
35
40
Model identification
Model identification
Time Series Plot of first differece of logged data
0.4
0.3
0.2
0.1
0.0
-0.1
-0.2
-0.3
-0.4
-0.5
Month J an
J an
Year 1986 1987
J an
J an
1988 1989
J an
1990
J an
1991
J an
J an
1992 1993
Jan
J an
1994 1995
J an
1996
Model identification
Autocorrelation Function for first differece of logged data
(with 5% significance limits for the autocorrelations)
1.0
0.8
Autocorrelation
0.6
0.4
0.2
0.0
-0.2
-0.4
-0.6
-0.8
-1.0
1
10
15
20
Lag
25
30
35
40
Model identification
Partial Autocorrelation Function for first differece of logged data
(with 5% significance limits for the partial autocorrelations)
1.0
Partial Autocorrelation
0.8
0.6
0.4
0.2
0.0
-0.2
-0.4
-0.6
-0.8
-1.0
1
10
15
20
Lag
25
30
35
40
Model identification
Summary
Summary
Summary
For example, for quarterly data the pattern of r 4, r8, r12, r16,
and so on.
Backshift notation
Backshift notation
Backshift notation
Example;
Backshift notation
ARIMA(1,1,1)
Yt Yt 1 c 1 (Yt 1 Yt 2 ) et 1et 1
(1 1 B )(1 B )Yt c (1 1 B )et
Diagnostic Checking
Diagnostic Checking
For example
Diagnostic Checking
Diagnostic Checking
Example
Example
Time Series Plot of ISC corporation Stock
400
350
ISC
300
250
200
150
100
1
12
18
24
30
36
Index
42
48
54
60
Example
Example
Autocorrelation Function for ISC
(with 5% significance limits for the autocorrelations)
1.0
0.8
Autocorrelation
0.6
0.4
0.2
0.0
-0.2
-0.4
-0.6
-0.8
-1.0
2
10
Lag
12
14
16
18
20
Example
Partial Autocorrelation Function for I SC
(with 5% significance limits for the partial autocorrelations)
1.0
Partial Autocorrelation
0.8
0.6
0.4
0.2
0.0
-0.2
-0.4
-0.6
-0.8
-1.0
2
10
Lag
12
14
16
18
20
Example
Example
Example
ACF of Residuals for ISC
(with 5% significance limits for the autocorrelations)
1.0
0.8
Autocorrelation
0.6
0.4
0.2
0.0
-0.2
-0.4
-0.6
-0.8
-1.0
1
8
9
Lag
10
11
12
13
14
15
16
Example
PACF of Residuals for ISC
(with 5% significance limits for the partial autocorrelations)
1.0
Partial Autocorrelation
0.8
0.6
0.4
0.2
0.0
-0.2
-0.4
-0.6
-0.8
-1.0
1
8
9
Lag
10
11
12
13
14
15
16
Example
MS = 2808 DF = 62
Modified Box-Pierce (Ljung-Box) ChiSquare statistic
Lag
12 24 36 48
Chi-Square 6.3 13.3 18.2 29.1
DF
9 21 33 45
P-Value
0.707 0.899 0.983 0.969
Example
Example
Final comments
Final comments
Final comments