3 model arima

68
MODEL TIME SERIES ARIMA (REGULER, MUSIMAN, CAMPURAN)

Upload: neko-chan

Post on 01-Dec-2014

437 views

Category:

Documents


18 download

TRANSCRIPT

Page 1: 3 Model Arima

MODEL TIME SERIES

ARIMA

(REGULER, MUSIMAN,

CAMPURAN)

Page 2: 3 Model Arima

TAHAPAN ARIMA

1

• IDENTIFIKASI

• diperoleh Model-model Sementara

2 • PENDUGAAN

PARAMETER

3 • DIAGNOSTIC

CHECKING

Correlogram:

ACF, PACF

ESACF, MINIC

FORECASTING

meme

nuhi

Tidak

memenuhi

Page 3: 3 Model Arima

FLOWCHART

PEMODELAN

ARIMA

Page 4: 3 Model 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

Page 5: 3 Model Arima

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

Page 6: 3 Model Arima

PENDUGAAN DAN PENGUJIAN PARAMETER MODEL ARIMA

Estimasi Parameter

Page 7: 3 Model Arima

Diagnostic Checking

ACF residual

Page 8: 3 Model Arima

ACF

Page 9: 3 Model Arima

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

Page 10: 3 Model Arima

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)

Page 11: 3 Model Arima

Sample Partial Autocorrelation Function (PACF)

For the working series Z1, Z2, …, Zn : Corr(Zt,Zt-k|Zt-1,…,Zt-k+1)

Page 12: 3 Model Arima

Perhitungan PACF pada lag 1, 2 and 3

SPACF pada lag 1, 2 dan 3 adalah:

Page 13: 3 Model Arima

ACF PACF

Dying down fairly quickly Cuts off after lag 2

Contoh deret stasioner

Page 14: 3 Model Arima

ACF PACF

Dying down extremely slowly Cuts off after lag 2

Contoh deret yang tidak stasioner

Page 15: 3 Model Arima

t/2 . se(rk) t/2 . se(rk)

+ +

Sample ACF

Page 16: 3 Model Arima

MODEL AUTOREGRESSIVE (p)

Page 17: 3 Model Arima

AR (1)

Page 18: 3 Model Arima

ACF dari AR(1)

Page 19: 3 Model Arima

PACF dari AR(1)

Page 20: 3 Model Arima

SIMULASI AR (1) UNTUK

Page 21: 3 Model Arima

SIMULASI AR (1) UNTUK

Page 22: 3 Model Arima

THEORETICALLY OF ACF AND PACF OF THE SECOND-

ORDER AUTOREGRESSIVE MODEL OR AR(2)

The model Zt =

+ 1 Zt-1 + 2 Zt-2 + at, where = (112)

Stationarity condition : 1 + 2 < 1 ; 2 1 < 1 ; |2| < 1

Theoretically of ACF Theoretically of PACF

Page 23: 3 Model Arima

THEORETICALLY OF ACF AND PACF OF THE SECOND-ORDER

AUTOREGRESSIVE MODEL OR AR(2) … [GRAPHICAL ILLUSTRATION] … (1)

ACF PACF

ACF PACF

Page 24: 3 Model Arima

THEORETICALLY OF ACF AND PACF OF THE SECOND-ORDER

AUTOREGRESSIVE MODEL OR AR(2) … [GRAPHICAL ILLUSTRATION] … (2)

ACF PACF

ACF PACF

Page 25: 3 Model Arima

SIMULATION EXAMPLE OF ACF AND PACF OF THE SECOND-ORDER

AUTOREGRESSIVE MODEL OR AR(2) … [GRAPHICAL ILLUSTRATION]

Page 26: 3 Model Arima

THEORETICALLY OF ACF AND PACF OF THE FIRST-ORDER

MOVING AVERAGE MODEL OR MA(1)

The model

Zt = + at – 1 at-1 , where =

Invertibility condition : –1 < 1 < 1

Theoretically of ACF Theoretically of PACF

Page 27: 3 Model Arima

THEORETICALLY OF ACF AND PACF OF THE FIRST-ORDER

MOVING AVERAGE MODEL OR MA(1) … [GRAPHICAL ILLUSTRATION]

ACF

ACF PACF

PACF

Page 28: 3 Model Arima

SIMULATION EXAMPLE OF ACF AND PACF OF THE FIRST-ORDER

MOVING AVERAGE MODEL OR MA(1) … [GRAPHICAL ILLUSTRATION]

Page 29: 3 Model Arima

THEORETICALLY OF ACF AND PACF OF THE SECOND-

ORDER MOVING AVERAGE MODEL OR MA(2)

The model Zt =

+ at – 1 at-1 – 2 at-2 , where =

Invertibility condition : 1 + 2 < 1 ; 2 1 < 1 ; |2| < 1

Theoretically of ACF Theoretically of PACF

Dies Down (according to a mixture

of damped exponentials and/or

damped sine waves)

Page 30: 3 Model Arima

THEORETICALLY OF ACF AND PACF OF THE SECOND-ORDER

MOVING AVERAGE MODEL OR MA(2) … [GRAPHICAL ILLUSTRATION] … (1)

ACF PACF

ACF PACF

Page 31: 3 Model Arima

THEORETICALLY OF ACF AND PACF OF THE SECOND-ORDER

MOVING AVERAGE MODEL OR MA(2) … [GRAPHICAL ILLUSTRATION] … (2)

ACF PACF

ACF PACF

Page 32: 3 Model Arima

SIMULATION EXAMPLE OF ACF AND PACF OF THE SECOND-ORDER

MOVING AVERAGE MODEL OR MA(2) … [GRAPHICAL ILLUSTRATION]

Page 33: 3 Model Arima

MODEL ARMA (p, q)

Page 34: 3 Model Arima

Theoretically of ACF and PACF of The Mixed Autoregressive-

Moving Average Model or ARMA(1,1)

The model Zt =

+ 1 Zt-1 + at 1 at-1 , where = (11)

Stationarity and Invertibility condition : |1| < 1 and |1| < 1

Theoretically of ACF Theoretically of PACF

Dies Down (in fashion

dominated by damped

exponentials decay)

Page 35: 3 Model Arima

Theoretically of ACF and PACF of The Mixed Autoregressive-

Moving Average Model or ARMA(1,1) … [Graphical illustration] … (1)

ACF PACF

ACF PACF

Page 36: 3 Model Arima

Theoretically of ACF and PACF of The Mixed Autoregressive-

Moving Average Model or ARMA(1,1) … [Graphical illustration] … (2)

ACF PACF

ACF PACF

Page 37: 3 Model Arima

Theoretically of ACF and PACF of The Mixed Autoregressive-

Moving Average Model or ARMA(1,1) … [Graphical illustration] … (3)

ACF PACF

ACF PACF

Page 38: 3 Model Arima

Simulation example of ACF and PACF of The Mixed Autoregressive-

Moving Average Model or ARMA(1,1) … [Graphical illustration]

Page 39: 3 Model Arima

Representasi AR

Page 40: 3 Model Arima

Representasi MA

Page 41: 3 Model Arima

The General [Nonseasonal] ARIMA(p,d,q) models

The Model is

where

is an appropriate pre-

differencing transformation

Do not need

pre-differencing

transformation

Page 42: 3 Model Arima

Example: ARIMA(1,0,1) model

The Model is

where

Zt = Yt,

Yt data asli

and

Therefore,

Page 43: 3 Model Arima

Example: ARIMA(1,0,1) model … [other calculation]

The Model is

Therefore,

p=1 d=0 q=1

Page 44: 3 Model Arima

Example: ARIMA(1,1,1) model … [nonstationary model]

The Model is

where

Zt = Yt – Yt-1

and

Therefore,

Mean (Zt)

Page 45: 3 Model Arima

Example: MINITAB output … [nonstationary ARIMA model]

Estimation and

Testing

parameter

Diagnostic

Check (white

noise residual)

Yt = 3.0232 + 1.6591 Yt-1 – 0.6591 Yt-2 + at

Page 46: 3 Model Arima

Forecasting of ARIMA(p,d,q) model

Forecasting of AR(1) model

or

Forecasting of MA(1) model

Page 47: 3 Model Arima

Example: Daily readings of viscosity of Chemical Product XB-77-5 [Bowerman and O’Connell, pg. 471]

Page 48: 3 Model Arima

Example: IDENTIFICATION step [stationary, ACF and PACF]

ACF PACF

Dies down [sinusoidal] Cuts off after lag 2

Stationer time series

Page 49: 3 Model Arima

Example: ESTIMATION and DIAGNOSTIC CHECK step

Estimation and Testing parameter

Diagnostic Check (white

noise residual)

Page 50: 3 Model Arima

Example: DIAGNOSTIC CHECK step … [Normality test of residuals]

Page 51: 3 Model Arima

Example: FORECASTING step [MINITAB output]

Page 52: 3 Model Arima

Calculation: FORECASTING (FITS and FORECAST) [continued]

Page 53: 3 Model Arima

CONTOH ANALISIS 2

Index

Da

ta A

sli

126112988470564228141

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

Page 54: 3 Model Arima

Transformasi ?

Dari Box-Cox diperoleh nilai lambda terbaik adalah 1 dan selang kepercayaan untuk lambda melewati 1.

Jadi TIDAK dilakukan TRANSFORMASI

Page 55: 3 Model Arima

Hasil differencing

Data relatif sudah stasioner

Page 56: 3 Model Arima
Page 57: 3 Model Arima

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

Page 58: 3 Model Arima

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

Page 59: 3 Model Arima

Model ARIMA terbaik hasil Correlogram

0.5501t t-1 t-1y 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%.

Page 60: 3 Model Arima

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)

Page 61: 3 Model Arima

Theoretically of ACF and PACF of The First-order Seasonal

L=12 Moving Average Model or MA(1)12

The model

Zt = + at – 1 at-12 , where =

Invertibility condition : –1 < 1 < 1

Theoretically of ACF Theoretically of PACF

Dies Down at the seasonal level

(according to a damped

exponentials waves)

Page 62: 3 Model Arima

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

Page 63: 3 Model Arima

Theoretically of ACF and PACF of The First-order Auto-regressive

Seasonal L=12 Model or AR(1)12

The model

Zt = + 1 Zt-12 + at , where = (1-1)

Stationarity condition : –1 < 1 < 1

Theoretically of ACF Theoretically of PACF

Page 64: 3 Model Arima

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

Page 65: 3 Model Arima

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

Zt = + at – 1 at-1 1 at-12 + 1.1 at-13 , where =

Stationarity condition : |1| < 1 and |1| < 1

Theoretically of PACF Theoretically of ACF

Dies Down at the

nonseasonal and

seasonal level

Page 66: 3 Model Arima

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)

Page 67: 3 Model Arima

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

Zt = + 1 Zt-1 + 1 Zt-12 1.1 Zt-13 + at

Stationarity condition : |1| < 1 and |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

Page 68: 3 Model Arima

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)