## Select Regression Model with ARIMA Errors

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:

1. To determine the appropriate lags to include in the error model, you must infer the unconditional disturbances, ut, where t = 1,...,T.

2. To properly infer ut from the regression model, you must estimate the regression model including all appropriate predictors, Xt.

3. 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 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:

1. 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.

2. 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.

3. Infer ut from the fitted regression model using `infer`.

4. Determine an appropriate ARIMA error model. For details, see Box-Jenkins Methodology and Autocorrelation and Partial Autocorrelation.

5. Use the new ARIMA error model to reestimate the regression model with ARIMA errors.

6. Check that the innovations (${\epsilon }_{t}$) 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.

7. Compute information criteria for the final model using `aicbic`.

8. 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. Forecasting: Principles and Practice. Melbourne, Australia: OTexts, 2018.