# Correcting for serial correlation (autocorrelation) in regression type data - ID 313

## Minitab 16  >  Statistics  >  Regression

Revised: 5/17/2010

Applies to

• Minitab 16

#### Description

How can I correct for serial correlation (autocorrelation) in regression type data?

#### Solution

You can use the Hildreth - Lu macro available from our Macros Library.

1. Click the link, Hildreth - Lu Macro, below.

2. To the right of the Hildreth - Lu Procedure description, click Code.

3. Save the page as a macro, called HILD_LU.MAC, in your Minitab macros directory (for example C:\Program Files\Minitab\Minitab 16\English\Macros). Instructions are available by clicking "How to save this page as a macro."

4. For example, suppose the dependent variable is in C1, and the independent variables are in C3, C4, and C5. In the Session window at the command prompt (MTB>), type

%hild_lu C1 C3-C5

Note: To display the command prompt, activate the Session window and choose Editor > Enable Commands.

The default values of rho, the correlation coefficient, are -1, -.9, -.8, -.7, -.6, -.5, -.4, -.3, -.2, -.1, 0, .1, .2, .3, .4, .5, .6, .7, .8, .9, and 1.0. If you wish to use different values for rho, store your values in a column, for example C10, then in the Session window at the command prompt (MTB>), type:

%hild_lu C1 C3-C5;
rho C10.

Each value of rho is used in a general differencing transformation of the data. (The first data point is transformed into a missing value). Each set of transformed data is used in a regression and the sum of squares error (SSE) is recorded. The value of rho that produced the smallest SSE is printed and used to produce the final regression output using the transformed data.

Reference:
"Econometric Models & Economic Forecasts" by Robert S. Pindyck and Daniel L. Rubinfeld, Second Edition, McGraw Hill.

#### Related Documents

Still looking for answers? You can...

• Click on another category at top left
• Contact Customer Support
• Search for text or a specific answer:

Help with Search

+1-814-231-2682