Transcript Document

Autocorrelation
1) The Problem: What is it?
ei = f(ei-j)
i = 1,2, ... j=1,2, …
2) WHAT does it look like ?
Positive autocorrelation
Negative autocorrelation
Autocorrelation
2) WHAT does it look like ?
Autocorrelation
3) WHERE does it come from ?
a) Economic Shocks / lags - omitted variables
b) Specification errors
c) Transformations of data
- aggregation (smoothing) - monthly to quarterly data
- interpolation
Autocorrelation
GENERAL PROBLEM
ei  f (ei  j )
for i =1,2...n
AR(1) MARKOV PROCESS (First Order)
ei   ei1 +  i
where  i ~ NID(0,2 )
and |  | 1
2

Then:V (ei )   2 
1 
=
V ( i )
1 
ESTIMATION using OLS (AR(1) Process)
Good News
OLS ESTIMATOR is unbiased
Bad News
V (b2 )
VARIANCE (OLS)
AR1
E (b2 )   2
is biased


2
2  2



2
2
i ( X i  X )  i ( X i  X ) 
where   (  , X )
ei    ei 1 +  i
 i ~ NID(0, 2 )
ESTIMATION using OLS (AR(1) Process)
The Problem:
OLS
V (b2 )

2
 (X
i

V (b2 )OLS
is BIASED
i
 X )2
t  stats
V (b2 ) AR1 is INEFFICIENT Not BEST
 V (b2 ) AR1
Diagnostics: DURBIN-WATSON STATISTIC
DW 
2
ˆ
ˆ
(
e

e
)
 i i1
i 2
2
ˆ
(
e
)
 i
i 1
  eˆi  eˆi 1 


 2  1  i  2
2

ˆ
e

i


i 1
 2(1-  )
ei    ei 1 +  i
Durbin-Watson in STATA
gen t = _n
tsset t
regress y x1 x2 ….
dwstat
 - autocorrelationcoefficient
DURBIN-WATSON Test Ranges
B
D
C
A
0
dL
dU
A E C B/D
2
E
4 - dU
Positive First Order Autocorrelation
Negative Autocorrelation
NO Autocorrelation
=> Inconclusive
4 - dL
4
Autocorrelation: Therapy (GLS)
Transform the model: Given 1st order AC
ei    ei1 +  i
AR(1)
and i ~ NID(0,  2 )  is known
Initial Model and Transformed Model
Yi  1 + 2  Xi + e i
(Yi    Yi 1 )  1 (1- ) + 2  (X i -   Xi 1 ) + (ei -   ei 1 )
Yi*  1* + 2  X i* + e i
Results:
> Estimates are BLUE (in large samples)
> one observation is lost
> Interpretation of R2
Autocorrelation: Therapy
COCHRANE-ORCUTT ITERATIVE PROCEEDURE (JASA-1949)
AR(1) Process:
ei   ei 1 +  i
where  i ~ NID(0, 2 )

In STATA, the procedure is done using the “Prais procedure” as follows:
prais y x1 x2 x3
Income(Y) Consumption (X) Data (100 observations with autocorrelated errors)
. tsset t
time variable: t, 1 to 100
. regress y x
Source |
SS
df
MS
Number of obs =
100
---------+-----------------------------F( 1,
98) =29981.64
Model | 53320.0034
1 53320.0034
Prob > F
= 0.0000
Residual | 174.285351
98 1.77842195
R-squared
= 0.9967
---------+-----------------------------Adj R-squared = 0.9967
Total | 53494.2887
99 540.346351
Root MSE
= 1.3336
-----------------------------------------------------------------------------y |
Coef.
Std. Err.
t
P>|t|
[95% Conf. Interval]
---------+-------------------------------------------------------------------x |
.79994
.0046199
173.152
0.000
.790772
.809108
_cons |
.9927132
.2687279
3.694
0.000
.4594314
1.525995
-----------------------------------------------------------------------------. dwstat
Durbin-Watson d-statistic(
2,
100) =
.6586762
. prais y x , corc
Iteration 0: rho = 0.0000
Iteration 5:
rho = 0.6030
Cochrane-Orcutt AR(1) regression -- iterated estimates
Source |
SS
df
MS
Number of obs =
99
---------+-----------------------------F( 1,
97) = 9381.54
Model | 8354.45777
1 8354.45777
Prob > F
= 0.0000
Residual |
86.380492
97 .890520536
R-squared
= 0.9898
---------+-----------------------------Adj R-squared = 0.9897
Total | 8440.83827
98 86.1310027
Root MSE
= .94367
-----------------------------------------------------------------------------y |
Coef.
Std. Err.
t
P>|t|
[95% Conf. Interval]
---------+-------------------------------------------------------------------x |
.8096481
.0083591
96.858
0.000
.7930576
.8262386
_cons |
.3866333
.4997927
0.774
0.441
-.6053169
1.378584
-----------------------------------------------------------------------------rho |
.6029705
-----------------------------------------------------------------------------Durbin-Watson statistic (transformed) 2.119424
Residuals Before Therapy
4
3
2
1
0
1
3
5
7
9
11
13
15
17
19
21
23
25
27
29
-1
-2
-3
Residuals After Therapy
1.5
1
0.5
0
1
-0.5
-1
-1.5
-2
-2.5
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29