R ARIMA Models – Definition and Usage of ARIMA Models with Exogenous Regressors in R

arimar

I am wondering about the exact definition of ARIMA model in function arima in R when exogenous regressors are included.

I understand that arima(y, order=c(p,0,q), xreg=x) is equivalent to estimating the following equation (where $\mu_y$ and $\mu_x$ stand for the means of $y$ and $x$, respectively):

(1) $(y_t-\mu_y)=\varphi_0+\phi_1(y_{t-1}-\mu_y)+…+\varphi_p(y_{t-p}-\mu_y)+\varepsilon_t+\theta_1\varepsilon_{t-1}+…+\theta_q\varepsilon_{t-q}+\beta_1x_t$

Or is it

(2) $(y_t-\mu_y)=\varphi_0+\phi_1(y_{t-1}-\mu_y)+…+\varphi_p(y_{t-p}-\mu_y)+\varepsilon_t+\theta_1\varepsilon_{t-1}+…+\theta_q\varepsilon_{t-q}+\beta_1(x_t-\mu_x)$

(only the last term differs between (1) and (2))?

Or perhaps I got both of them wrong?

Edit: I now realize that including both {$\mu_x$ and $\mu_y$} and $\varphi_0$ in (2) was superfluous.

Best Answer

Looking at the documentation and the code of arima, I conclude that the following linear model with ARIMA errors is fitted when exogenous regressors are included:

\begin{eqnarray} \begin{array}{l} (y_t-\mu-X_t^{'}\vec{\beta})&=&\phi_1(y_{t-1}-\mu-X_{t-1}^{'}\vec{\beta})+...+\phi_p(y_{t-p}-\mu-X_{t-p}^{'}\vec{\beta}) \\ &+&\varepsilon_t+\theta_1\varepsilon_{t-1}+...+ \theta_q\varepsilon_{t-q} \,. \end{array} \end{eqnarray}

$X_t^{'}$ is a row vector containing the values of the external regressors at time $t$ and $\vec{\beta}$ is a column vector containing the coefficients related to those regressors.

Thus, there is no $\varphi_0$ term and the mean $\mu_x$ is not removed from the exogenous regressors.

Related Question