Main Content

Recursive linear regression

`recreg`

recursively estimates coefficients (*β*) and their standard errors in a multiple linear regression model of the form *y* = *Xβ* + *ε* by performing successive regressions using nested or rolling windows. `recreg`

has options for OLS, HAC, and FGLS estimates, and for iterative plots of the estimates.

`recreg(`

fits the data in the table `Tbl`

)`Tbl`

to multiple linear regression model. The first `numPreds`

columns are the predictors (`X`

) and the last column is the response (`y`

).

`recreg(___,`

specifies options using one or more name-value pair arguments in addition to the input arguments in previous syntaxes. For example, you can specify the estimation method by using `Name,Value`

)`'`

`Estimator`

`'`

or whether to include an intercept in the multiple regression model by using `'`

`Intercept`

`'`

.

`recreg(`

plots on the axes specified in `ax`

,___)`ax`

instead of the axes of new figures. The option `ax`

can precede any of the input argument combinations in the previous syntaxes.

`[`

additionally returns handles to plotted graphics objects. Use elements of `Coeff`

,`SE`

,`coeffPlots`

] = recreg(___)`coeffPlots`

to modify properties of the plots after you create it.

Plots of nested-window estimates typically show volatility during a “burn-in” period, in which the number of subsample observations is only slightly larger than the number of coefficients in the model. After this period, any further volatility is evidence of coefficient instability. Sudden changes in coefficient values can indicate a structural change, and sustained changes can indicate model misspecification. For structural change tests, see `cusumtest`

and `chowtest`

.

[1] Enders, W. *Applied Econometric Time Series.* New York: John Wiley & Sons, Inc., 2009.

[2] Johnston, J. and J. DiNardo. *Econometric Methods.* New York: McGraw Hill, 1997.