You are on page 1of 63

4

Stationary Models (AR, MA & ARMA)


Sekolah Tinggi Ilmu Statistik
Jakarta - 2016

Flow Diagram of Box-Jenkins methodology

1. Tentative IDENTIFICATION

NO

2. Parameter ESTIMATION

3. DIAGNOSTIC CHECKING
model adequate? ]

[ Is the

Stationary and nonstationary time series


ACF dan PACF
(theoritical)

Testing parameters

White noise of residual


Normal Distribution of
residual

YES
4. FORECASTING

Forecast calculation

Stationary and Nonstationary Time Series

Stationer

Nonstationer

The First Differences: Zt = Y2t Y2t-1


Nonstationer

Differences
Stationer

Sample Autocorrelation Function (ACF)


For the working series Z1, Z2, , Zn :

ACF for stationary time series


1

cuts off

dies down
(exponential)

0
Lag k

Lag k

Lag k

no oscillation

-1

-1

dies down
(exponential)

-1

8
oscillation

0
Lag k
-1

dies down
(sinusoidal)

Dying down fairly quickly versus extremely slowly

Dying down fairly quickly

stationary time
series (usually)

Lag k

-1
Dying down extremely slowly

nonstationary time
series (usually)

-1

Lag k

Sample Partial Autocorrelation Function (PACF)


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

Calculation of PACF at lag 1, 2 and 3

The sample partial autocorelations at lag 1, 2 and 3 are:

MINITAB output of STATIONARY time series

ACF

PACF

Dying down fairly quickly

Cuts off after lag 2

MINITAB output of NONSTATIONARY time series

ACF

PACF

Dying down extremely slowly

Cuts off after lag 2

ARIMA
There is a huge variety of ARIMA models. The
general non-ARIMA notation seasonal model
is known as ARIMA(p; d; q):
AR: p = order of the autoregressive part
I: d = degree of first differencing involved
MA: q = order of the moving average part.

Proses Random

Proses Random
atau White Noise Model:
ARIMA (0,0,0)

is a simple random model where observation Yt


is made up of two parts, an overall level, c, and
a random error component, et, which is
uncorrelated from period to period.
See Makridakis (1997), pp.317

Proses Random yang Tidak Stasioner


atau Random Walk Model:
ARIMA (0,1,0)

et is a white noise.
Yt is a random walk process not stationer.
The first difference is stationer

Tidak terdapat proses AR maupun MA


See Makridakis (1997), pp.320-329

Proses Auto Regressive (AR)

Proses Regresi Diri atau Autoregressive Model:


AR (p) atau ARIMA (p,0,0)
Model Autoregressive AR dengan orde p:
pengamatan yt dibentuk dari rata-rata
tertimbang pengamatan-pengamatan masa lalu,
sebanyak p periode ke belakang.
Proses tersebut dinyatakan sebagai AR(p) dan
modelnya adalah:

Model AR (1)

Observation Yt depends on Yt-1, and the value of the


autoregressive coefficient 1 is restricted to lie between -1
and +1

Syarat kestasioneran AR(1) adalah: -1< 1 <1


Ketika 1 = 0, maka: Yt white noise process
Ketika 1 = 1, maka: Yt random walk process

Model AR (2)
= + 1 1 + 2 2 +
Observation Yt depends on Yt-1, Yt-2 and the value of the
autoregressive coefficient 1 and 2 is restricted to:

Syarat kestasioneran AR(2) adalah: -1< 2 <1, 2+1<1,


2-1<1
Syarat kestasioneran untuk p>=3, complicated

Proses estimasi menggunakan Persamaan Yule-Walker,


silakan baca dalam Box, Jenkin, Reinsel (2008)

Proses Moving Average (MA)

Moving Average Model:


MA (q) atau ARIMA (0,0,q)
Model MA dengan ordo q: mengasumsikan
bahwa tiap-tiap observasi dibentuk dari
rata-rata tertimbang deviasi
(disturbances) q periode ke belakang.
Model MA(q) dituliskan sebagai:

yt = c + et-1et-1-2et-2- .. - qet-q

Model MA (1)

Observation Yt depends on the error term et and also the


previous error term et-1, with coefficient -1:

Model MA (2)
yt = c + et - 1et-1 - 2et-2

Proses estimasi menggunakan Persamaan Yule-Walker,


silakan baca dalam Box, Jenkin, Reinsel (2008)

Auto Regressive Moving Average


(ARMA)

Autoregressive-Moving Average Model:


ARMA (p,q) atau ARIMA (p,0,q)
Adakalanya proses random yang stasioner
tidak dapat dimodel melalui AR (p) atau
MA (q) karena proses tersebut mempunyai
karakteristik dua-duanya. Oleh
karenanya, proses yang semacam ini perlu
didekati dengan model campuran antara
autoregresi dan moving average yang
dikenal dengan model ARMA (p,q).
Model ini dinyatakan dalam bentuk:

yt=1yt-1+..+pyt-p+c+et-1et-1-..-qet-q

Untuk ARMA (1,1), model adalah


sebagai berikut:
yt = 1 yt-1 + c + et - 1 et-1
The same parameter restrictions apply
here as for pure AR and pure parameter
restrictions MA models.

Backshift Operation
Baca: Makridakis (1997)

AR(p)

MA(q)
ARMA
(p,q)

ARMA
(1,1)

Flow Diagram of Box-Jenkins methodology

1. Tentative IDENTIFICATION

NO

2. Parameter ESTIMATION

3. DIAGNOSTIC CHECKING
model adequate? ]

[ Is the

Stationary and nonstationary time series


ACF dan PACF
(theoritical)

Testing parameters

White noise of residual


Normal Distribution of
residual

YES
4. FORECASTING

Forecast calculation

Identifikasi Model
Deteksi masalah stasioner data. Jika tidak stasioner, lakukan
proses diferensi untuk mendapatkan data stasioner
Identifikasi model ARIMA melalui autocorrelation function (ACF)
dan partial autocorrelation function PACF

Sumber: Bambang Juanda & Junaidi: Ekonometrika Deret Waktu

General Theoretical ACF and PACF of ARIMA Models

Model

ACF

PACF

MA(q): moving average of order q

Cuts off
after lag q

Dies down

AR(p): autoregressive of order p

Dies down

Cuts off
after lag p

ARMA(p,q): mixed autoregressivemoving average of order (p,q)

Dies down

Dies down

AR(p) or MA(q)
after lag q

Cuts off
after lag p

Cuts off

No order AR or MA
(White Noise or Random process)

No spike

No spike

Makridakis (1997), pp.342

Model

Pola ACF

Pola PACF

AR(p)

Menyusut secara eksponensial

Ada tiang pancang


sampai lag p

MA(q)

Ada tiang pancang yang jelas


sampai lag q

Menyusut secara
eksponensial

Menyusut secara eksponensial

Menyusut secara
eksponensial

ARMA(p,q)

Sumber: Bambang Juanda & Junaidi:


Ekonometrika Deret Waktu

Theoretically of ACF and PACF of The First-order


Autoregressive Model or AR(1)
The model

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

Stationarity condition : 1 < 1 < 1

Theoretically of ACF

Theoretically of PACF

Theoretically of ACF and PACF of The First-order


Autoregressive Model or AR(1) [Graphics illustration]

ACF

ACF

PACF

PACF

Simulation example of ACF and PACF of The First-order


Autoregressive Model or AR(1) [Graphics illustration]

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

Theoretically of ACF and PACF of The Second-order


Autoregressive Model or AR(2) [Graphics illustration] (1)

ACF

ACF

PACF

PACF

Theoretically of ACF and PACF of The Second-order


Autoregressive Model or AR(2) [Graphics illustration] (2)

ACF

ACF

PACF

PACF

Simulation example of ACF and PACF of The Second-order


Autoregressive Model or AR(2)
[Graphics illustration]

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

Theoretically of ACF and PACF of The First-order Moving


Average Model or MA(1) [Graphics illustration]

ACF

ACF

PACF

PACF

Simulation example of ACF and PACF of The First-order


Moving Average Model or MA(1) [Graphics illustration]

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)

Theoretically of ACF and PACF of The Second-order Moving


Average Model or MA(2) [Graphics illustration] (1)

ACF

ACF

PACF

PACF

Theoretically of ACF and PACF of The Second-order Moving


Average Model or MA(2) [Graphics illustration] (2)

ACF

ACF

PACF

PACF

Simulation example of ACF and PACF of The Second-order


Moving Average Model or MA(2)
[Graphics illustration]

Theoretically of ACF and PACF of The Mixed AutoregressiveMoving 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)

Theoretically of ACF and PACF of The Mixed AutoregressiveMoving Average Model or ARMA(1,1) [Graphics illustration] (1)

ACF

ACF

PACF

PACF

Theoretically of ACF and PACF of The Mixed AutoregressiveMoving Average Model or ARMA(1,1) [Graphics illustration] (2)

ACF

ACF

PACF

PACF

Theoretically of ACF and PACF of The Mixed AutoregressiveMoving Average Model or ARMA(1,1) [Graphics illustration] (3)

ACF

ACF

PACF

PACF

Simulation example of ACF and PACF of The Mixed AutoregressiveMoving Average Model or ARMA(1,1)

[Graphics illustration]

KORELOGRAM AR(1)
ACF Untuk AR(1)

PACF Untuk AR(1)

KORELOGRAM MA(1)
PACF untuk positif

ACF Untuk MA(1)

PACF untuk positif

Estimasi Parameter Model

Pengujian kelayakan model dengan mencari model terbaik.


Model terbaik didasarkan goodness of fit melalui uji t, F, R2 serta kriteria
AIC (Akaike information criterion) dan SC (Schwarz criterion)

Evaluasi Model

Lakukan pengujian terhadap residual model yang diperoleh. Model yg


baik memiliki residual bersifat random (white noise).
Analisis residual dgn korelogram melalui ACF dan PACF.
Jika koefisien ACF dan PACF secara individual tidak signifikan, residual
bersifat random. Jika residual tidak random, piliih model yang lain.
Pengujian signifikansi ACF dan PACF dapat dilakukan melalui uji dari
Barlett, Box dan Pierce maupun Ljung-Box.

Prediksi atau Peramalan

Melakukan prediksi atau peramalan berdasarkan model terpilih


Evaluasi kesalahan peramalan: Root Mean Squares Error (RMSE),
Mean Absolute Error (MAE), Mean Absolute Percentage Error (MAPE).
Bambang Juanda & Junaidi:
Ekonometrika Deret Waktu

You might also like