P02 Sarima

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 26

Peramalan dengan Metode

Box-Jenkins
Bagian II: Seasonal ARIMA
(SARIMA)
Teknik Peramalan: Materi minggu kesebelas

Model ARIMA Box Jenkins yang telah kita pelajari


tidak dapat digunakan untuk meramalkan data
musiman (seasonal).

 Model ARIMA Box-Jenkins SEASONAL


 Identification of SEASONAL TIME SERIES
 Estimation of ARIMA seasonal model
 Diagnostic Check of ARIMA seasonal model
 Forecasting
Contoh data musiman
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 Dies down at the seasonal
and cuts off after lag QL level
AR(P) Dies down at the seasonal Has spike at lag L, 2L, …, PL
level and cuts off after lag PL
AR(P) or MA(Q) Has spike at lag L, 2L, …, QL Has spike at lag L, 2L, …, PL
and cuts off after lag QL and cuts off after lag PL
ARMA(P,Q) Dies down fairly quickly at Dies down fairly quickly at
the seasonal level the seasonal level
No seasonal Has no spikes (contain small Has no spikes (contain small
operator ACF) PACF)
Model Seasonal Aditif
Notasi SARIMA((p,P),(d,D),(q,Q))s
 p: orde AR nonmusiman
 q: orde MA nonmusiman
 P: orde AR musiman aditif
 Q: orde MA musiman aditif
 D: orde diferensi musiman
Contoh (bentuk seasonal pada MA):
(1 – c1B - … - cpBp)(1-B)d(1-Bs)D Xt =
(1 + d1B + … + dqBq + θ1Bs + … + θQBsQ) at
Model Seasonal Multiplikatif
Notasi SARIMA((p,d,q)(P,D,Q))s
 p: orde AR nonmusiman
 q: orde MA nonmusiman
 P: orde AR musiman multiplikatif
 Q: orde MA musiman multiplikatif
 D: orde diferensi musiman
Contoh (bentuk seasonal pada MA):
(1 – c1B - … - cpBp)(1-B)d(1-Bs)D Xt =
(1 + d1B + … + dqBq )(1+θ1Bs + … + θQBsQ) at
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)
Simulation example of ACF and PACF of The First-order Seasonal
L=12 Moving Average Model or MA(1)12 … [Graphics illustration]

Has spike only at lag 12 (cuts off) Dies down at seasonal lags

12
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


Simulation example of ACF and PACF of The First-order Autore-
gressive Seasonal L=12 Model or AR(1)12 …[Graphics illustration]

Has spike only at lag


12 (cuts off)

Dies down at seasonal lags

12
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 ACF
Theoretically of PACF

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 … [Graphics illustration]

Has spike only at lag 1 (cuts off)

Has spike only at lag 12 (cuts off)

Dies down at non seasonal lags

Dies down at seasonal lags


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 ACF
Theoretically of PACF

Cuts off at the lag 1


[nonseasonal] and lag 12
Dies Down at the nonseasonal [seasonal] level
and seasonal level
Simulation example of ACF and PACF of The Multiplicative Moving
Average Model or AR(1)(1)12 … [Graphics illustration]

Dies down at non seasonal lags

Dies down at seasonal lags

Has spike only at lag 1 (cuts off)

Has spike only at lag 12 (cuts off)


Example 1: Average monthly temperatures in Dubuque, Iowa
(January 1964 – December 1975) … [Cryer [1986], pg. 268]

Year Jan Feb Mar Apr May Jun Jul Aug Sept Oct Nov Dec
1964 24.7 25.7 30.6 47.5 62.9 68.5 73.7 67.9 61.1 48.5 39.6 20.0
1965 16.1 19.1 24.2 45.4 61.3 66.5 72.1 68.4 60.2 50.9 37.4 31.1
1966 10.4 21.6 37.4 44.7 53.2 68.0 73.7 68.2 60.7 50.2 37.2 24.6
1967 21.5 14.7 35.0 48.3 54.0 68.2 69.6 65.7 60.8 49.1 33.2 26.0
… … … … … … … … … … … … …
… … … … … … … … … … … … …
… … … … … … … … … … … … …
1973 22.5 25.7 42.3 45.2 55.5 68.9 72.3 72.3 62.5 55.6 38.0 20.4
1974 17.6 20.5 34.2 49.2 54.8 63.8 74.0 74.0 57.7 50.8 36.8 25.5
1975 20.4 19.6 24.6 41.3 61.8 68.5 72.0 72.0 57.3 52.5 40.6 26.2

Low Medium
High temperature
temperature temperature
Example 1: IDENTIFICATION step [stationary, ACF and PACF]

ACF Nonstationer (seasonal) time series PACF

Dies down slowly


Example 1: IDENTIFICATION step … Seasonal Difference [Zt = Yt – Yt-12]

Stationary Zt  MA(1)12
time series or
Yt 
IMA(1,1)12

ACF PACF

Cuts off after lag 12 Dies down at seasonal lag


Example 1: ESTIMATION and DIAGNOSTIC CHECK step

Yt = Yt-12 + at – 0.8633 at-12

Estimation
and Testing
parameter

Diagnostic
Check (white
noise residual)
Example 1: DIAGNOSTIC CHECK step … [Normality test of residuals]
Example 1: FORECASTING step [MINITAB output]
Example 1: Comparison Actual v.s. Forecast …

Forecast
data

Upper

Actual data Lower


Mencoba model SARIMA

Lakukan peramalan dengan data berikut (tersedia pada


library datasets)

1. # data mdeaths
2. # data co2
3. # data AirPassenger
4. # data sunspot.month
5. # data nottem
Contoh: Data mdeaths
Time series giving the
monthly deaths from
bronchitis, emphysema
and asthma in the UK,
1974–1979 in both
sexes

The plot is as follows.


Pola musiman dapat dilihat melalui plot fungsi
autokorelasi dan autokorelasi parsialnya.
SARIMA Aditif
Misal dt1 adalah data hasil differencing
musiman orde 1 dan differencing orde 1.
1. Model SARIMA((1,1),(1,1),(0,1))4
 m1 <- arma(dt1, lag=list(ar=c(1,4),ma=c(0,4))))
2. Model SARIMA((0,1),(1,1),(0,1))12
 m2 <- arma(dt1, lag=list(ar=c(12),ma=c(12)))
3. Model SARIMA((1,2),(1,1),(1,1))12
 m3 <- arma(dt1, lag=list(ar=c(1,12,24),ma =
c(1,12)))
SARIMA Multiplikatif
Misal dts adalah data yang siap dianalisis
(ump. hasil transformasi logaritma).
1. Model SARIMA((0,1,1),(0,1,1))12
 m1 <- Arima(dts,order=c(0,1,1),
seasonal=list(order=c(0,1,1),period=12))
2. Model SARIMA((2,1,1),(1,1,1))4
 m1 <- Arima(dts, order=c(2,1,1),
seasonal=list(order=c(1,1,1),period=4))

You might also like