29 Autocorrelation II
29 Autocorrelation II
Fundamentals of
Econometrics
1
12/17/2022
Week-13
Week-13
2
12/17/2022
Previous Lecture
▪ Revision and Link of Basic Concepts
✓ Covariance & Correlation and their measurements
✓ Autocovariance & Autocorrelation and their measurements
▪ Causes of Autocorrelation
Background
3
12/17/2022
Background
▪ In statistics univariate summaries refers to Mean, Median, Mode, S.D,
Mean Deviation, Variance etc.
▪ …Bivariate summaries are required when there are two paired observations
(e.g., vehicle prices and their mileage per gallon) & interest is beyond
“univariate summaries”
▪ Such as ….how these two variables are linked …i.e., if one variable
increase/ decrease….what happens to other variable?
▪ A statistic that indicates how the two variables “co-vary” is called
“Covariance” and is given as:
1
▪ 𝐶𝑂𝑉𝑋,𝑌 =
𝑛−1
σ𝑛𝑖=1(𝑋𝑖 − 𝑋)(𝑌
ത 𝑖 − 𝑌)ത
Background (cont.…)
▪ E.g., if prices of vehicles (in 000s US$) and their mileage per gallon
(miles per gallon) are used and we calculate the covariance equal to -20
thousands of dollar-miles per gallon
▪ …it indicates that the two variables are negatively linked
▪ …however, it is difficult to interpret -20 thousands of dollar-miles per
gallon (quantitative Interpretation difficulty)
▪ …furthermore, the change in scale do influence the value of the
covariance
▪ This problems of Covariance are solved by making the Covariance
unitless measure.
4
12/17/2022
Background (cont.…)
▪ As we saw from the formula of Covariance, that it was calculated as the
product of mean deviations of the two variable
▪ To make it unit less, Covariance is divide by the product of standard
deviations (SX, SY) of the same two variables…due to which the units of
numerators and denominator cancel out…we get dimensionless
number/ratio
▪ ….that is called correlation coefficient,
𝑛
represented by “r” and is given as:
𝐶𝑜𝑣𝑋,𝑌 ത 𝑖 − 𝑌)
σ𝑖=1(𝑋𝑖 − 𝑋)(𝑌 ത
𝑟𝑋,𝑌 = =
𝑆𝑋 𝑆𝑌 ത 2 σ(𝑌𝑖 − 𝑌)
σ(𝑋𝑖 − 𝑋) ത 2
10
5
12/17/2022
Measurement of Autocorrelation
▪ For a time series (Yt) Autocorrelation can be calculated as follows:
σ𝑛𝑡=𝑘+1(𝑌𝑡 − 𝑌)(𝑌
ത 𝑡−𝑘 − 𝑌) ത
𝜌𝑘 =
ത 2
σ(𝑌𝑡 − 𝑌)
▪ 𝜌𝑘 value like correlation coefficients ranges between +1and -1 for perfect positive
and perfect negative autocorrelation/Serial Correlation*.
▪ Positive autocorrelation(negative autocorrelation) is the case when errors/time
series in one time period are positively correlated(negatively correlated) with the
same errors/time series in the other time period.
▪ Time series data patterns (Randomness, seasonality, trends etc.) can be studied
using Autocorrelation Coefficients
▪ The patterns can be identified using autocorrelation coefficient at different time
lags
*Although there is slight difference between autocorrelation and serial correlation, for this course we will treat them same and
will use it for correlation between succussive values of error terms.
11
Lag-Values of a Variable
• You can
calculate Lag
values manually
as shown
• Software such as
EVIEWS you do
have an option to
generate lag
values directly
12
6
12/17/2022
Announcements
▪ Your Project is due at 17:00 hours on Wednesday, December 28, 2022
13
CHAPTER 6
Regression Diagnostic III: Autocorrelation
14
7
12/17/2022
15
16
8
12/17/2022
Causes of Autocorrelation
17
1. Inertia
2. Specification Bias (Excluded variable/incorrect functional form)
3. Cobweb Phenomenon
4. Lags
5. Manipulation of Data
6. Nonstationarity
18
9
12/17/2022
19
20
10
12/17/2022
▪ This is also one of the reason for 1. Low supply causes rise in price
Quantity (Q)
22
11
12/17/2022
23
24
12
12/17/2022
25
Consequences of
Autocorrelation
26
13
12/17/2022
Consequences
If autocorrelation exists, several consequences follow on:
✓ The OLS estimators are still unbiased and consistent.
✓ They are still normally distributed in large samples.
✓ They are no longer efficient, meaning that they are no longer BLUE.
✓ In most cases standard errors are underestimated.
✓ Thus, the hypothesis-testing procedure becomes suspect, since the estimated standard
errors may not be reliable, even asymptotically (i.e., in large samples).
✓ You may find to have a spurious regression if the dependent and independent variable
grow with time
27
Spurious Regression
▪ If Dependent and Independent variable moves together in time, you may end up
with spurious regression
▪ The major problem is that a strong autocorrelation may link two unrelated
variables strongly correlated
▪ As a result we can get a best fit of the model although practically there is no
link between the two variables
▪ Such regression are called spurious regression
▪ Next few slides includes some interesting spurious correlation...if you run
regression from it, it will give you best fit, yet they are not correlated at all
28
14
12/17/2022
29
30
15
12/17/2022
31
32
16
12/17/2022
33
Fundamentals of
Econometrics
34
17
12/17/2022
Week-13
35
CHAPTER 6
Regression Diagnostic III: Autocorrelation
36
18
12/17/2022
Week-13
37
38
19
12/17/2022
1. Inertia
2. Specification Bias
3. Cobweb Phenomenon
4. Lags
5. Manipulation of Data
6. Nonstationarity
39
Consequences
If autocorrelation exists, several consequences follow on:
✓ The OLS estimators are still unbiased and consistent.
✓ They are still normally distributed in large samples.
✓ They are no longer efficient, meaning that they are no longer BLUE.
✓ In most cases standard errors are underestimated.
✓ Thus, the hypothesis-testing procedure becomes suspect, since the estimated standard
errors may not be reliable, even asymptotically (i.e., in large samples).
✓ You may find to have a spurious regression if the dependent and independent variable
grow with time
40
20
12/17/2022
We Are Going To
RUN a Regression Model
before Proceeding Further
to have a
Case Study
41
21
12/17/2022
Detection of Autocorrelation
44
22
12/17/2022
45
Graphical method
➢ Run a regression model and…..
1. Plot the values of the residuals, ut, chronologically
2. Plot of residuals (ut ) in period t against the residuals with its lag
residuals (ut-1 ), it can also be helpful
▪ If either or both of (i) and (ii) graph shows some pattern, it is an indication
of the autocorrelation
46
23
12/17/2022
47
The procedure for both these graphs are shown on next slide.
48
24
12/17/2022
50
25
12/17/2022
▪ The residual plot over time shows a pattern that may suggest
correlation among error terms over a period of time
▪ However, the plot of residuals at time t (ut) against residuals at lag
time (ut-1), and also including a regression line clearly suggest that
the residuals are positively correlated over time
51
52
26
12/17/2022
▪ The parameter row (ρ) measure the autocorrelation between the adjacent
error terms
▪ The second equation shows that the error term in one period is directly
affected by the other period error, we called it serial/autocorrelation of order
1 or Autoregressive of order 1 represented as AR(1)
53
54
27
12/17/2022
55
Legend
𝐻0: No positive autocorrelation
Reject 𝐻0 Zone Zone Reject 𝐻0∗
Evidence of of 𝐻0∗ : No negative autocorrelation
Evidence
of positive indecis indecis of negative
auto- ion ion auto-
correlation Do not reject 𝐻0or
correlation
𝐻0∗ or both
d
0 dL du 2 4- du 4 –dL 4
➢ There are separate values of dL and dU as lower bound and upper bond used as threshold
to reject/accept Ho
➢ Durbin and Watson prepared tables that give the lower and upper limits of the d statistic
for a selected number of observations (up to 200) and a number of regressors (up to 10)
and for 5% and 1% levels of significance.
56
28
12/17/2022
57
58
29
12/17/2022
59
60
30
12/17/2022
61
62
31
12/17/2022
63
32
12/17/2022
65
66
33
12/17/2022
67
68
34
12/17/2022
69
70
35
12/17/2022
Thank You
71
36