Regression models with ARIMA time series errors contain two components: a regression model and an error model. Typically, the research emphasis is on the regression model. But, in order to properly select the predictors, you must properly model the error structure. The following steps outline the infinite loop that you might experience when selecting a regression model with ARIMA errors:
To determine the appropriate lags to include in the error model, you must infer the unconditional disturbances, ut, where t = 1,...,T.
To properly infer ut from the regression model, you must estimate the regression model including all appropriate predictors, Xt.
To determine the appropriate predictors, you must properly model the error structure, ut. That is, you must determine the appropriate lags for the error model.
If econometric theory suggests that a particular regression model is appropriate, then fit the regression model over varying autoregressive and moving average degrees. Choose the model that yields the lowest information criterion. For example, see Choose Lags for an ARMA Error Model.
However, if you want statistical methods to choose both the regression and error models, then one way to choose an appropriate regression model with ARIMA errors (as recommended in ) is to:
Check each variable for stationarity. Transform or difference the nonstationary series to make them stationary. To maintain the interpretation of the relationships between the variables, transform or difference all variables the same way. For details, see Data Transformations.
Assume that the error model is AR(2) or an appropriate multiplicative seasonal AR(2) model. Estimate the regression model using estimate including all predictors and the possibly transformed or differenced data.
Infer ut from the fitted regression model using infer.
Use the new ARIMA error model to reestimate the regression model with ARIMA errors.
Check that the innovations () are a white noise sequence. For details, see Residual Diagnostics. If the innovations are not a white noise sequence, then choose a different ARIMA error model, reestimate the regression model with ARIMA errors, and recheck the innovations.
Compute information criteria for the final model using aicbic.
Perform the full procedure repeatedly using a subset of predictors for each trial. Choose the model with the lowest information criterion.
 Hyndman, R. J. and G. Athanasopoulos. "Dynamic Regression Models." Forecasting: Principles and Practice. April 2013. http://www.otexts.org/fpp/9/1.