Professional Documents
Culture Documents
Some ideas:
The term autocorrelation may be defined as “correlation between members of series of
observations ordered in time [as in time series data] or space [as in cross-sectional data].”.
Problem in the structure of the error terms.
It is now a common practice to treat the terms autocorrelation and serial correlation
synonymously, but some authors prefer to distinguish the two terms. Although a distinction
between the two terms may be useful, in this course we treat them synonymously.
Yt = β1 + β2 Xt + ut (1)
Ŷt = β̂1 + β̂2 Xt (2)
ût = Yt − Ŷt (3)
E(ui uj ) = 0 for i 6= j (4)
2
V AR(ut ) = σ (5)
Yt = β1 + β2 Xt + ut (6)
ut = ρ ut−1 + νt (7)
X
xi yi
Reminder: β̂2 = X 2 w.r.t equation (6) and for equation (7)
xi
t=n
X
ût ût−1
t=2
ρ̂ = t=n
using usual OLS estimation (10)
X
û2t−1
t=2
t=n
X
ût ût−1
t=2
≈ t=n
(11)
X
û2t
t=1
1
STK 310 (Autocorrelation / Serial correlation (AC/SC))
Important difference????????
ut = ρ ut−1 + νt indicates the the residual terms are not independent, hence correlated. (See
equations 4 and 8)
2
STK 310 (Autocorrelation / Serial correlation (AC/SC))
Serial corrrelation
3
STK 310 (Autocorrelation / Serial correlation (AC/SC))
No autocorrelation
4
STK 310 (Autocorrelation / Serial correlation (AC/SC))
Positive autocorrelation
5
STK 310 (Autocorrelation / Serial correlation (AC/SC))
Negative autocorrelation
6
STK 310 (Autocorrelation / Serial correlation (AC/SC))
1. Inertia
2. Specification bias
3. Cobweb phenomenon
4. Lags
5. Data issues
6. Data transformations
2. Not BLUE
4. Likely overestimate R2 .
Detection of SC
1. Graphical methods
7
STK 310 (Autocorrelation / Serial correlation (AC/SC))
Do not reject the null hypothesis of randomness with 95% confidence if R, the number
of runs, lies in the preceding confidence interval; reject the null hypothesis if the
estimated R lies outside these limits.
(Note: You can choose any level of confidence you want.)
8
STK 310 (Autocorrelation / Serial correlation (AC/SC))
t=n
X
(ût − ût−1 )2
t=2
d = t=n
(15)
X
û2t
t=1
X X X
û2t + û2t−1 − 2 ût ût−1
= X
û2t
X X
2 û2t − 2 ût ût−1
≈ X
û2t
2( û2t − ût ût−1 )
P P
= X
û2t
X
ût ût−1
= 2 1 − X
û2t
X
ût ût−1
≈ 2 (1 − ρ̂) since ρ̂ ≈ X (16)
û2t
9
STK 310 (Autocorrelation / Serial correlation (AC/SC))
10
STK 310 (Autocorrelation / Serial correlation (AC/SC))
STK 310
Use and interpretation of the DW table
DW-d= 0 2 4
d_lower d_upper 4-d_upper 4-d_lower
Example 1: n= 10 Example 2: n= 20
k= 2 k= 2
^
Remember: d 2(1 )
^ ^
^
u u t t 1
^ 2
u t
11
STK 310 (Autocorrelation / Serial correlation (AC/SC))
12
STK 310 (Autocorrelation / Serial correlation (AC/SC))
Remedial measures
1. Check for model mis-specification
2. Generalised Least Squares (GLS)
Consider the two variable regression model with first order serial correlation:
Yt = β1 + β2 Xt + ut (17)
ut = ρut−1 + t (18)
with −1 < ρ < 1 and t error terms that are I.I.D N (0, σ∗2 )
If equation (17) holds true at time t it also holds true at time t − 1. Hence we have
Yt = β1 + β2 Xt + ut (19)
Yt−1 = β1 + β2 Xt−1 + ut−1 (20)
multiplying equation (20) by ρ yields
ρYt−1 = ρβ1 + β2 ρXt−1 + ρut−1 (21)
subtracting 21 from 19 yields
Yt − ρYt−1 = β1 (1 − ρ) + β2 (Xt − ρXt−1 ) + ut − ρut−1 (22)
which we can express as
Yt∗ = β1∗ + β2 Xt∗ + t (23)
t=n
X
ût ût−1
t=2
ρ̂ = t=n
(24)
X
û2t
t=1
which is based on the regression results on the observed data without adjusting for serial
correlation, i.e. OLS estimation of equation (17). That is ρ is estimated using a secondary
OLS regression on the estimated errors (OLS on equation (18)) as follows:
ρ can also be estimated based on the Durbin-Watson statistic, d, see equation (16):
d
ρ̂ = 1 − (26)
2
13
STK 310 (Autocorrelation / Serial correlation (AC/SC))
Analysis of Variance
Sum of Mean
Source DF Squares Square F Value Pr > F
Model 1 11070 11070 555.42 <.0001
Error 198 3946.33827 19.93100
Parameter Estimates
Parameter Standard
Variable DF Estimate Error t Value Pr > |t|
Intercept 1 42.34727 6.27424 6.75 <.0001
x 1 0.74172 0.03147 23.57 <.0001
14
STK 310 (Autocorrelation / Serial correlation (AC/SC))
Durbin-Watson D 0.080
Number of Observations 200
1st Order Autocorrelation 0.911
15
STK 310 (Autocorrelation / Serial correlation (AC/SC))
16
STK 310 (Autocorrelation / Serial correlation (AC/SC))
Residual
7
-1
-2
-3
-4
-5
-6
-7
10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 170 180 190 200
17
STK 310 (Autocorrelation / Serial correlation (AC/SC))
Residual
7
-1
-2
-3
-4
-5
-6
-7
-7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7
lres
18
STK 310 (Autocorrelation / Serial correlation (AC/SC))
Analysis of Variance
Sum of Mean
Source DF Squares Square F Value Pr > F
Model 1 3274.34668 3274.34668 2279.37 <.0001
Error 198 284.43008 1.43652
Uncorrected Total 199 3558.77676
Parameter Estimates
Parameter Standard
Variable Label DF Estimate Error t Value Pr > |t|
lres 1 0.91092 0.01908 47.74 <.0001
19
STK 310 (Autocorrelation / Serial correlation (AC/SC))
12
Analysis of Variance
Sum of Mean
Source DF Squares Square F Value Pr > F
Model 1 19581 19581 18598.0 <.0001
Error 197 207.40840 1.05283
Corrected Total 198 19788
Parameter Estimates
Parameter Standard
Variable DF Estimate Error t Value Pr > |t|
Intercept 1 4.42848 0.11586 38.22 <.0001
xs 1 0.69850 0.00512 136.37 <.0001
20
STK 310 (Autocorrelation / Serial correlation (AC/SC))
21
STK 310 (Autocorrelation / Serial correlation (AC/SC))
data b ;
set b ;
lres = lag(res) ;
run ;
data b ;
set b ;
ys = y - 0.911*lag(y) ;
xs = x - 0.911*lag(x) ;
run ;
22