Professional Documents
Culture Documents
2
Autocorrelation: Why does it happen?
Misspecification bias: If we exclude one control variable (or several) from the model, we
can have autocorrelation.
Example:
Instead of estimating 𝑌𝑡 = 𝛽1 + 𝛽2 𝑋2𝑡 + 𝛽3 𝑋3𝑡 + 𝛽4 𝑋4𝑡 + 𝑢𝑡
Where: 𝑣𝑡 = 𝛽4 𝑋4𝑡 + 𝑢𝑡
3
Autocorrelation: Why does it happen?
4
Autocorrelation: Why does it happen?
Agricultural Market: The supply of agricultural products depends on the Price of previous
year:
Lags:
𝐶𝑜𝑛𝑠𝑢𝑚𝑒𝑡 = 𝛽1 + 𝛽2 𝑖𝑛𝑐𝑜𝑚𝑒𝑡 + 𝛽3 𝑐𝑜𝑛𝑠𝑢𝑚𝑒𝑡−1 + 𝑢𝑡
6
OLS estimation with Autocorrelation: Consequences?
𝑌𝑡 = 𝛽1 + 𝛽2 𝑋𝑡 + 𝑢𝑡
In order to know what happens if we use OLS and there is autocorrelation in our model, let us have
a look at the structure of 𝑢𝑡 :
𝑢𝑡 = 𝜌𝑢𝑡−1 + 𝜀𝑡
Autocovariance
coefficient: 𝜌 with −1 < 𝜌 < 1 An error term is
called “White
𝐸 𝜀𝑡 = 0 Noise” if these
characteristics
𝑣𝑎𝑟 𝜀𝑡 = 𝜎𝜀2 are fulfilled.
7
OLS estimation with Autocorrelation: Consequences?
𝑢𝑡 = 𝜌𝑢𝑡−1 + 𝜀𝑡
If:
𝑢𝑡 = 𝜌1 𝑢𝑡−1 + 𝜌2 𝑢𝑡−2 + 𝜀𝑡
8
OLS estimation with Autocorrelation: Consequences?
𝜎𝜀2
𝑣𝑎𝑟 𝑢𝑡 = 𝐸 𝑢𝑡2 =
1 − 𝜌2
Covariance among
the error terms of 𝒔 2
distant periods, 𝜎𝜀
𝑐𝑜𝑣 𝑢𝑡 , 𝑢𝑡+𝑠 = 𝐸 𝑢𝑡 , 𝑢𝑡−𝑠 = 𝜌𝑠
(measures the 1 − 𝜌2
strength of the linear
relationship between
two variables.
𝑐𝑜𝑟𝑟 𝑢𝑡 , 𝑢𝑡+𝑠 = 𝜌 𝑠 Correlation between
the error terms of 𝑠
distant periods,
(reciprocal
relationship).
9
OLS estimation with Autocorrelation: Consequences?
Note that:
If the units of the variable 𝑋 are centimeters and the units of the variable 𝑌 are grams,
then the units in the covariance are cm x gr.
If we change the scale of the variables, then the covariance changes. This makes it hard to
interpret the value of the covariance.
10
OLS estimation with Autocorrelation: Consequences?
Stationary process: the mean, the variance and the covariance of 𝑢𝑡 do not change with
the time.
11
OLS estimation with Autocorrelation: Consequences?
σ 𝑥𝑡 𝑦𝑡 𝜎2
𝛽መ2 = σ 𝑥𝑡2
and its variance is 𝑣𝑎𝑟 𝛽መ2 = σ 𝑥𝑡2
𝜎2 σ 𝑥𝑡 𝑥𝑡−1 σ 𝑥𝑡 𝑥𝑡−2 𝑥1 𝑥𝑛
𝑣𝑎𝑟 𝛽መ2 = 1 + 2𝜌 + 2𝜌 2
+ ⋯ + 2𝜌 𝑛−1
𝐴𝑅1 σ 𝑥𝑡2 σ 𝑥𝑡2 σ 𝑥𝑡2 σ 𝑥𝑡2
12
OLS estimation with Autocorrelation: Consequences?
If we use
σ 𝑥𝑡 𝑦𝑡
𝛽መ2 =
σ 𝑥𝑡2
With the variance:
𝜎2 σ 𝑥𝑡 𝑥𝑡−1 σ 𝑥𝑡 𝑥𝑡−2 𝑥1 𝑥𝑛
𝑣𝑎𝑟 𝛽መ2 = 2 1 + 2𝜌 2 + 2𝜌 2
2 + ⋯ + 2𝜌 𝑛−1
𝐴𝑅1 σ 𝑥𝑡 σ 𝑥𝑡 σ 𝑥𝑡 σ 𝑥𝑡2
𝛽መ2 is still linear and unbiased but not efficient (not minimum variance).
13
In the presence of Autocorrelation: Use GLS
𝜎2
𝑣𝑎𝑟 𝛽መ2 = +𝐷
𝐴𝑅1 σ𝑛𝑡=2 𝑥𝑡 − 𝜌𝑥𝑡−1 2
14
OLS with Autocorrelation: What happens?
Confidence intervals are wider: This can lead us to a wrong conclusion about the
significance of a coefficient. For example, we can conclude that a coefficient is not
statistically significant when is reality is statistically significant.
15
Detecting Autocorrelation: Durbin Watson Test
σ𝑡=𝑛
𝑡=2 𝑢ො 𝑡 − 𝑢ො 𝑡−1 2
𝑑=
σ𝑡=𝑛
𝑡=1 𝑢ො 𝑡2
If we square the numerator, we have then:
2
σ 𝑢ො 𝑡2 + σ 𝑢ො 𝑡−1 − 2 σ 𝑢ො 𝑡 𝑢ො 𝑡−1
𝑑=
σ 𝑢ො 𝑡2
2
Note that σ 𝑢ො 𝑡2 and σ 𝑢ො 𝑡−1 are only different by one observation, so they are almost equal.
σ𝑢
ෝ𝑡 𝑢
ෝ𝑡−1
𝑑 ≈2 1− σ𝑢 ෝ𝑡2
16
Detecting Autocorrelation: Durbin Watson Test
2
Given that σ 𝑢ො 𝑡2 and σ 𝑢ො 𝑡−1 are different by only one observation, then:
σ𝑢
ෝ𝑡 𝑢
ෝ𝑡−1
𝑑 ≈2 1− σ𝑢 ෝ𝑡2
σ𝑢
ෝ𝑡 𝑢
ෝ𝑡−1
Define 𝜌ො = σ𝑢 ෝ𝑡2
as the sample autocorrelation coefficient of first order.
Observe that:
𝑑 ≈2 1−0 =2
18
Detecting Autocorrelation: Durbin Watson Test
Observe that :
𝑑 ≈2 1−1 =0
Practical rule: The closer is 𝑑 to 0, the stronger the evidence of perfect positive serial
autocorrelation.
19
Detecting Autocorrelation: Durbin Watson Test
Observe that:
𝑑 ≈ 2 1 − (−1) = 4
Practical rule: The closer is 𝑑 to 4, the stronger the evidence of perfect negative serial
autocorrelation.
20
Durbin Watson Test: Steps
3. For a given simple size and a given number of control variables, determine 𝑑𝐿 and 𝑑𝑈
4. Follow the decision rule in the following table.
𝑌𝑡 = 𝛽1 + 𝛽2 𝑋𝑡 + 𝑢𝑡
We want to test:
𝐻0 : = 𝜌1 = 𝜌2 = ⋯ = 𝜌𝑝 = 0
(There is no autocorrelation)
22
Breusch-Godfrey (BF) Test: Steps
23
If there is Autocorrelation: How do we correct for it?
3. If the sample is big, obtain Newey-West Standard Errors. This corrects the OLS
Standard Errors.
24
Reference
25