# Parameter estimation for dynamic regression models with correlated noise ARMA errors

I'm reading the Dynamic Regression Models chapter ( https://www.otexts.org/fpp/9/1 ) in Professor Hyndman's book, and I couldn't understand how to fit the regression model when the error is modeled with an ARIMA process:

\begin{align*} y_t &= \beta_0 + \beta_1 x_{1,t} + \dots + \beta_k x_{k,t} + n_t,\\ & (1-\phi_1B)(1-B)n_t = (1+\theta_1B)e_t, \end{align*}

The procedure that is described in the chapter is the following:

1. Check that the forecast variable and all predictors are stationary. If not, apply differencing until all variables are stationary. Where appropriate, use the same differencing for all variables to preserve interpretability.
2. Fit the regression model with AR(2) errors for non-seasonal data or ARIMA(2,0,0)(1,0,0)m errors for seasonal data.
3. Calculate the errors ($n_{t}$) from the fitted regression model and identify an appropriate ARMA model for them.
4. Re-fit the entire model using the new ARMA model for the errors.
5. Check that the $e_{t}$ series looks like white noise.

I completely understand that applying the least square approach directly is not appropriate as this will produce biased parameters estimates, however the fitting process is not clear at all for me (particularly step 2 of the procedure above). I honestly would like to understand it and not to rely blindly in an automatic R code.

Thanks for any help!

• if you want to learn more about dynamic regression, I would recommend to read the following text: 1. Forecasting with Dynamic Regression Models by Pankratz and 2. Forecasting: Methods and Applications. – forecaster Oct 1 '14 at 15:58
• Continuing my previous comment. The first book is written by Pankratz who coined the term "Dynamic Regression" this is one of the best books around to learn Dynamic regression. The second book has a fantastic chapter on advanced forecasting methods/Dynamic regression which is succinct and lucidly written. Also, it is a predecessor to Hyndman's online book, but better for dynamic regression chapter. – forecaster Oct 1 '14 at 16:04
• Thanks @forecaster! The info you provided was extremely useful. – jroberayalas Oct 3 '14 at 11:39