Solved – Time series modeling with dynamic regressors in SAS vs R

arimaforecastingrsastime series

I am using both R and SAS for the time series modeling. There is an option in SAS that I could not find so far in any packages developed in R for the time series modeling such as TSA or forecast package, at least to the best of my knowledge! To explain more, if we use the windowing environment in SAS to fit an ARIMA model with a regressor, we basically choose:

Solution->Analysis->Time series Forecasting System->Develop Models
Then Fit ARIMA model -> Predictors->Dynamic Regressors

If we ask to forecast this model, SAS says:

The following regressor(s) do not have any forecasting models. The system will automatically select forecasting models for these regressors.

This means that we have not provided the values of the regressors over the forecasting period, and the system tries to find a model for that.

My questions:

  1. Is there any package in R with the same capability (explained above) as in SAS to forecast an ARIMA model?
  2. How can SAS automatically forecast the regressor(s) and based on what models?

Best Answer

While it is not built in, it is easy enough to do:

library(forecast)
fity <- auto.arima(y, xreg=x)
fitx <- auto.arima(x)
forecast(fity,h=10,xreg=forecast(fitx,h=10)$mean)

However, the prediction intervals obtained do not account for the variance in the forecasts of x. I doubt that SAS handles this either.