Anda di halaman 1dari 31

PRAKIRAAN PERMINTAAN

(FORECASTING)
suatu usaha untuk menduga apa yang akan terjadi pada masa
mendatang, dengan menggunakan suatu metode ilmiah.

Mengapa perlu prakiraan:


Memperoleh data / informasi untuk dasar perencanaan.
Adanya selang waktu (time lag) untuk memenuhi atau mengantisipasi terjadinya
suatu kejadian (permintaan).
Persiapan/
Pengadaan
Bahan&
resource:

Rencana
Produksi

t n2

Distribusi

Konsumen

Produksi

t -n1

Output Prakiraan:
Penjadwalan sumber daya produksi yang ada.
Mendapatkan sumberdaya tambahan.
Menentukan sumber daya apa yang diinginkan / dibutuhkan

METODE PRAKIRAAN
Horizon Waktu
Faktor2 yg menentukan hasil aktual yg
diprakirakan
Ketersediaan data/informasi masa lalu hal yg
diprakirakan
Pola data yang digunakan

Metode Kuantitatif:
Deret Waktu (Time Series)
Kausal:
Regresi

Metode Kualitatif:
Brain storming
Delphi
Market survey

Ekonometrik, dll

1. Tersedia data masa lalu


2. Numerik
3. Assumption of continuity

Assumption of Continuity : bahwa Pola Data masa lalu atau Bentuk Hubungan
antara Permintaan (peubah dependent) dan faktor/peubah yang
mempengaruhinya (peubah independent) akan berlanjut ke masa mendatang

Metode Time Series:


Analisa utk mengetahui pola data permintaan masa lalu atas dasar
pola data digunakan untuk mencari/menentukan permintaan masa
mendatang.
Pola data atau mengapa permintaan masa lalu mempunyai nilai tertentu
merupakan black box.

Metode Kausal :
Analisa utk mengetahui bagaimana bentuk hubungan antara nilai
permintaan dan peubah yang mempengaruhinya atas dasar bentuk
hubungan tsb digunakan untuk mencari/menentukan permintaan masa
mendatang.
Analisa untuk menentukan faktor/peubah yang mempengaruhi
permintaan penting.
Nilai permintaan tertentu dapat dijelaskan.

Metode Deret Waktu:


Perataan:
Perataan Sederhana
Perataan Bergerak (Moving Average);
Single Moving Average
Double Moving Average

Perataan Eksponensial:
Single Exponential Smoothing
Double Exponential Smoothing
Triple Exponential Smoothing
PEGELs Classification.

Dekomposisi
Auto Regresi Integrated Moving Average ( ARIMA) ~
Metode Box-Jenkins.
Jaringan Syaraf Tiruan
Data Warehouse
Data Mining

Metode Box Jenkins


(Auto Regresive Integrated Moving Average=ARIMA
Postulate General
Class of
Model

No

Identification

Identify Models to be
Tentatively entertained

Estimate Parameters in
Tentatively Entertained
Model

Estimation
and Testing

DiagnosticChecking
(Is the model adequate?)

Use Model for


Forecasting

Aplication

Data

Random

Berpola

Stasioner

Musiman

Tidak Stasioner

Aspek
Auto Regresif

Aspek
Moving Average

Identification

Time Series Data:


Stasioner vs Non Stasioner
Ada aspek atau dibangkitkan proses Auto Regresi.
Auto Regresi: hubungan antara peubah dimana peubah tidak bebas adalah
juga peubah bebas, hanya berbeda periode. Mis: Hubungan tkt penjualan
pada periode ke-t dengan tkt penjualan pada periode ke (t-n).

Ft 1 X t (1 ) X t 1 (1 ) 2 X t 2 (1 )3 X t 3 ......
Ada aspek atau dibangkitkan proses Moving Average:
Proses MA: bahwa penjualan pada periode tertentu merupakan fungsi dari
faktor random error periode2 sebelumnya.

Ft 1 Ft X t Ft atau

Ft 1 Ft ( t )

Ft 1 Ft 1 ( t 1 ) ( t )
Ft 1 Ft 2 ( t 2 ) ( t 1 ) ( t ).....dst

Model Box-Jenkins
ARIMA (p,d,q)(P,D,Q)S
Jika p = 0, maka tidak ada aspek Autoregresi
Jika p > 0, maka ada aspek Autoregresi, pada
ordo ke-k. (p=k)
Jika d = 0, maka pola data Stasioner
Jika d > 0, maka pola data Non-stasioner atau
ada aspek Trend atau musiman
Jika q = 0, maka tidak ada aspek moving-average
Jika q > 0, maka ada aspek moving-average,
pada ordo ke-k (q=k).

Pola Data Stasioner atau Non Stationer (Trend atau


Musiman) ??
Menggunakan Koef. Auto-korelasi, utk time lag ke-k (r k).
rk : korelasi antara Xt dgn X t-k : (k=1,2,m).
nk

rk

(X
t 1

X )( X t k X )


t 1

Xt X

Jika rk tidak nyata atau tidak berpola (random), maka pola data adalah
m
Random
2
Q

n
r
Diuji dgn statistik Box-Pierce Q.
k

k 1

Jika Q hitung < QTabel, pada d.f = m, maka rk tidak nyata.


Indikasi data yg stasioner:
pada hasil Plot nilai rk. , nilai nya menjadi 0 atau mendekati 0, setelah k=2 atau
3, atau polanya tidak beraturan.
Untuk data yang tidak stasioner, terdapat nilai rk, yang signifikan untuk beberapa
periode, serta pada hasil plot terdapat kecenderungan naik atau turun dengan
semakin besarnya nilai k.

Jika tidak stasioner, berapa nilai parameter d ??


Untuk itu dilakukan Diferensiasi (Pembedaan)

Diferensiasi
Mengkonversi Deret Data Asal Xt menjadi Xt=Xt Xt-k
(l=1,2,L).
l= 1, diferensiasi 1 kali.

Jika pada l=1, koeff.autokorelasi Xt atau rl sdh tidak


nyata, maka berearti d=1, jika tidak lakukan
diferensiasi ke-dua, dst.
d=1, berarti data asal Xt mempunyai aspek trend
Linier.

ARIMA (0,d,0)
Backward operator = B
BX t X t 1
B 2 X t B( BX t ) B( X t 1 ) X t 2
First Difference :
X 't X t X t 1 X t BX t (1 B ) X t
Second Difference :
X "t X 't X 't 1 ( X t X t 1 ) ( X t 1 X t 2 )
X "t ( X t 2 X t 1 X t 2 ) (1 2 B B 2 ) X t
ARIMA(0, d ,0) :
(1 B ) d X t et

B2Xt B(BXt) B(Xt1) Xt2


First Dif erence :
X 't Xt Xt1 Xt BXt (1 B)Xt

Apakah Ada Aspek atau Proses Auto Regresi ?


Analisa terhadap data yang Stasioner atau yang sudah di Stasioner
kan.
Terhadap data yg stasioner dicari nilai :
Koeffisien Autokorelasi dan
Koefisien Partial Autokorelasi

Plot nilai Koef Autokorelasi (acf) dan Partial Auto Korelasi (pacf)
Ciri bahwa pola time series adalah Arima(p,0,0) atau (AR(p):
An acf with large spikes at initial lags that decay to zero or a pacf with a
large spike at the first and possibly at the second lag indicates an
autoregressive process.

Ciri untuk p=1


Autokorelasi menurun secara eksponensial
Partial autokorelasi pada k=1 significant.

Untuk p=2
Partial autokorelasi sampai dengan k=2 significant

AUTOREGRESSIVE processes and the ACF


and PACF
For a pure AR(p) process:
The sample autocorrelation function (ACF) tends to taper
off gradually as k increases
The sample partial autocorrelation function (PACF) will
tend to show a cut off point, corresponding to
the fact that the sample partial autocorrelations are
non-zero for k p, but will be approximately zero for k>p.

Ciri untuk p=1


Autokorelasi menurun secara eksponensial
Partial autokorelasi pada k=1 significant.

Untuk p=2
Partial autokorelasi sampai dengan k=2 significant

AR(p) atau ARIMA (p,0,0)


X t '1 X t 1 2 X t 2 ... p X t p et
atau
(1 1 B 2 B ... p B ) X t 'et
2

BX t X t 1

1.0

ACF-Y2

Y2, an AR(1) series

0.5
0.0
-0.5

0
1.0

10

10

PACF-Y2

0.5
0.0
-0.5

Apakah Ada Aspek atau Proses Moving Average ?


Analisa terhadap data yang Stasioner atau yang sudah
di Stasioner kan.
Terhadap data yg stasioner dicari nilai :
Koeffisien Autokorelasi dan
Koefisien Partial Autokorelasi

Plot nilai Koef Autokorelasi dan Partial Auto Korelasi


Ciri pola deret data adalah Arima (0,0,q) atau MA(q):
An acf with a large spike at the first and possibly at the second
lag and a pacf with large spikes at initial lags that decay to zero
indicates a moving average process

MA processes and the ACF and PACF

In terms of the estimated ACF and PACF functions, the distinguishing


features of a pure MA (q) process are
ACF has a cut-off point, such that the estimated autocorrelations, r k ,are
close to zero for all k > q
the estimated PACF tends to taper off gradually as k increases.

Ciri untuk q=1


Partial Autokorelasi menurun secara eksponensial
Autokorelasi pada k=1 significant.

Untuk q=2
Autokorelasi sampai dengan p=2 significant

1.0

ACF-Y1

MA(2) series

0.5
0.0
-0.5

0
1.0

10

10

PACF-Y1

0.5
0.0
-0.5

MA(q) atau ARIMA (0,0,q)


X t et 1et 1 2et 2 ... q X t q
atau
X t (1 1 B 2 B ... q B )et
2

Bet et 1

Pola deret data adalah kombinasi Proses


Autoregresi dan Moving Average : Arima
(p,0,q) atai ARMA (p,q).
The acf and the pacf both exhibiting large
spikes that gradually die out indicates that
both autoregressive and moving averages
processes are present.

ARMA Proces atau ARIMA (1,0,1)


X t '1 X t 1 et 1et 1
atau

(1 1B) X t '(1 1B)et

(1 1 B ) X t ' (1 1 B )et
AR(1)

MA(1)

ARIMA Proces atau ARIMA (1,1,1)


(1 B)(1 1 B) X t '(1 1 B )et
1st Difference

AR(1)

MA(1)

atau
X t (1 1 ) X t 1 1 X t 2 ' et 1et 1

Characteristics of ARMA models


Model

ACF

PACF

White noise

All zero

All zero

MA(1)

Zero after 1 lag

Declines from 1st lag

MA(2)

Zero after 2 lags

Declines from 2nd lag

MA(q)

Zero after q lags

Declines from gth lag

AR(1)

Geometric decline from 1 lag

Zero after 1 lag

AR(2)

Geometric decline from 2 lags

Zero after 2 lags

AR(p)

Geometric decline from pth lag

Zero after p lags

ARMA(1,1)

Geometric decline from 1 lag

Declines from 1st lag

ARMA(p,q)

Geometric decline from pth lag

Declines from gth lag

BOX 3: IDENTIFICATION OF ARMA MODELS: A SUMMARY OF


PROPERTIES OF THE AC AND PAC FUNCTIONS
(Adapted from Enders, page 85)
PROCESS
White noise
AR(1): >0
AR(1): <0
AR(p)

MA(1): 1<0
MA(1): 1>0
MA(q)

ARMA(1,1) :
>0
ARMA(1,1) :
<0
ARMA(p,q)

I(1) or I(2) series

ACF
All k = 0
Direct exponential decay:
k =
Oscillating decay: k =
Decays towards zero.
Coefficients may oscillate.

Negative spike at lag 1.


k = 0 for k 2
Positive spike at lag 1.
k = 0 for k 2
k 0 for k q
k = 0 for k > q
i.e. a cut-off in the ACF
Exponential decay beginning
at lag 1
Oscillating decay beginning
at lag 1
Decay (either direct or
oscillatory) at lag q
k tapers off very slowly
or not at all

PACF
All kk = 0
11 = 1; kk = 0 for k 2
11 = 1; kk = 0 for k 2
Spikes through until lag p,
followed by cut off in
PAC function beyond lag p.
kk 0 for k p.
kk = 0 for k > p.
Exponential decay: 11 < 0
Exponential decay: 11 > 0
kk taper off
Oscillatory decay beginning
at lag 1. 11 = 1
Exponential decay beginning
at lag 1. 11 = 1
Decay (either direct or
oscillatory) beginning at lag p,
but no distinct cut-off point.

Apakah Ada Aspek Musiman??

Hasil plotting Koef Autokorelasi menunjukkan bahwa pada selang k


(time lag) tertentu tdp nilai rk yang menonjol / significant.
Untuk musiman
Triwulan S=4
Bulanan S= 12

Apabila data bersifat Musiman, identifikasi nilai P,D,& Q


Untuk nilai D:
Lakukan Deseasonality , dengan melakukan diferensiasi pertama
dengan time Lag = S
Diferensiasi pertama: Xt=Xt Xt-S
Apabila pada diferensiasi ke-1, aspek musiman sudah hilang, maka
D=1.

Untuk nilai P dan Q, dicari dengan cara yang sama seperti p dan q
akan tetapi dilakukan terhadap Data yang sudah dihilangkan aspek
musimannya.

SUMMARY IDENTIFIKASI POLA DERET DATA (Model ARIMA)


Box and Jenkins [2] present an interactive approach for fitting ARIMA models
to time series. This iterative approach involves identifying the model,
estimating the parameters, checking model adequacy, and forecasting, if
desired. The model identification step generally requires judgment from the
analyst.
1
First, decide if the data are stationary. That is, do the data possess
constant mean and variance.

Examine a time series plot to see if a transformation is required to


give constant variance.

Examine the acf to see if large autocorrelations do not die out,


indicating that differencing may be required to give a constant mean.
A seasonal pattern that repeats every kth time interval suggests taking the kth
difference to remove a portion of the pattern. Most series should not require
more than two difference operations or orders. Be careful not to
overdifference. If spikes in the acf die out rapidly, there is no need for further
differencing. A sign of an overdifferenced series is the first autocorrelation
close to -0.5 and small values elsewhere [11].
2

2. Next, examine the acf and pacf of your stationary data in order to identify
what autoregressive or moving average models terms are suggested.

An acf with large spikes at initial lags that decay to zero or a pacf
with a large spike at the first and possibly at the second lag indicates an
autoregressive process.

An acf with a large spike at the first and possibly at the second lag
and a pacf with large spikes at initial lags that decay to zero indicates a
moving average process.

The acf and the pacf both exhibiting large spikes that gradually die
out indicates that both autoregressive and moving averages processes are
present.
For most data, no more than two autoregressive parameters or two moving
average parameters are required in ARIMA models. See [11] for more
details on identifying ARIMA models.
3

3. Once you have identified one or more likely models, you are ready
to use the ARIMA procedure.

Fit the likely models and examine the significance of


parameters and select one model that gives the best fit. See Entering
the ARIMA model.

Check that the acf and pacf of residuals indicate a random


process, signified when there are no large spikes. You can easily
obtain an acf and a pacf of residual using ARIMAs Graphs subdialog
box. If large spikes remain, consider changing the model.

You may perform several iterations in finding the best model.


When you are satisfied with the fit, go ahead and make forecasts.
The ARIMA algorithm will perform up to 25 iterations to fit a given
model. If the solution does not converge, store the estimated
parameters and use them as starting values for a second fit. You can
store the estimated parameters and use them as starting values for a
subsequent fit as often as necessary.

Estimasi Parameter
Berdasarkan Identifikasi Model ARIMA, dilakukan
estimasi terhadap paramater: i dan i::

Trial and Error, menetapkan nilai yang


meminimumkan Jumlah Kuadrat Residual
Iterative Improvement.
Diagnostic Checking
Menghitung Error Prakiraan.

Menghitung Koeff. Autokorelasi dari Error.


Jika Koeff. Autokorelasi dari Error bersifat Random
Model Cocok; atau
Hitung Statistik Box-Pierce Q.
Jika Statistik Q hitung < Q tabel, pada tertentu.

ARIMA (0,1,1)(0,1,1)12

Anda mungkin juga menyukai