Documente Academic
Documente Profesional
Documente Cultură
2
Forecasts are based on data or observations on
the variable of interest. This data is usually in the
form of a time series.
Suppose that there are T periods of data
available, with period T being the most recent.
We will let the observation on this variable at
time period t be denoted by: yt, t = 1, 2, .... , T.
3
4
5
6
Developing a forecasting model should
always begin with graphical display and
analysis of the available data.
Many of the broad general features of a time
series can be seen visually.
7
Time Series Plots.
Plotting Smoothed Data.
8
This is just a graph of yt versus the time period, t, for t
= 1, 2, ... , T.
Features such as trend and seasonality are usually
easy to see from the time series plot.
It is interesting to observe that some of the classical
tools of descriptive statistics, such as the histogram
and the stem-and-leaf display, are not particularly
useful for time series data because they do not take
time order into account.
9
10
11
12
Berikut data profit bulanan (dalam milyar) suatu perusahaan di bidang ekspor
impor selama 10 bulan terakhir.
a. Tentukan data termuluskan melalui teknik rataan bergerak sederhana dengan
rentang N = 3. Kemudian buat time-series plotnya bersama dengan data asal.
b. Tentukan ramalan besarnya profit pada setiap satu waktu ke depan. Berapa
ramalan profit pada bulan ke-11 dan ke-12?
Bulan (t) Profit (Yt)
1 11
2 18
3 16
4 22
5 24
6 20
7 16
8 14
9 10
10 13
13
a. Tentukan data termuluskan melalui teknik rataan bergerak sederhana
dengan rentang N = 3. Kemudian buat time-series plotnya bersama
dengan data asal.
Bulan (t) yt MT
1 11 -
2 18 -
3 16 15.0
4 22 18.7
5 24 20.7
6 20 22.0
7 16 20.0
8 14 16.7
9 10 13.3
10 13 12.3
14
a. Tentukan data termuluskan melalui teknik rataan bergerak sederhana
dengan rentang N = 3. Kemudian buat time-series plotnya bersama
dengan data asal.
30
25
20
15 yt
10 MT
0
1 2 3 4 5 6 7 8 9 10
Bulan (t)
15
b. Tentukan ramalan besarnya profit pada setiap satu waktu ke depan.
Berapa ramalan profit pada bulan ke-11 dan ke-12?.
Bulan (t) yt MT (t -1)
1 11 -
2 18 -
3 16 15.0
4 22 18.7 15.0
5 24 20.7 18.7
6 20 22.0 20.7
7 16 20.0 22.0
8 14 16.7 20.0
9 10 13.3 16.7
10 12 12.3 13.3
11 - - 12.3
12 - - 12.3
16
17
Metode rataan bergerak sederhana (simple moving
average) hanya relevan untuk data deret waktu
yang stasioner.
18
A very important type of time series is a stationary
time series.
A time series is said to be strictly stationary if its
properties are not affected by a change in the time
origin.
That is, if the joint probability distribution of the
observations yt, yt+1 …. yt+n is exactly the same as the
joint probability distribution of the observations yt+k, yt+k+1
…. yt+k+n then the time series is strictly stationary.
19
20
21
22
Measure of forecast accuracy should always be
evaluated as part of a technique validation effort.
When more than one forecasting technique seems
reasonable for a particular application, these
forecast accuracy measures can also be used to
discriminate between competing models.
23
Mean Error (ME).
Mean Absolute Deviation (MAD).
Sum of Squared Error (SSE)
Mean of Squared Error (MSE).
Mean Percent forecast-Error (MPE).
Mean Absolute Percent forecast-Error (MAPE).
Akaike Information Criterion (AIC)
24
25
26
27
28
29
The mean percent forecast error (MPE) is
30
31
32
33
34
= nilai maksimum dari fungsi likelihood model
35
# Simple Moving Average
library("forecast")
library("TTR")
library("graphics")
par(col="black")
ts.plot(hujan.ts, xlab="Tahun", ylab="Curah Hujan",lty=1)
points(hujan.ts)
par(col="red")
lines(hujan.sma)
36
Time Series:
Start = 1813
End = 1912
Frequency = 1
hujan.ts hujan.sma
1813 23.56 NA
1814 26.07 NA
1815 21.86 23.83000
1816 31.24 26.39000
1817 23.65 25.58333
1818 23.88 26.25667
1819 26.41 24.64667
.
.
.
1910 25.36 25.26000
1911 24.79 25.63333
1912 27.88 26.01000
37
Garis Merah : Data termuluskan
38
Gunakan data (the sales of mature pharmaceutical product) di dalam buku
Montgomery (Appendix B, Table B.2, hlm. 412).
a. Tentukan data termuluskan melalui teknik rataan bergerak sederhana
dengan rentang N = 3. Hitung ramalan untuk 5 waktu ke depan.
b. Tentukan data termuluskan melalui teknik rataan bergerak sederhana
dengan rentang N = 5. Hitung ramalan untuk 5 waktu ke depan.
c. Buat time-series plotnya masing-masing bersama dengan data asal.
d. Tentukan nilai SSE, MSE, dan MAPE masing-masing untuk (a) dan (b).
Apa kesimpulan Anda?
Catatan: Kerjakan terlebih dahulu poin (a) s.d. (d) di atas menggunakan
Excel. Kemudian bandingkan hasilnya dengan keluaran dari
Program R.
39
40
41
Gunakan data (Chemical Process Viscosity ) di dalam buku Montgomery
(Appendix B, Table B.3, hlm. 413).
a. Tambahkan m pada seluruh data reading pada Table B.3 tersebut.
b. Pada data (a) di atas, tentukan data termuluskan melalui teknik rataan
bergerak sederhana dengan rentang N = 4. Hitung ramalan untuk 5 waktu
ke depan.
c. Pada data (a) di atas, tentukan data termuluskan melalui teknik rataan
bergerak sederhana dengan rentang N = 6. Hitung ramalan untuk 5 waktu
ke depan.
d. Buat time-series plotnya masing-masing bersama dengan data asal.
e. Tentukan nilai SSE, MSE, dan MAPE masing-masing untuk (b) dan (c).
Apa kesimpulan Anda?
Catatan: Kerjakan terlebih dahulu poin (a) s.d. (e) di atas menggunakan
Excel. Kemudian bandingkan hasilnya dengan keluaran pada
Program R. (Syntax dan Output R harus dilampirkan)
42
43
Montgomery, D.C., et.al. 2008. Forecasting Time Series Analysis
2nd. John Wiley.
Cryer, J.D. and Chan, K.S. 2008. Time Series Analysis with
Application in R. Springer.
Cowpertwait, P.S.P. and Metcalfe, A.V. 2009. Introductory Time
Series with R. Springer New York.
Wei, William, W.S. 1990. Time Series Analysis, Univariate and
Multivariate Methods. Adison-Wesley Publishing Company Inc,
Canada.
44
Bisa di-download di
kusmansadik.wordpress.com
45
46 46