Take the 2-minute tour ×
Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. It's 100% free, no registration required.

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

1 Answer 1

up vote 4 down vote accepted

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.

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

Your Answer

 
discard

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.