(revisit Question 4) The data set is given in the Excel file (tab “Question 4”). Consider the following model: where Zt =φ1Zt−1 +φ2Zt−2 +εt, Xt − E(Xt) t=3,…,98.
samplemean<-mean(Q5$Data)
samplevariance<-var(Q5$Data)
samplemean
## [1] -1.925104
samplevariance
## [1] 0.2179729
Zt <- ((Q5$Data-(-1.925104))/0.2179729)
pacf(Zt,lag=2,plot=FALSE)
##
## Partial autocorrelations of series 'Zt', by lag
##
## 1 2
## 0.050 -0.149
Answer:
The predicted model is: \(\hat{Z_t} = 0.05Z_{t-1} - 1.49Z_{t-2}\)
(b) Based on the predicted model in part (a), forecast the 99th and 100th values.
Firstly, we use this value to forecast the 99th value.
Z99 <- (0.050*Zt[98]-0.149*Zt[97])
Z99
## [1] -0.5091271
Z99*(0.2179729^0.5)+(-1.925104)
## [1] -2.162803
In this case, the 99th value is -2.162803.
Then, we forecast the 100th value.
Z100 <- (0.050*Z99-0.149*Zt[98])
Z100
## [1] 0.387039
Z100*(0.2179729^0.5)+(-1.925104)
## [1] -1.744405
In this case, the 100th value is -1.744405.
(c) Compare the forecasted values obtained in part (b) to the true observed values given in the data set, are they reasonable forecast? Justified your answer.
Answer:
The true 99th value is -1.343715242 and the true 100th value is -1.434031102,which have large distinction with the predicted values. Therefore, the forecast is not reasonable.As this can only forecast a negative correlation but it cannot forecast a sine trend.