Subject Business Economics
Subject Business Economics
2. Detection of Autocorrelation
The presence of autocorrelation can be detected by looking at the residual plot. The graph
of estimated residuals may be plotted in several ways.
We can plot the residuals against time
We can plot the standardized residuals against time. The residuals are standardized by
𝑒
dividing the residuals by the standard error of regression. estd =
̂𝑢
√𝜎
these standardized residuals have mean zero and approximately unit variance. For large
n, they are also approximately distributed normally1.
We can also plot the residuals against their lagged values. So, for an AR (1) scheme, et
may be plotted against et-1.
1
Gujarati D & Sangeetha, Basic Econometrics, Tata McGraw Hill India, 4 th ed, 2007,pp474
Figure 1
Figure 2
BUSINESS PAPER No. 8: FUNDAMENTALS OF ECONOMETRICS
ECONOMICS MODULE No. 18: TEST FOR AUTOCORRELATION
____________________________________________________________________________________________________
Figure 3
It is a non-parametric test because it does not invoke any assumptions about the underlying
distribution of the disturbance term. This test is also called Geary test after, R C Geary who
first proposed it in 19702. A run may be defined as the continuous sequence of a “+” or “–
” attribute in the residuals. The length of a run may be defined as number of elements in it.
For example, we may observe residuals with the following pattern of signs:
(- - - - - - - - )(+ + + + + + + + + + + + +)( - - - - - - - - - )
Here, we observe 8 negative residuals, followed by 13 positive residuals, followed by 9
negative residuals for a total of 30 observations. When we observe that a positive residual
2
R C Geary, “Relative efficiency of count sign changes for assessing residual autoregression in least square
regression”, Biometrika, Vol 57, 1970 pp 123-127.
2𝑁1 𝑁2
Mean, E(R) = +1
𝑁
2𝑁1 𝑁2 (2𝑁1 𝑁 2 − 𝑁)
Variance, 𝜎𝑅2 = (𝑁)2 (N−1)
The null hypothesis that can be tested is that the residuals are random. A table for critical
values of runs if N1 or N2 is less than 20 is also there.
Durbin & Watson have defined the d statistic, based on the estimated residuals of the
regression
∑𝑛
𝑡=2(𝑢 ̂𝑡−1 )2
̂𝑡 −𝑢
d= ∑𝑛 ̂𝑡2
(1)
𝑡=1 𝑢
Assumptions underlying the d statistic
1. The regression model includes the intercept term.
2. The explanatory variables are non-stochastic
3. The disturbance term, ut is generated by first order autoregressive scheme,
4. The disturbance term, ut is distributed normally.
5. The regression model is not autoregressive, i.e., it does not include lagged values of the
dependent variable as one of the explanatory variables.
6. There are no missing observations in the data.
𝑢̂𝑡 and 𝑢̂𝑡−1 are said to be approximately equal since they differ in only one observation,
therefore the value of d statistic mentioned in (1) may be written as
∑𝑢
̂𝑡 𝑢
̂𝑡−1
𝑑 ≈ 2 (1 − ̂𝑡2
∑𝑢
) (2)
d ≈ 2(1-𝜌̂) (4)
∵ -1 ≤ρ ≤ 1, ∴ 2 ≤d≤4 (5)
To summarize, if no autocorrelation is present in the model then, the d statistic will take a
value equal to 2. If positive autocorrelation is present in the model then, the d statistic will
take a value close to 0. If negative autocorrelation is present in the model then, the d statistic
will take a value close to 4.
However, it is important to note that the sampling distribution of d under the null
hypothesis of no autocorrelation depends upon the values of the explanatory variables. So,
the critical values of d will also depend on the values of the explanatory variables. In order,
to overcome this problem Durbin –Watson, developed the lower and upper bounds of d,
namely dL and dU.
The probability distribution of dL and dU does not depend on the values of the explanatory
variables and they have the property that, dL< d < dU. Using this property the D-W d test
can be carried out to test for autocorrelation.
BUSINESS PAPER No. 8: FUNDAMENTALS OF ECONOMETRICS
ECONOMICS MODULE No. 18: TEST FOR AUTOCORRELATION
____________________________________________________________________________________________________
The values for the lower and upper bounds of d are contained in the Durbin Watson
statistical tables.
Steps in D-W d Test
Hypothesis (i)
No positive autocorrelation Reject 0 < d < dL
No positive autocorrelation No decision dL ≤ d ≤ dU
Hypothesis (ii)
No negative autocorrelation Reject 4- dL < d < 4
No negative autocorrelation No decision 4- dU ≤ d ≤ 4- dL
Hypothesis (iii)
No autocorrelation Do not reject dU <d < 4- du
𝑑 𝑛
h = (1- 2 )√ ̂1 ) ∼ approx. N(0, 1)
1−𝑛 𝑣𝑎𝑟(𝛽
Durbin (1970) suggested the m test to overcome the limitation of the h test.
We use the t test for the coefficient of ût−1 to carry out the following hypotheses test.
(i) Test for positive autocorrelation
H0: ρ = 0 versus H1: ρ > 0
Null hypothesis states that there is no positive autocorrelation
(ii) Test for negative autocorrelation
H0: ρ = 0 versus H1: ρ < 0
Null hypothesis states that there is no negative autocorrelation
Wallis proposed a test for fourth order autocorrelation. If the disturbance term is
characterized by fourth order autocorrelation then,
ut = φ4ut-4 + εt
This test overcomes two main limitations of the D-W test namely,
(i) It allows the use of both autoregressive and moving averages regression models
(ii) Allows testing for higher order autocorrelation.
Hypothesis in LM Tests
The null hypothesis is that there is no autocorrelation of any order
Steps in LM test
1. Estimate the model by OLS method and obtain the estimated residuals, 𝑢̂𝑡
2. Run the auxiliary regression
𝑢̂𝑡 = α1 + α2 Xt + 𝜌̂1 𝑢̂𝑡−1 + 𝜌̂2 𝑢̂𝑡−2 + . . . + 𝜌̂𝑛 𝑢̂𝑡−𝑛 + εt3 (8)
3. Obtain R2
4. The test variate is (n-p) R2.
5. For a large value of n, (n-p) R2 ∼ 𝜒𝑝2
6. The hypothesis test is a test of joint significance of first p autocorrelations of these
disturbance terms. H0: ρ1 = ρ2 =. . . . ρn = 0 (No autocorrelation)
H1: At least one of the ρ ≠ 0 (Autocorrelation present)
The same test can be used for any one of the alternate hypotheses.
3
This regression contains only n-p variables.
Advantage of LM test
The test can be used both for autoregressive and moving average autocorrelated
disturbance term in the model.
Limitation of LM test
A limitation of the test is that the length of the lag p cannot be specified a priori. The length
of the lag has to be found by inspecting the t statistics on each lagged residual in the
auxiliary regression.
6. Portmanteau Q Tests
Limitations
It has been found that the Q statistic in Box-Pierce Test performs very well with large
samples but not with small samples.
The Q statistic in Box-Pierce test has been modified so that it performs well in small
samples. It is known as the Ljung Box Q statistic.
̂2
𝜌
Ljung Box Q = n (n+2) ∑ℎ𝑘=1 𝑛−𝑘
𝑘
If residuals are white noise, the Q statistic follows a χ2 distribution with h degrees of
freedom just like the Box-Pierce Q statistic.
The Q statistic can be applied for any type of ARIMA4 model. But when it is applied to
test for autocorrelation of the disturbance term in a model, the degrees of freedom of the
test statistic have to be computed by subtracting the number of parameters from the total
number of observations.
Hypothesis in Q Tests
The null and alternative hypotheses are the same as those in the Breusch-Godfrey LM test.
Steps in Q test
1. Estimate the model by OLS method and obtain the estimated residuals, 𝑢̂𝑡
2. Estimate the autocorrelation function 𝜌̂
3. Compute the test variate Q
4. Q ∼ 𝜒ℎ2
5. The hypothesis test is a test of joint significance of first p autocorrelations of these
disturbance terms. H0: ρ1 = ρ2 =. . . . ρn = 0 (No autocorrelation)
H1: At least one of the ρ ≠ 0 (Autocorrelation present)
6. If the test statistic exceeds the critical value of χ2 at the chosen level of significance, then
the null hypothesis is rejected.
4
Autoregressive Integrated Moving Averages (ARIMA) model is a generalization of the ARMA
(Autoregressive Moving Averages model.
There are several methods for detecting the presence of autocorrelation. The graphical
method and runs method are non-parametric tests. Durbin Watson test and Durbin's m and
h test are parametric tests that can be used for detection of first order autocorrelation. Wallis
test, LM test and Portmanteau tests are used for detection of higher order autocorrelation.
Durbin Watson test is one of the most commonly known test for autocorrelation but it
suffers from some limitations. These limitations are that in some cases the test is
inconclusive. The test can only be used when the regression model has an intercept term
and does not include lagged dependent variables. The test can only be used when the error
term is autoregressive. Durbin's h test helps in testing for autocorrelation in the presence
of lagged dependent variables in the regression model. LM test can be used when the error
term is generated by an autoregressive or moving averages processes.