Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?
share|improve this question
up vote 9 down vote accepted

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.

share|improve this answer
Thank you Rob, very good and clear answer. – Stat Aug 17 '12 at 14:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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