I have the following output from the auto.arima function with specified xreg:
Series: Individuals
Regression with ARIMA(2,1,1) errors
Coefficients:
ar1 ar2 ma1 inflation GDP growth EURIBOR
-0.8366 -0.3928 0.4008 -0.0013 -8e-04 0.0139
s.e. 0.2155 0.0863 0.2333 0.0023 1e-03 0.0036
sigma^2 estimated as 0.0004495: log likelihood=453.32
AIC=-892.63 AICc=-892 BIC=-870.09
Does it hold that
$y_t = -0.0013*inflation_t -8*10^{-4}*GDP_t + 0.0139*EURIBOR_t + n_t$
$n_t = -0.8366*n_{t-1} - 0.3928*n_{t-2} + e_t + 0.4008*e_{t-1}$
or does the differencing change something?
I get the residuals by the following code
nt <- residuals(fitInd, type = "regression")
et <- residuals(fitInd, type = "innovation")
When I check with the residuals "nt" it does match, for example
nt[4]=0.2621466
and per the first equation:
$y_4 - (-0.0013*inflation_4 -8*10^{-4}*GDP_4 + 0.0139*EURIBOR_4)= n_4 = 0.2621466 $
However, it does not match for the innovation errors "et" per the second equation which should be equal to nt[4]:
-0.8366*nt[3] - 0.3928*nt[2] + et[4] + 0.4008*et[3] = -0.3318558
Could someone clarify what I am doing wrong. Thanks in advance.