I've seen this question asked a few times but I still haven't seen a place where I can get some good examples on how to convert an arima()
output in R
to equation form.
So far, my understanding is that to convert an $AR(1)$ model in R
to equation form, you need to follow this form:
$$(x_t − \mu) = \varphi_1(x_{t−1} − \mu) + a_t$$
So for example, if you run $ARIMA(1,0,0)$ in R
and get the following output:
Call: arima(x = xt, order = c(1, 0, 0))
Coefficients:
ar1 intercept
0.3536 0.0017
s.e. 0.0385 0.0004
sigma^2 estimated as 4.69e-05: log likelihood = 2099.57, aic =
-4193.15
To turn that into an equation, you would do:
$$(x_t − 0.0017) = 0.3536(x_{t−1} − 0.0017) + a_t$$
$$\implies x_t = 0.0017 + 0.3536(x_{t−1}) − 0.0006 + a_t$$
$$\implies x_t = 0.0011 + 0.3536(x_{t−1}) + a_t$$
So that would be your actual $AR(1)$ equation. Is this correct? As opposed to just plugging in the R
output in to the $AR(1)$ form. So the following is wrong:
$$x_t = 0.0017 + 0.3536(x_{t−1}) + a_t$$
Note the difference in intercepts or "means". Also, would the sigma^2 term be the variance of the white noise term so that: $$a_t = N(0,4.69e-05)$$
Is there a good place to view examples of how to convert different $ARIMA$ models to an equation. Like $ARIMA(1,0,0)$, $ARIMA(2,0,0)$, $ARIMA(n,0,0)$, $ARIMA(0,0,1)$, $ARIMA(1,0,1)$, etc…
Best Answer
You have correctly identified that
arima
's reported "intercept" estimates are in fact mean estimates, and you have written the model in a correct form. This is discussed more, here: http://www.stat.pitt.edu/stoffer/tsa2/Rissues.htm