Paul Gilbert wrote:
So if I have 200 observations and I want to estimate for time t = 201, I would use y[200] and x[200] and I would have my forecast. But
^^^^^^ Don't you mean x[201] ?
Yes, I meant x[201]. 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]) Rick B.