[R] Anyone Familiar with Using arima function with exogenous variables?
Richard A. Bilonick
rab at nauticom.net
Tue Apr 22 18:37:34 CEST 2003
Paul Gilbert wrote:
>> So if I have 200 observations and I want to estimate for time t =
>> 201, I would use y and x and I would have my forecast. But
> Don't you mean x ?
Yes, I meant x.
I found what I was looking for (although it's not in the R
documentation). When Y is differenced, fitted by an AR(1) with one
exogenous variable with no intercept, the model is written as:
(1-B)Y[t] = wX[t] + e[t]/(1 - phi B)
Solving for Y[t]:
(1 - phi B)(1 - B) Y[t] = w(1 - phi B) X[t] + e[t]
(1 - phi B - B + phi B2) Y[t] = w(X[t] - phi X[t-1]) + e[t]
Y[t] = (1 + phi)Y[t-1] - phi Y[t-2] + w(X[t] - phi X[t-1]) + e[t]
So the 1-step ahead forecast is:
Y[t]' = (1 + phi')Y[t-1] - phi' Y[t-2] + w'(X[t] - phi' X[t-1])
More information about the R-help