Anda di halaman 1dari 5

Nama : Tiana Fitri

NIM : 1305617006

Prodi/Angkatan : Matematika/2017

TUGAS ANALISIS RUNTUN WAKTU (ARW)

8.1 For an AR(1) model with ϕ ≈ 0.5 and n = 100, the lag 1 sample autocorrelation of the
residuals is 0.5. Should we consider this unusual? Why or why not?
Jawab :

𝜙2 (0,5)2 0,5
Lag 1 → √𝑉𝑎𝑟̂ (𝑟̂1 ) ≈ √ = √ = = 0,05
𝑛 100 10
1
Batas garis dari autokorelasi didasarkan pada standard error yaitu . Oleh karena itu, lag
√𝑛
1
1 sample autokorelasi residual harus berada dalam = ±0,1.
√100

Jadi autokorelasi residual dari 0.5 ialah tidak biasa.

8.5 Simulate an MA(1) model with n = 36 and θ = −0.5.


(a) Fit the correctly specified MA(1) model and look at a time series plot of the residuals.
Does the plot support the MA(1) specification?
> set.seed(64231)
> y=arima.sim(n=36,list(ma=0.5))
> model=arima(y,order=c(0,0,1))
> win.graph(width=6.5,height=3,pointsize=8)
> plot(residuals(model),ylab ='Standardized Residuals', type='o')
> abline(h=0)

Plot dari residuals tersebut menunjukkan bahwa model cukup random atau acak.
(b) Display a normal quantile-quantile plot of the standardized residuals. Does the plot
support the MA(1) specification?
> win.graph(width=3,height=3,pointsize=8)
> qqnorm(residuals(model))
> qqline(residuals(model))

Pada awalnya plot normal quantile-quantile (Q-Q) cukup lurus atau mendekati garis
linier tapi pada bagian akhir atas titik-titik tersebut menjauh dari garis atau dapat
dikatakan ukuran sample cukup kecil. Oleh karena itu, diperlukan uji Shapiro-Wilk.
> shapiro.test(residuals(model))

Shapiro-Wilk normality test

data: residuals(model)
W = 0.96802, p-value = 0.374

Dengan tingkat signifikansi (α) = 0.05.


P-value > α atau 0.374 > 0,05.
Maka terima H0 atau dapat dikatakan bahwa model mengikuti distribusi normal.

(c) Display the sample ACF of the residuals. Does the plot support the MA(1)
specification?
> win.graph(width=6.5,height=3,pointsize=8)
> acf(residuals(model))
Dari plot ACF diatas menunjukkan bahwa tidak ada yang signifikan pada lag 1 sampai
lag 15.

(d) Calculate the Ljung-Box statistic summing to K = 6. Does this statistic support MA(1)
specification?
> Box.test(residuals(model),lag = 6, fitdf = 1, type = "Lj")

Box-Ljung test

data: residuals(model)
X-squared = 2.7428, df = 5, p-value = 0.7396

Dari uji tersebut antara residual pada lag t sampai residual lag 6 tidak ada yang saling
berkorelasi (bebas). Maka terima H0 dimana model telah memenuhi asumsi
independensi residual.

8.6 Simulate an AR(2) model with n = 48, ϕ1 = 1.5, and ϕ2 = −0.75.


(a) Fit the correctly specified AR(2) model and look at a time series plot of the residuals.
Does the plot support the AR(2) specification?
> set.seed(65423)
> x=arima.sim(n=48,list(ar=c(1.5,-0.75)))
> modell=arima(x,order=c(2,0,0))
> win.graph(width=6.5,height=3,pointsize=8)
> plot(residuals(modell),ylab ='Standardized Residuals', type='o')
> abline(h=0)
Plot dari residuals tersebut menunjukkan bahwa model random atau acak.

(b) Display a normal quantile-quantile plot of the standardized residuals. Does the plot
support the AR(2) specification?
> win.graph(width=3,height=3,pointsize=8)
> qqnorm(residuals(modell))
> qqline(residuals(modell))

Plot tersebut menunjukkan bahwa titik berdekatan atau berhimpitan dengan garis
linier. Oleh karena itu model tidak ada permasalahan dengan kenormalan. Maka,
model mengikuti distribusi normal.
(c) Display the sample ACF of the residuals. Does the plot support the AR(2)
specification?
> win.graph(width=6.5,height=3,pointsize=8)
> acf(residuals(modell))

Dari plot ACF tersebut terlihat ada 2 lag pada autokorelasi residual yang signifikan
(melewati batas garis) yaitu pada lag 2 dan lag 15.

(d) Calculate the Ljung-Box statistic summing to K = 12. Does this statistic support the
AR(2) specification?
> Box.test(residuals(modell),lag = 12, fitdf = 2, type = "Ljung")

Box-Ljung test

data: residuals(modell)
X-squared = 18.8, df = 10, p-value = 0.04288

Dari uji Ljung-Box tersebut, P-value < α atau 0.04288 < 0.05.
Sehingga dapat disimpulkan bahwa tolak H0 maka asumsi independensi residual tidak
diterima pada taraf signifikan 5% pada simulasi ini.

Anda mungkin juga menyukai