I've fitted a model with auto arima, with independent variables with the below codes:
Regressors<- cbind(GDPr_chg,r) arima1 <-Arima(RVD_all_chg, order=c(2,0,0),seasonal=c(0,0,1), xreg=Regressors)
Turned out the model results are as below:
ARIMA(2,0,0)(0,0,1) with non-zero mean Coefficients: ar1 ar2 sma1 intercept GDPr_chg r 1.5285 -0.5668 -0.7920 0.0990 0.4459 -0.7613 s.e. 0.0766 0.0744 0.0724 0.0274 0.1948 0.3437
I know that xreg will fit an ARIMA model for the errors, so the model should be:
y = 0.099 + 0.4459*GDPr_chg -0.7613*r + 1.5285*u(t-1) -0.5668*u(t-2)-0.7920*e(t-4) + "random error
But I couldnt obtain the same fitted values by using the above formula. Can anyone give me a hint?
Also, how does R fit the error terms for the first few forecasts when u(t-1) and u(t-2) are still not available [as u(t) should be the regression residual in time=t, right?]
Great thanks in advance everyone.