You are on page 1of 4

# How to detect and correct Autocorrelation?

## Submitted By- Bahirat Shraddha Dhananjay (14AR91R01)

Research Methodology
In statistics, the autocorrelation of a random process describes the correlation
between values of the process at different points in time, as a function of the
two times or of the time difference. Autocorrelation occurs in time-series
studies when the errors associated with a given time period carry over into
future time periods.

Detecting Autocorrelation:
There are two ways of detecting autocorrelation- First is the informal way
which is done through graphs and hence called the graphical method.
The second is through formal tests for autocorrelation, which are as
follows:
1.
2.
3.
4.

## The Durbin Watson Test

Run Test
The Breusch-Godfrey Test
The Durbins h Test (for the presence of lagged dependent variables)

1. Run test
A run is defined as uninterrupted sequence of one symbol or attribute,
such as + or - . The length of the run is defined as the number of element
in it.
If, N: total number of observations
N1: number of + symbols (i.e. + residuals)
N2: number of symbols (i.e. residuals)
R: number of runs
2 N N (2 N N N )
2 N1 N 2
R2 1 2 2 1 2
E ( R)
1
( N ) ( N 1)
N
Then,
If the null hypothesis of randomness is sustainable, following the
properties of the normal distribution, we should expect that: Prob [E(R)
1.96 R R E(R) 1.96 R]. Hypothesis: do not reject the null hypothesis
of randomness with 95% confidence if R, the number of runs, lies in the
preceding confidence interval; reject otherwise.
2. Durbin and Watson Test

t n

(u
t 2

ut 1 ) 2

t n

u
t 1

2
t

## It is simply the ratio of the sum of squared differences in

successive residuals to the RSS. The number of observation is n-1 as one
observation is lost in taking successive differences.

## Steps for testing autocorrelation through Durbin and Watson test:

Step 1: Estimate the model by OLS and obtain the residuals
Step 2: Calculate the DW statistic
Step 3: Construct the table with
the calculated DW statistic and the
dU, dL, 4-dU and 4-dL critical values.
Step 4: Conclude

1.

## Drawbacks of the Durbin and Watson

test
It may give inconclusive results.

2.

3.

## It cant take into account higher order of autocorrelation.

3. The Breusch-Godfrey Test
It is a Lagrange Multiplier Test that resolves the drawbacks of the DW test.
Consider the model:
Yt=1+2X2t+3X3t+4X4t++kXkt+ut.
Where: ut=1ut-1+ 2ut-2+3ut-3 ++ put-p +et
Combining those two we get:
Yt=1+2X2t+3X3t+4X4t++kXkt +1ut-1+ 2ut-2+3ut-3 ++ put-p
+et
Thus, the null and the alternative hypotheses are:

## H0: 1= 2== p=0 no autocorrelation

Ha: at least one of the s is not zero, thus, autocorrelation

## Steps for testing autocorrelation through Durbin and Watson test:

Step 1: Estimate the model and obtain the residuals
Step 2: Run the full LM model with the number of lags used being
determined by the assumed order of autocorrelation.
Step 3: Compute the LM statistic = (n-)R2 from the LM model and
compare it with the chi-square critical value.
Step 4: Conclude
4. The Durbins h Test (for the presence of lagged dependent variables)
When there are lagged dependent variables (i.e. Yt-1) then the DW test is
not applicable.
DW
n

h 1

2 1 n 2

## Durbin developed an alternative test statistic, named

the h-statistic, which is calculated by:

## Where sigma of gamma hat square is the variance of the estimated

coefficient of the lagged dependent variable. This statistic is distributed
following the normal distribution.
Resolving Autocorrelation:
There are two different cases for resolving Autocorrectional
When the value of is known.
When the value of is not known.
Consider the model: Yt=1+2X2t+3X3t+4X4t++kXkt+ut .
Where ut=1ut-1+et

## For the model of t-1:

Yt-1=1+2X2t-1+3X3t-1+4X4t-1++kXkt-1+ut-1
Multiply both sides by to get
Yt-1= 1+ 2X2t-1+ 3X3t-1+ 4X4t-1 ++ kXkt-1+ ut-1
Subtract those two equations:
Yt-Yt-1= (1-)1+ 2(X2t-X2t-1)+ 3(X3t-X3t-1)+ + k(Xkt-Xkt-1)+(ut-ut-1)

## Or Y*t= *1+ *2X*2t+ *3X*3t++ *kX*kt+et

Where now the problem of autocorrelation is resolved because et is no longer autocorrelated.

## The Cochrane-Orcutt iterative procedure:

Step 1: Estimate the regression and obtain residuals
Step 2: Estimate from regressing the residuals to its lagged terms.
Step 3: Transform the original variables as starred variables using the
obtained from step 2.
Step 4: Run the regression again with the transformed variables and
obtain residuals.
Step 5 and on: Continue repeating steps 2 to 4 for several rounds until
(stopping rule) the estimates of from two successive iterations differ by
no more than some preselected small value, such as 0.001.