Richard A. Bilonick
2003-Apr-16 21:15 UTC
[R] arima function - estimated coefficients and forecasts
I'm using the arima function to estimate coefficients and also using predict.Arima to forecast. This works nicely and I can see that the results are the same as using SAS's proc arima. I can also take the coefficent estimates for a simple model like ARIMA(2,1,0) and manually compute the forecast. The results agree to 5 or 6 decimal places. I can do this for models with and without means (i.e., using the include.mean argument). When I include an exogenous variable using the xreg argument, I can't manually reproduce the forecast I get when using predict.Arima with the newxreg argument, even with just one exogenous variable with an AR(1) model for the response. There does not appear to be any information in the arima help file explaining the model when xreg is used. I would have thought it was as simple as including an extra term containing the product of the coefficient and the value of the exogenous variable. Yet I can't manually reproduce the forecast. The manual forecasts seems to be off by a constant and a scale factor but I can't for the life of me see how I can fix this. Could someone point me in the right direction? Rick B.