Autocorrelation-1

Download Report

Transcript Autocorrelation-1

Econometrics 1
Lecture 9
Autocorrelation
1
Autocorrelation: Causes and Consequences
 Causes:
inertia
specification bias
cobweb phenomena
manipulation of data
 Consequences
unbiased and linear estimators
but
they there not the best estimators
they are inefficient
2
Review of Assumptions of the OLS Model
Yt     xt  et
1 2
(9.1)
 
x
e
E
ei   0
 Mean of i is zero for every value of i ,
 
 variance of

ei
 
2


e
var


for every ith observation
is constant
 i
cov(e e )  0 for all i  j ; this also means there is no autocorrelation or
i j
heteroscedasticity; errors are homoscedatic and independent of each other


e
x
x
e
E
 0

 there is no correlation between i and the explanatory variable i ;

i i
 explanatory variable, x i , is exogenous, not random
 variance of the dependent variable is equal to the variance of the error
 


2


e
var

y
var


 i
term
 
 i
3
Nature of autocorrelation
Now suppose that assumption cov(e e )  0 for all i  j no
i j
longer satisfied. Instead cov(e e )  0 for all i  j . A
i j
simple specification for first order autocorrelated error term
would be
(9.2)
e  e  v
i
i
i1
where
v t is a random term normally distributed with a zero
mean and a constant variance, vi ~ N  0, 2  and


correlation coefficient between –1 and 1.

is a
4
Variance of the error term
var e   var e  v    2 var e   var v 
 i
 i
i 1 i 
 i1

 2cov e v 
 i1 i 
2

 e2   2 e2   v2 =>  e2  v
1  2
Specifically:

cov et e 
t 1 

var et  var e 
 t 1 
;
cov et e    e2
t 1 

(9.3)
5
Consequence of Autocorrelation
OLS estimate is still unbiased
 x  x  y  y 
 x  x  y


ˆ   i  i    i  i   wi yi   wi     xi  ei  (9.4
2
2
 1

2
2
 x  x 
 x  x 
 i
 i


  







E ˆ  E  wi yi  E  wi    xi  ei   E  wi     wi xi   wiei  
2
1 2
1 2
2


but the variance of OLS estimator is no longer efficient.
2
   
 
var ˆ 2  E E ˆ 2   2  E  wi ei

2
2








x

x
x

x




2
i
i
 
E ei   2
E ei e j  =
2 
2 




x

x
x

x
i
i
 

 

i
i
2








x

x
x

x
 xi  xi   2 

i
i
i
j  2 s


2
 


2 
2



 xi  xi  
 xi  xi  

 

i
i



 ˆ 2
 x
i
1
i
 x
2

xi xi 1

1   i
 2 2
2

i xi

x x
x
i
i 1
i
2
i
i
 ....  2  n 1
x x
x
i
i 1
i
2
i
i
(9.6)

 (9.6)


6
Variance and Covariance of Errors in Case of Autocorrelation Compared
to the Variance of a Normal Error Term
 vare1 
cove e 
2 1

E ee'  cove3 e1 

cove4 e1 
cove5 e1 
 11

 21
E ee'   31

 41
 51
cove1e2  cove1e3  cove1e4  cove1e5 
vare2  cove2 e3  cove2 e4  cove2 e5 
cove3 e2  vare3  cove3 e4  cove3 e5 

cove4 e2  cove4 e3  vare4  cove4 e5 
cove5 e2  cove5 e3  cove5 e4  vare5  
 11
 22
 32
 42
 52
Eee'   I
 11
 23
 33
 43
 53
 11
 24
 34
 44
 54
 11 
 25 
 35 

 45 
 55 
2
where I is 55 identity matrix.
7
Variance and Covariance of Errors in Case of Autocorrelation Compared
to the Variance of a Normal Error Term
 11

 21
E ee'   31

 41
 51
 11
 22
 32
 42
 52
 11
 23
 33
 43
 53
 11
 24
 34
 44
 54
 11 
 25 
 35 

 45 
 55 
 2

 21
E ee'   31

 41

 51
 12
2
 32
 42
 52
 13
 23
2
 43
 53
 14
 24
 34
2
 54
 15 

 25 
 35 

 45 
 2 
Eee'   i, j I
where I is 55 identity matrix.
8
Detection: graphical method
|_ols gfcapf time
TBILLS/ resid=res
REQUIRED MEMORY IS PAR=
26 CURRENT PAR=
500
OLS ESTIMATION
119 OBSERVATIONS
DEPENDENT VARIABLE= GFCAPF
...NOTE..SAMPLE RANGE SET TO:
1,
119
R-SQUARE =
0.8155
R-SQUARE ADJUSTED =
0.8124
VARIANCE OF THE ESTIMATE-SIGMA**2 = 0.57157E+07
STANDARD ERROR OF THE ESTIMATE-SIGMA =
2390.7
SUM OF SQUARED ERRORS-SSE= 0.66302E+09
MEAN OF DEPENDENT VARIABLE =
24255.
LOG OF THE LIKELIHOOD FUNCTION = -1093.08
VARIABLE
ESTIMATED STANDARD
T-RATIO
PARTIAL STANDARDIZED ELASTICITY
NAME
COEFFICIENT
ERROR
116 DF
P-VALUE CORR. COEFFICIENT AT MEANS
TIME
139.79
6.471
21.60
0.000 0.895
0.8737
0.3458
TBILLS
-199.25
64.47
-3.091
0.003-0.276
-0.1250
-0.0760
CONSTANT
17711.
795.1
22.27
0.000 0.900
0.0000
0.7302
RE S
DURBIN-WATSON = 0.1178
VON NEUMANN RATIO = 0.1188
RHO = 0.95844
RESIDUAL SUM = 0.11460E-09 RESIDUAL VARIANCE = 0.57157E+07
SUM OF ABSOLUTE ERRORS= 0.23794E+06
R-SQUARE BETWEEN OBSERVED AND PREDICTED = 0.8155
RUNS TEST:
9 RUNS,
58 POS,
0 ZERO,
61 NEG NORMAL STATISTIC = -9.4814
COEFFICIENT OF SKEWNESS =
0.2981 WITH STANDARD DEVIATION OF 0.2218
6000
5000
4000
3000
2000
1000
0
-1000
-2000
-3000
-4000
-5000
RES
0
20
40
60
TIME
80
100
120
9
Run test: steps
1. define run as the sequence of errors with the same sign
2. list the runs (+) or minus (-) for all observation
3. total number of observations: n=n1+n2; where n1 is
number of (+) symbols and n2 is number of (-) symbols
4. Let k be the number of runs
5. If errors are random then
 2n1n2 2n1n2  n1  n2  
2n1n2
2
 (9.7)
E k  
 1  k  
2

n1  n2




n

n
n

n

1
 1 2 1 1 2

E K   1.96 k 
6. A 95% decision rule
. Reject the null
hypothesis if the estimated k lies outside these limits.
RUNS TEST:
9 RUNS,
58 POS,
0
ZERO,
61 NEG NORMAL STATISTIC = 9.4814
10
CRES
Detection of Autocorrelation: Graphical Method
25000
CRES
20000
15000
10000
5000
0
-5000
-10000
-15000
-20000
-25000
1965
1970
1975
1980 1985
YEAR
1990
1995
2000
11
Durbin-Watson test
2
2  2 eˆ eˆ
2
T
ˆ
ˆ
e

e




  eˆt  eˆt 1 
t
t t 1
t 1
i
i
i
i
dˆ 

 21  ˆ 
2
2
 eˆt
 eˆt
i
i
(9.8)
2
2
 eˆt 2 eˆt eˆt 1  eˆt 1
dˆ  i
 i
 i
 2  2    21  ˆ 
2
2
2
 eˆt
 eˆt
 eˆt
Inconclusive regions
i
i
i
d  0;   1
d  2;   d0  4;   1
12
Partial Autocorrelation Function and Order of
Autocorrelation
DURBIN-WATSON = 0.1178
VON NEUMANN
RATIO = 0.1188
RHO = 0.95844
RESIDUAL CORRELOGRAM
LM-TEST FOR HJ:RHO (J)=0,STATISTIC IS CHI-SQUARE(1)
LAG
RHO
STD ERR
T-STAT
LM-STAT
1
0.0168
0.0917
0.1832
1.9984
2
0.0274
0.0917
0.2988
3.6538
3
-0.0074
0.0917
-0.0802
0.2566
4
0.0196
0.0917
0.2134
0.6925
5
0.0569
0.0917
0.6211
3.9465
6
0.0250
0.0917
0.2729
0.6573
7
0.0148
0.0917
0.1619
0.2291
8
-0.1121
0.0917
-1.2233
1.7847
9
-0.0698
0.0917
-0.7618
0.7222
10
0.0693
0.0917
0.7561
0.7235
11
-0.0805
0.0917
-0.8783
0.9750
12
-0.0011
0.0917
-0.0124
0.0002
13
-0.0614
0.0917
-0.6697
0.5617
14
-0.0343
0.0917
-0.3741
0.1744
15
-0.1053
0.0917
-1.1488
1.6821
CHISQUARE WITH 15 D.F. IS
5.989
ASYMPTOTIC
RHO
RHO
RHO
RHO
RHO
RHO
RHO
RHO
ESTIMATE VARIANCE ST.ERROR T-RATIO
1
0.94591
0.00837
0.09151 10.33643
2
0.16656
0.01610
0.12689
1.31262
3
0.03002
0.01644
0.12821
0.23412
4 -0.00294
0.01561
0.12494 -0.02350
5 -0.23897
0.01559
0.12486 -1.91386
6
0.15968
0.01596
0.12634
1.26394
7
0.02689
0.01615
0.12709
0.21155
8 -0.13514
0.00895
0.09461 -1.42847
Shazam programme that generates these output
ols gfcapf time TBILLS/ resid=res
diagnos
plot res time/gnu lineonly
genr chgfcap= gfcapf-lag(gfcapf,1)
auto gfcapf time TBILLS/resid=res2 order=8
plot res2 time
ols chgfcap time tbills/ resid=res1
plot res1 chgfcap/gnu
stop
auto gfcapf time TBILLS/resid=res2 order=8
13
Autocorrelation Corrected Errors
This programme asks for correcting the autocorrelation problem by using 8-order autocorrelation in erro
2000
RES2
1500
1000
RE S 2
500
0
-500
-1000
-1500
-2000
-2500
0
20
40
60
TIME
80
100
120
Obviously errors have become normal after transforming the model.
14
Bruce-Godfrey higher order
autocorrelation test
ut  1ut 1   2ut  2   3ut  3   4ut  4   5ut  5   6ut  6  ...   7 ut  p  et
u
1. regress the original model and get estimates of
2. form the regression of error in terms of its lagged values
and estimate ˆ .
3. BG test has a distribution n  p .R ~  with p degrees of
freedom
4. Compare calculated n  p .R ~  with critical 
ˆ
distribution from the table and accept =0 if the
calculated value  is less than table value.
i
i
2
2
2
p
2
p
2
p
i
2
p
15
Berenblutt-Webb test
 eˆ
Define g  uˆ

2
t
i
2
t
whereeˆ is the square errors generated
2
t
i
from the regression of first differencesY onX .uˆ is the
square errors generated from the original regression of
Y on X .Null hyopothesis is d  0;   1 .
2
t
16