www.company.com
Analisis Dasar dalamRuntun Waktu
Company
LOGO
www.company.com
UJI STASIONERITAS: UJI UNIT ROOT
www.company.com
UNIT ROOTS
• Shock is usually used to describe an unexpected change
in a variable or in the value of the error terms at a
particular time period.
• When we have a stationary system, effect of a shock will
die out gradually.
• When we have a non-stationary system, effect of a shock
is permanent.
3
www.company.com
• Dalam bahasa yang sederhana, unit root
merupakan komponen tren (shock)
• Uji untuk unit root:
– Dickey Fuller (DF)
– Augmented Dickey Fuller (ADF)
– Phillips Perron
– KPSS
Sebelum mengenal Uji ADF,
kenali dahulu yang dimaksud
dengan Random Walk
RANDOM WALK
Random Walk
Ilustrasi:
In each time period, going from left to
right, the value of the variable takes
an independent random step up or
down, a so-called random walk
RANDOM WALK
A commonly-used analogy is that of a drunkard who staggers randomly to the left or right as he tries to go forward: the path he traces will be a random walk.
RANDOM WALK
For a real-world example, consider the daily US-dollar-to-Euro exchange rate. A plot of its entire history from January 1, 1999, to December 5, 2014 (4006 observations) looks like this:
RANDOM WALK
Model untuk random walk:
𝑦𝑡 = 𝑦𝑡−1 + 𝜖𝑡
The implication of a process of this type is that the best prediction of 𝑦for next period is the current value,
or in other words
the process does not allow to predict the change: 𝑦𝑡 − 𝑦𝑡−1
That is, the change of 𝒚 is absolutely random.
www.company.com
Uji ADF
• Uji ini adalah salah satu uji yang paling sering digunakan dalam
pengujian stasioneritas data, yakni melihat apakah terdapat akar
unit (unit root) di dalam model.
• Pengujian dilakukan dengan menguji hipotesis dalam persamaan
regresi berikut:
• atau
1
1 0
1
test equation:p
t t j t j t
j
ADF Y Y Y a
1
1 0
1
1p
t t j t j t
j
Y Y Y a
1
1 0
1
test equation:p
t t j t j t
j
ADF Y Y Y a
www.company.com
Hipotesis ADF
1
1 0
1
test equation:p
t t j t j t
j
ADF Y Y Y a
1
1 0
1
test equation:p
t t j t j t
j
ADF Y Y Y a
𝐻0: 𝜑 = 1 (data mengandung unit root yang berarti tidak stasioner)
𝐻1: 𝜑 < 1 (data tidak mengandung unit root)
𝐻0: 𝛿 = 0 (data mengandung unit root yang berarti tidak stasioner)
𝐻1: 𝛿 < 0(data tidak mengandung unit root)
1
2
www.company.com
Daerah Kritis ADF
• Hipotesis nol ditolak jika nilai statistic uji ADF
memiliki nilai kurang (lebih negatif) daripada nilai
daerah kritik.
• Tolak 𝐻0 jika:
𝐴𝐷𝐹𝑠𝑡𝑎𝑡 < 𝐶𝑟𝑖𝑡𝑖𝑐𝑎𝑙 𝑉𝑎𝑙𝑢𝑒
www.company.com
Memilih panjang lag pada uji ADF
• Suatu aturan thumb yang cukup berguna
untuk menentukan pmax, diusulkan oleh
Schwert (1989), yaitu
dimana [x] menyatakan bilangan bulat dari x.
13
4/1
max100
12n
p
www.company.com
Spesifikasi ADFSelain pemilihan lag, uji ADF memerlukan spesifikasi yaitu pemilihan untuk memasukkan
komponen:
• Konstanta
• Konstanta dan Trend
• Tidak keduanya
Salah satu pendekatan yang mungkin adalah memasukkan kedua komponen (konstanta
dan tren)
Namun memasukkan komponen yang tidak relevan dapat menurunkan kuasa uji-nya
(kesimpulan yang bias: disimpulkan ada akar unit, padahal tidak ada)
Aturan spesifikasi ADF:
1. Jika dalam data terdapat trend: maka masukkan komponen trend dan konstanta
2. Jika data tidak memiliki trend dan rata-rata tidak sama dengan nol: masukkan
komponen konstanta
3. Jika data berfluktuasi disekitar nol: kedua komponen tidak dimasukkan.
www.company.com
DIAGNOSTIC CHECK
www.company.com
NO AUTOCORRELATION• Untuk melihat apakah residual bersifat white noise:
1. Plot ACF/PACF
2. Q-Ljung Box pada residual
Uji Q-Ljung Box:
• Hipotesis:
– H0:
(Tidak ada autokorelasi sampai lag ke-k)
– H1:
• Statistik uji
2kj
LB
j 1
Q n n 2n j
ρj: autokorelasi lag ke-jn: banyak data
Q berdistribusi sebagai χ2 dengan derajat bebas db = k – m,dimana m = p+q
i 0; i 1,2,...,k
i 0; i 1,2,...,k
www.company.com
Homoscedastic
• ACF dan PACF dari residual kuadrat digunakan untuk melihat
sifat homoskedasti
• Uji yang digunakan adalah Q-Ljung Box pada residual kuadrat
www.company.com
Memilih Model Terbaik
1. 𝑅2
2. AIC
3. BIC
www.company.com
𝑅2
• Where T periods of data have been used to fit a model
(banyak data)
• Large values of R2 suggest a good fit to the historical
data
www.company.com
Where 𝑝 is the number of parameter
www.company.com
AIC
• Akaike Information Criterion (AIC) formula:
𝐴𝐼𝐶 = 𝑛 𝑙𝑛 ො𝜎𝜖2 + 2(𝑝 + 𝑞 + 1)
Dimana:
ො𝜎𝜖2 =
𝑆𝑆𝐸
𝑛
• Models that have small values of the AIC or SBC
are considered good models.
www.company.com
SBC
SBC (Schwartz Bayesian Information)
𝑆𝐵𝐶 = 𝑛 ln ො𝜎𝜖2 + 𝑝 + 𝑞 + 1 ln 𝑛 )
www.company.com
AICc
• AIC “corrected”
www.company.com
Memilih Model di Eviews
www.company.com
Reference
• STAT 497_LN5
(http://www.metu.edu.tr/~ceylan/STAT%20497_LN5.ppt)
• STAT 497_LN9
• Montgomery, D.C., et al., 2015, Introduction to Time Series
Analysis and Forecasting Second Edition, Wiley.
• Manual Eviews 8