Anda di halaman 1dari 68

MODEL TIME SERIES

ARIMA
(REGULER, MUSIMAN,
CAMPURAN)
TAHAPAN ARIMA
1
IDENTIFIKASI
diperoleh Model-model
Sementara
2
PENDUGAAN
PARAMETER
3
DIAGNOSTIC
CHECKING
Correlogram:
ACF, PACF
ESACF, MINIC
FORECASTING
meme
nuhi
Tidak
memenuhi
FLOWCHART
PEMODELAN
ARIMA
Model ACF PACF
AR(p)
turun cepat secara
eksponensial /
sinusoidal
terputus setelah lag p
MA(q) Cuts off setelah lag q
turun cepat secara
eksponensial /
sinusoidal
AR(p) atau
MA(q)
Cuts off setelah lag q Cuts off setelah lag p
ARMA(p,q)
Cuts off setelah lag (q-
p)
Cuts off setelah lag (p-
q)
No order AR or
MA(White Noise or
Random process)
No spike No spike
- ACF dan PACF sampel dibandingkan dengan ACF dan PACF teoritis
- Paling umum digunakan






IDENTIFIKASI MODEL ARIMA dengan CORRELOGRAM
KELEBIHAN
- relatif mudah

- tingkat kesesuaian yang tinggi
bila
- perilaku data Time Series
tidak terlalu kompleks
- asumsi-asumsi terpenuhi
dengan baik


KELEMAHAN
- tidak mampu memberikan
identifikasi yang jelas tentang orde
model jika modelnya kompleks
- pertimbangan subyektif yang
mengakibatkan hasil dengan
kesimpulan yang berbeda
- Model yang dihasilkan kadang
tidak cukup memuaskan
PENDUGAAN DAN PENGUJIAN PARAMETER
MODEL ARIMA
Estimasi
Parameter
Diagnostic Checking
ACF
residual
ACF
1
-1
0
Lag k
8
1
-1
0
Lag k
8
1
-1
0
Lag k
8
1
-1
0
Lag k
8
cuts off
dies down
(exponential)
dies down
(exponential)
dies down
(sinusoidal)
no
oscillation
oscillation
ACF untuk deret berkala stasioner
Dying down fairly quickly versus extremely slowly
Dying down fairly quickly
Lag k
8
1
-1
0
Lag k
8
1
-1
0
Dying down extremely slowly
stationary time
series (usually)
nonstationary time
series (usually)
Sample Partial Autocorrelation Function (PACF)
For the working series Z
1
, Z
2
, , Z
n
: Corr(Z
t
,Z
t-k
|Z
t-1
,,Z
t-k+1
)
Perhitungan PACF pada lag 1, 2 and 3
SPACF pada lag 1, 2 dan 3 adalah:
ACF
PACF
Dying down fairly quickly Cuts off after lag 2
Contoh deret stasioner
ACF
PACF
Dying down extremely slowly
Cuts off after lag 2
Contoh deret yang tidak stasioner
t
o/2
. se(r
k
)
t
o/2
. se(r
k
)
+

+

Sample ACF
MODEL AUTOREGRESSIVE (p)
AR (1)
ACF dari AR(1)
PACF dari AR(1)





SIMULASI AR (1) UNTUK





SIMULASI AR (1) UNTUK
THEORETICALLY OF ACF AND PACF OF THE SECOND-
ORDER AUTOREGRESSIVE MODEL OR AR(2)
The model Z
t
= o
+ |
1
Z
t-1
+ |
2
Z
t-2
+ a
t
, where o = (1|
1
|
2
)
Stationarity condition : |
1
+ |
2
< 1 ; |
2
|
1
< 1 ; ||
2
| < 1
Theoretically of ACF
Theoretically of PACF
THEORETICALLY OF ACF AND PACF OF THE SECOND-ORDER
AUTOREGRESSIVE MODEL OR AR(2) [GRAPHICAL ILLUSTRATION] (1)
ACF
PACF
ACF
PACF
THEORETICALLY OF ACF AND PACF OF THE SECOND-ORDER
AUTOREGRESSIVE MODEL OR AR(2) [GRAPHICAL ILLUSTRATION] (2)
ACF
PACF
ACF
PACF
SIMULATION EXAMPLE OF ACF AND PACF OF THE SECOND-ORDER
AUTOREGRESSIVE MODEL OR AR(2) [GRAPHICAL ILLUSTRATION]
THEORETICALLY OF ACF AND PACF OF THE FIRST-ORDER
MOVING AVERAGE MODEL OR MA(1)
The model
Z
t
= o + a
t
u
1
a
t-1
, where o =
Invertibility condition : 1 < u
1
< 1

Theoretically of ACF
Theoretically of PACF
THEORETICALLY OF ACF AND PACF OF THE FIRST-ORDER
MOVING AVERAGE MODEL OR MA(1) [GRAPHICAL ILLUSTRATION]
ACF
ACF
PACF
PACF
SIMULATION EXAMPLE OF ACF AND PACF OF THE FIRST-ORDER
MOVING AVERAGE MODEL OR MA(1) [GRAPHICAL ILLUSTRATION]
THEORETICALLY OF ACF AND PACF OF THE SECOND-
ORDER MOVING AVERAGE MODEL OR MA(2)
The model Z
t
=
o + a
t
u
1
a
t-1
u
2
a
t-2
, where o =
Invertibility condition : u
1
+ u
2
< 1 ; u
2
u
1
< 1 ; |u
2
| < 1
Theoretically of ACF
Theoretically of PACF
Dies Down (according to a mixture
of damped exponentials and/or
damped sine waves)
THEORETICALLY OF ACF AND PACF OF THE SECOND-ORDER
MOVING AVERAGE MODEL OR MA(2) [GRAPHICAL ILLUSTRATION] (1)
ACF
PACF
ACF
PACF
THEORETICALLY OF ACF AND PACF OF THE SECOND-ORDER
MOVING AVERAGE MODEL OR MA(2) [GRAPHICAL ILLUSTRATION] (2)
ACF
PACF
ACF
PACF
SIMULATION EXAMPLE OF ACF AND PACF OF THE SECOND-ORDER
MOVING AVERAGE MODEL OR MA(2) [GRAPHICAL ILLUSTRATION]
MODEL ARMA (p, q)





Theoretically of ACF and PACF of The Mixed Autoregressive-
Moving Average Model or ARMA(1,1)
The model Z
t
= o
+ |
1
Z
t-1
+ a
t
u
1
a
t-1
, where o = (1|
1
)
Stationarity and Invertibility condition : ||
1|
< 1 and |u
1
| < 1
Theoretically of ACF
Theoretically of PACF
Dies Down (in fashion
dominated by damped
exponentials decay)
Theoretically of ACF and PACF of The Mixed Autoregressive-
Moving Average Model or ARMA(1,1) [Graphical illustration] (1)
ACF PACF
ACF
PACF
Theoretically of ACF and PACF of The Mixed Autoregressive-
Moving Average Model or ARMA(1,1) [Graphical illustration] (2)
ACF
PACF
ACF
PACF
Theoretically of ACF and PACF of The Mixed Autoregressive-
Moving Average Model or ARMA(1,1) [Graphical illustration] (3)
ACF
PACF
ACF
PACF
Simulation example of ACF and PACF of The Mixed Autoregressive-
Moving Average Model or ARMA(1,1) [Graphical illustration]
Representasi AR
Representasi MA
The General [Nonseasonal] ARIMA(p,d,q) models
The Model is
where
is an appropriate pre-
differencing transformation
Do not need
pre-differencing
transformation
Example: ARIMA(1,0,1) model
The Model is
where
Z
t
= Y
t,
Yt data asli
and
Therefore,
Example: ARIMA(1,0,1) model [other calculation]
The Model is
Therefore,
p=1
d=0
q=1
Example: ARIMA(1,1,1) model [nonstationary model]
The Model is
where

Z
t
= Y
t
Y
t-1

and
Therefore,
Mean (Z
t
)
Example: MINITAB output [nonstationary ARIMA model]
Estimation and
Testing
parameter
Diagnostic
Check (white
noise residual)
Y
t
= 3.0232 + 1.6591 Y
t-1
0.6591 Y
t-2
+ a
t
Forecasting of ARIMA(p,d,q) model
Forecasting of AR(1) model
or
Forecasting of MA(1) model
Example: Daily readings of viscosity of Chemical
Product XB-77-5 [Bowerman and OConnell, pg. 471]
Example: IDENTIFICATION step [stationary, ACF and PACF]
ACF
PACF
Dies down [sinusoidal]
Cuts off after lag 2
Stationer time series
Example: ESTIMATION and DIAGNOSTIC CHECK step
Estimation
and Testing
parameter
Diagnostic
Check (white
noise residual)
Example: DIAGNOSTIC CHECK step [Normality test of residuals]
Example: FORECASTING step [MINITAB output]
Calculation: FORECASTING (FITS and FORECAST) [continued]
CONTOH ANALISIS 2
Index
D
a
t
a

A
s
l
i
126 112 98 84 70 56 42 28 14 1
200000
150000
100000
50000
0
Time Series Plot of Data Asli
Plot time series data permintaan Arc Tube daya listrik rendah
Dari TS plot terlihat bahwa data tersebut tidak stasioner dalam mean.
Hal yang sama juga diperoleh dari ACF plot.
Jadi dilakukan DIFFERENCING
Transformasi ?

Dari Box-Cox diperoleh nilai lambda terbaik adalah 1 dan selang
kepercayaan untuk lambda melewati 1.
Jadi TIDAK dilakukan TRANSFORMASI
Hasil differencing

Data relatif sudah stasioner
Hasil Pengujian Parameter Model
Model Parameter Koefisien P_Val
ARIMA(1,1,0) -0.5501 0
ARIMA(2,1,0)
-0.5948 0
-0.0915 0.262
ARIMA(0,1,1) 0.594 0
ARIMA(0,1,2)
0.6242 0
-0.1198 0.164
S
I
G
N
I
F
I
K
A
N

Pengujian Asumsi white noise
Model Ljung - Box
ARIMA
(1,1,0)
lag 12 24 36
Chi-sq 11 25 33.1
DF 11 23 35
P_Val 0.441 0.348 0.558
ARIMA
(0,1,1)
lag 12 24 36
Chi-sq 21.8 51 65.7
DF 11 23 35
P_Val 0.026 0.001 0.001
White
noise
Tidak
White
noise
Pengujian kenormalan: p_value (0.081) > (0.05) NORMAL
Model ARIMA terbaik hasil Correlogram
0.5501
t t-1 t-1
y y y =
Permintaan Arc Tube daya listrik rendah pada waktu ke-t dipengaruhi oleh
permintaan ArcTube pada waktu ke-(t-1) dikurangi 0.5501 kali permintaan
ArcTube pada waktu ke-(t-1), ditambah kesalahan pada saat ke-t.

Dengan KRITERIA PEMILIHAN MODEL TERBAIK out-sample :

MSE : 34286,1
MAPE : 12,47%.

General Theoretical ACF and PACF of ARIMA Seasonal Models with
L (length of seasonal period).
Model ACF PACF
MA(Q) Has spike at lag L, 2L, , QL
and cuts off after lag QL
Dies down at the seasonal
level
AR(P) Dies down at the seasonal
level
Has spike at lag L, 2L, , PL
and cuts off after lag PL
AR(P) or MA(Q) Has spike at lag L, 2L, , QL
and cuts off after lag QL
Has spike at lag L, 2L, , PL
and cuts off after lag PL
ARMA(P,Q) Dies down fairly quickly at
the seasonal level
Dies down fairly quickly at
the seasonal level
No seasonal
operator
Has no spikes (contain small
ACF)
Has no spikes (contain small
PACF)
Theoretically of ACF and PACF of The First-order Seasonal
L=12 Moving Average Model or MA(1)
12

The model
Z
t
= o + a
t
O
1
a
t-12
, where o =
Invertibility condition : 1 < O
1
< 1

Theoretically of ACF
Theoretically of PACF
Dies Down at the seasonal level
(according to a damped
exponentials waves)
Simulation example of ACF and PACF of The First-order Seasonal L=12
Moving Average Model or MA(1)
12
[Graphical illustration]
12
Has spike only at lag 12 (cuts off)
Dies down at seasonal lags
Theoretically of ACF and PACF of The First-order Auto-regressive
Seasonal L=12 Model or AR(1)
12

The model
Z
t
= o + u
1
Z
t-12
+ a
t
, where o = (1-u
1
)
Stationarity condition : 1 < u
1
< 1

Theoretically of ACF
Theoretically of PACF
Simulation example of ACF and PACF of The First-order Autore-gressive
Seasonal L=12 Model or AR(1)
12
[Graphics illustration]
12
Has spike only at lag 12
(cuts off)
Dies down at seasonal lags
Theoretically of ACF and PACF of The Multiplicative Moving Average
Model or ARIMA(0,0,1)(0,0,1)
12
or MA(1)(1)
12

The model
Z
t
= o + a
t
u
1
a
t-1
O
1
a
t-12
+ u
1
.O
1
a
t-13
, where o =
Stationarity condition : |u
1
| < 1 and |O
1
| < 1
Theoretically of PACF
Theoretically of ACF
Dies Down at the
nonseasonal and
seasonal level
Simulation example of ACF and PACF of The Multiplicative Moving
Average Model or MA(1)(1)
12
[Graphical illustration]
Dies down at seasonal lags
Dies down at non seasonal lags
Has spike only at lag 1 (cuts off)
Has spike only at lag 12 (cuts off)
Theoretically of ACF and PACF of The Multiplicative Autore-gressive
Model or ARIMA(1,0,0)(1,0,0)
12
or AR(1)(1)
12

The model
Z
t
= o + |
1
Z
t-1
+ u
1
Z
t-12
|
1
.u
1
Z
t-13
+ a
t

Stationarity condition : ||
1
| < 1 and |u
1
| < 1
Theoretically of PACF
Theoretically of ACF
Dies Down at the nonseasonal and
seasonal level
Cuts off at the lag 1
[nonseasonal] and lag 12
[seasonal] level
Simulation example of ACF and PACF of The Multiplicative Moving
Average Model or AR(1)(1)
12
[Graphical illustration]
Dies down at seasonal lags
Dies down at non seasonal lags
Has spike only at lag 1 (cuts off)
Has spike only at lag 12 (cuts off)