Lecture 9
Lecture 9
Y i = a + b1 X i 1 + ε i X i 1 + u
• Assume for simplicity that ε and u are independent.
• Assume that ε and X are independent of each other.
• Then the error term has the following properties:
E (ε i X i + u i | X ) = E (ε i X i | X ) + E (u i | X ) = E (ε i | X ) X i = 0
80
60
exs
40
20
4 5 6
realex
Scatter Diagram HOMOSKEDASTICITY
200
100
exs
-100
4 5 6
realex
Scatter Diagram RANDOM COEFFICIENTS MODEL HETEROSKEDASTICITY
Implications of Heteroskedasticity
Yi = 1 +(10 + v) * X + u
. regr exs rr, robust
------------------------------------------------------------------------------
| Robust
exs | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
rr | 10.06355 .5849706 17.20 0.000 8.916737 11.21036
_cons | 1.262277 3.063608 0.41 0.680 -4.743805 7.268359
------------------------------------------------------------------------------
. replace exs = 1 + (10+0*invnorm(uniform()))*rr + 3*invnorm(uniform())
(4785 real changes made)
Yi = 1 +(10 + v) * X + u
. regr exs rr
------------------------------------------------------------------------------
exs | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
rr | 10.00641 .0605095 165.37 0.000 9.887787 10.12504
_cons | .8871864 .3266196 2.72 0.007 .2468618 1.527511
------------------------------------------------------------------------------
• To see how we can do this lets go back to the derivation of the
variance for the estimator of the slope coefficient in the simple
two variable regression model (lecture 3)
• We had that
E [( bˆ − b ) 2 | X ] =
1 N N
∑ ∑ ( X i − X )( X j − X ) E [( u i − u )( u j − u ) | X ] =
N
2 j =1
∑
i =1
( X i − X ) 2
i=1
1 N
∑ ( X i − X ) E [( u i − u ) | X ]
2 2
2 i =1
2
N
∑ ( X i − X )
i=1
• The problem arises because E [( u i − u ) 2
| X ] is no longer a
constant ( σ ).
2
E[(bˆ − b) 2 | X ] =
1 N 2
2 ∑ ( X i − X ) 2
σ i ]
2 i =1
N
∑ ( X i − X )
i =1
The Eicker-White formula
σ 2
• To estimate this variance we can replace the i for each
observation by the squared OLS residual for that observation
uˆi2 = Yi − aˆ − bˆX i
N 2 2
∑ ( X i − X ) uˆi ]
^
i =1
Var (b) =
ˆ
[NVar ( X )]2
Summary of steps for estimating the variance
of the slope coefficients in a way that is robust
to the presence of Heteroskedasticity
• Estimate regression model by OLS.
• Obtain residuals.
u t = ρ u t −1 + v t
• In this formulation the error this period depends on the error in
the last period and on an innovation vt.
• vt is assumed to satisfy all the classical assumptions Assumption
1 to Assumption 3.
• We consider the stationary autoregressive case only in which
the effect of a shock eventually dies out. This will happens if
−1 < ρ < 1
• To see this substitute out one period back to get
u t = ρ 2u t − 2 + ρ v t −1 + v t
• And so on to get
k −1
ut = ρ ut −k + vt + ρvt−1 + ρ vt−2 + ρ vt−3 + ... + ρ vt−( k−1)
k 2 3
Yt − ρ Yt −1 = ( a − ρa ) + bX t − ρ bX t −1 + (u t − ρ u t −1 )
Yt − ρ Yt −1 = ( a − ρa ) + b ( X t − ρ X t −1 ) + vt
• Now suppose we knew ρ
• Then we could construct the variables
Yt − ρ Yt −1 and ( X t − ρX t −1 )
Yt − ρYt −1 = a + b( X t − ρˆX t −1 ) + vt
ˆ *