Given:
NIM: G1501211049
with:
\(\phi_{1}=-0.75k\)
\(\phi_{2}=-0.65k\)
\(e_{t} \sim Normal\left ( 0, 1.2k \right )\)
by using the last three digits od NIM, the value of k is:
\[k=0+4+9=13\]
So, That:
\[\phi_{1}=-0.75k=-0.7513\] \[\phi_{2}=-0.65k=-0.6513\] \[e_{t} \sim Normal\left ( 0, 1.213 \right )\]
B. Answer
Generate data \(Y_{t}\) (\(n=250\)).
set.seed(1501211049) #set.seed used is NIM
e <- rnorm(250, mean=0, sd=1.213)
n <- length(e)
phi1 <- -0.7513
phi2 <- -0.6513
y <- c(1:n-2)
for(i in 3:n){
y[i]=phi1*y[i-1]+phi2*y[i-2]+e[i]
}
y.ar2 <- y[-c(1:50)] #using the last 200 data
plot.ts(y.ar2, col="blue", lty =1, main="Time series plot", xlab="Time", ylab=" Y for AR(2)" )
points(y.ar2, pch = 20, col = "blue")
Conclusion: From the plot above, it can be seen that the data generated from the AR(2) model is stationary data.
C. Answer
Correlogram of data generated by taking the last 200 da
acf(y.ar2, lag.max = 10, col="blue", main="Correlogram")
Conclusion: Based on the correlogram plot above, it can be seen that there are significant faults in the first and third lags. However, the second lag does not look significant. Therefore, it is suspected that the AR(2) model is not the right model for the generated data. To ensure further, we will plot \(Y_{t}\) and \(Y_{t-k}\) where k is lag, \(k=1,2,3...\).
D. Answer
Plot between \(Y_{t}\) and \(Y_{t-k}\) with \(k=1\) or the first lag.
plot(x=zlag(y.ar2, 1),
y=y.ar2, col="blue", xlab = expression(Y[t-1]), ylab = expression(Y[t]),
type = 'p', main="Plot with lag k=1")
Conclusion: Based on the plot between \(Y_{t}\) and \(Y_{t-k}\) and \(k=1\) or the first lag above, it can be seen that the generated data tends to form a linear line leading to the bottom right. Therefore, the relationship between \(Y_{t}\) and \(Y_{t-1}\) has a negative autocorrelation.
E. Answer
Plot between \(Y_{t}\) with \(Y_{t-k}\) with \(k=2\) or the second lag.
plot(x=zlag(y.ar2, 2),
y=y.ar2, col="blue", xlab = expression(Y[t-2]), ylab = expression(Y[t]),
type = 'p', main="Plot with lag k=2")
Conclusion: Based on the plot between \(Y_{t}\) and \(Y_{t-k}\) and \(k=2\) or the second lag above, it can be seen that the generated data tends to form a linear line leading to the bottom right. Therefore, the relationship between \(Y_{t}\) and \(Y_{t-2}\) has a negative autocorrelation.
F. Answer
Plot between \(Y_{t}\) and \(Y_{t-k}\) with \(k=3\) or the third lag.
plot(x=zlag(y.ar2, 3),
y=y.ar2, col="blue", xlab = expression(Y[t-3]), ylab = expression(Y[t]),
type = 'p', main="Plot with lag 3")
Conclusion: Based on the plot between \(Y_{t}\) and \(Y_{t-k}\) and \(k=3\) or the third lag above, it can be seen that the generated data tends to form a linear line leading to the top right. Therefore, the relationship between \(Y_{t}\) and \(Y_{t-3}\) has a positive autocorrelation.