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?

1 Answer 1


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

fity <- auto.arima(y, xreg=x)
fitx <- auto.arima(x)

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


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.