Econ-654 - Unit 3-PDM
Econ-654 - Unit 3-PDM
2
In the random e¤ects model, the α i ’s are rede…ned to have a zero mean.
3
The model is sometimes referred to as a (one-way) error components model.
F. Guta (CoBE) Econ 654 Dec, 2023 12 / 211
3.1.2 Reasons for using Panel Data
3). Attrition:
For one reason or another, subjects of the panel drop out
over time and so there are fewer subjects left for
subsequent surveys.
yr
1981 .0584744 .0303516 1.93 0.054 -.0010301 .1179789
1982 .0630235 .0332109 1.90 0.058 -.0020869 .1281339
1983 .0623225 .0366562 1.70 0.089 -.0095424 .1341873
1984 .0907743 .0400868 2.26 0.024 .0121836 .1693649
1985 .1095214 .043349 2.53 0.012 .0245353 .1945075
1986 .1421435 .0464202 3.06 0.002 .0511363 .2331507
1987 .1738353 .0494307 3.52 0.000 .0769258 .2707447
( 1) 1981.yr = 0
( 2) 1982.yr = 0
( 3) 1983.yr = 0
( 4) 1984.yr = 0
( 5) 1985.yr = 0
( 6) 1986.yr = 0
( 7) 1987.yr = 0
F( 7, 4346) = 2.06
Prob > F = 0.0447
Robust
wage Coef. Std. Err. t P>|t| [95% Conf. Interval]
y i = α i + x0i β + ε i , (3.2.3)
F. Guta (CoBE) Econ 654 Dec, 2023 31 / 211
where y i = T1 ∑ yit and similarly for the other variables.
E f(xit xi ) ε it g = 0 (3.2.6)
bi = yi :
α x0i βb FE , i = 1; : : : ; n.
is given by
! 1
n T
b
var β 2
FE = σ ε ∑ ∑ (xit xi ) (xit 0
xi ) (3.2.8)
i =1 t=1
F. Guta (CoBE) Econ 654 Dec, 2023 36 / 211
Unless T is large, using the standard OLS estimate
for the covariance matrix based upon the within
regression in (3.2.4) will underestimate the true
variance.
The reason is that in the transformed regression the
error covariance matrix is singular (as ∑t (ε it εi )
T 1 2
= 0 for each i) & the variance of ε it ε i is T σε
rather than σ 2ε .
A consistent estimator for σ 2ε is given by the within
n T n o2
1
n(T 1) i∑ ∑ yit
= yi (xit xi )0 βb FE (3.2.9)
=1 t=1
yit = α i + x0it β + ε it ,
var (α i ι T + ε i ) = = σ 2α ι T ι 0T + σ 2ε IT (3.2.11)
1 1 1
= σε 2 IT ι T ι 0T +ψ ι T ι 0T
T T
where
σ 2ε
ψ= 2 .
σ ε + T σ 2α
Noting that IT (1=T ) ι T ι 0T transforms the data
in deviations from individual means and (1=T ) ι T ι 0T
1
4
[A bb 0 ] =A 1
1= 1 b0 A 1 b A 1 bb0 A 1
F. Guta (CoBE) Econ 654 Dec, 2023 50 / 211
takes individual means, the GLS estimator for β can
be written as
! 1
n T n
∑ ∑ (xit ∑
0
βb GLS = xi : ) (xit xi : )0 + ψ T xi : x xi : x
i =1 t=1 i =1
!
n T n
∑ ∑ (xit xi : ) (yit y i :) + ψ T ∑ xi : x y i: y , (3.2.12)
i =1 t=1 i =1
1
where x = nT ∑i;t xit denotes overall average of xit .
It is easy to see that for ψ = 0 the …xed e¤ects
estimator arises.
Because ψ ! 0 if T ! ∞, implying the …xed and
random e¤ects estimators are equivalent for large T .
F. Guta (CoBE) Econ 654 Dec, 2023 51 / 211
If ψ = 1, the GLS estimator is just the OLS
estimator (and is diagonal).
From the general formula for the GLS estimator it
can be derived that
βb GLS = βb B + (IK ) βb FE ,
where
! 1
n n
∑ ∑
0
βb B = xi : x xi : x xi : x yi: y
i =1 i =1
h i 1
W B B
= Sxx + ψ Sxx ψ Sxx
F. Guta (CoBE) Econ 654 Dec, 2023 52 / 211
W = n
Sxx ∑i =1 ∑T
t=1 (xit xi : ) (xit xi : )0
B = n T x 0
Sxx ∑i =1 i: x xi : x
y i = α + x0i β + α i + ε i , i = 1; 2; : : : ; n (3.2.13)
E fxi α i g = 0. (3.2.14)
F. Guta (CoBE) Econ 654 Dec, 2023 55 / 211
Note that these conditions are also required for the
between estimator to be consistent.
yit θ y i : = α (1 θ ) + (xit θ xi : )0 β + α i (1 θ ) + (ε it θ ε i :)
where θ = 1 ψ 1=2 .
F. Guta (CoBE) Econ 654 Dec, 2023 56 / 211
The error term in this transformed regression is i.i.d.
over individuals and time.
The variance components σ 2α and σ 2ε are unknown.
Thus we can use feasible GLS estimator (EGLS),
where the unknown variances are consistently
estimated in a …rst step.
The estimator for σ 2ε is easily obtained from the
within residuals, as given in (3.2.9).
For the between regression the error variance is
F. Guta (CoBE) Econ 654 Dec, 2023 57 / 211
σ 2α + T1 σ 2ε , which we can estimate consistently by
1 n 2
b 2B
σ = ∑ yi bB
α x0i βb B (3.2.16)
n i=1
b B is the between estimator for α.
where α
It is possible to adjust this estimator by applying a
d.f. correction, implying that K + 1 is subtracted in
the denominator.
From this, a consistent estimator for σ 2α follows as
1 2
b 2α = σ
σ b 2B b
σ (3.2.17)
T ε
F. Guta (CoBE) Econ 654 Dec, 2023 58 / 211
The resulting EGLS estimator is referred to as the
REs estimator for β (& α), denoted below as βb . RE
Estimated results:
Var sd = sqrt(Var)
Test: Var(u) = 0
chibar2(01) = 3217.14
Prob > chibar2 = 0.0000
y i = α + x0i β + ε i (3.2.19b)
Stxx = Sw b t w b
xx + Sxx and Sxy = Sxy + Sxy .
βb w = [Sw
xx ]
1 w
Sxy . (3.2.22)
wb b b
Sw b
xy = Sxx β w and Sxy = Sxx β b .
βb t = Fw βb w + Fb βb b (3.2.24)
where
h i 1
w w b
F = Sxx + Sxx SW
xx = I Fb
n o n o n o
var βb FE βb RE = var βb FE var βb RE 5 . (3.2.27)
h i h i
5
Hausman’s essential result is that Cov βb FE βb RE ; βb RE = Cov βb FE ; βb RE b
Var β RE = 0.
F. Guta (CoBE) Econ 654 Dec, 2023 78 / 211
Thus, we can compute the Hausman test statistic as
0h n o n oi 1
ξ H = βb FE βb RE c βb FE
var c βb RE
var βb FE βb RE (3.2.28)
Goodness-of-…t
FE
where ybitFE ybi = (xit xi )0 βb FE .
F. Guta (CoBE) Econ 654 Dec, 2023 83 / 211
The between estimator, being an OLS estimator in
the model in terms of individual means, maximizes
the ‘between R 2 ’, which we de…ne as
n b
o2
2 b b
Rbetween β b = Corr y i , y i , (2.3.31)
b
where ybi = x0i βb b .
The OLS estimator maximizes the overall goodness-
of- …t and thus the overall R 2 , which is de…ned as
2
Roverall βb t = fCorr (b
yit , yit )g2 ; (3.2.32)
ε it = ρε i;t 1 + υ it (3.2.34)
Two types:
yi = xi β + ε i
F. Guta (CoBE) Econ 654 Dec, 2023 100 / 211
Instruments: q2;it should have at least as many
elements as x2;it . x1;it acts as its own instrument.
Let q0it = x01;it q02;it be vector of IVs. Stacking
this vector vertical for t = 1; : : : ; T gives:
2 3 2 3
q 0 x0 0
q2;i1
6 i1 7 6 1;i1 7
6 0 7 6 0 0 7
6 qi2 7 6 x1;i2 q2;i2 7
qi = 6 7 6
6 .. 7 = 6 ..
7
.. 7
6 . 7 6 . . 7
4 5 4 5
0
qiT x01;iT 0
q2;iT
E q0i ε i = 0 (L equations)
The solution is
" ! !# 1" ! !#
n n n n
βb WIV = ∑ xi qi0
Wqq1 ∑ qi xi
0
∑ xi qi0
Wqq1 ∑ qi yi0
i =1 i =1 i =1 i =1
1
= x0 qWqq1 q0 x x0 qWqq1 q0 y
1
= Wxq Wqq1 Wqx Wxq Wqq1 Wqy
p b d 1
n β WIV β ! N (0; V) where V = Wxq Wqq1 Wqx
0
Estimate Wqq by n1 ∑ni=1 q0i b
εib
ε i q. This is the
estimated variance of p1 q0 ε.
n
NOTE:
0 0
yit y i = x1;it x1;i β 1 + x2;it x2;i β 2 + ε it ε i (3.3.3)
b 2ε + T σ
σ b 2α (assumes RE speci…cation correct!)
Step 4: Use the step 3 estimates to transform the variables
estimator would be
F. Guta (CoBE) Econ 654 Dec, 2023 117 / 211
0 1
b h i
B β C 1
B C = (W 0 V) (V0 V)
1
(V0 W ) (W 0 V) (V0 V) 1
(V0 y ) (3:3:4)
@ A
b
γ
IV
Tests for over-identi…cation
h i 1
b = βb W
q βb HT ; then q c βb w
b0 var c βb HT
var b
q asy : χ 2 (K )
where K = minfK1 L2 ; nT K1 K2 g
where ui = α i E [α i j Xi ].
Estimating by GLS gives you the same WG
estimators for β , i.e., OLS estimation of the GLS
equation with xi
0
yit = γyi;t 1 + xit β + α i + ε it
∑ni=1 ∑T
t=1 (yit y i ) yi;t 1 y i; 1
b
γ FE = 2
(3.4.3)
∑ni=1 ∑T
t=1 yi;t 1 y i; 1
1 1
where y i = T ∑T
t=1 yit and y i; 1 = T ∑T
t=1 yi;t 1.
plim (b
γ FE γ) = 0:250 when T = 2
plim (b
γ FE γ) ' 0:277 when T = 3
plim (b
γ FE γ) ' 0:266 when T = 4
estimator is that
n T
1
plim ∑ ∑ ε it
n (T 1) i=1 t=2
ε i ;t 1 yi ;t 2 = 0 (3.4.8)
= γ yi ;t 1 + x0it β + α i (3.4.12)
In Model 1:
In Model 2:
1). E (yi;t 1 ε it ) = 0
E f(ε i2 ε i1 )yi0 g = 0
E f(ε i3 ε i2 )yi0 g = 0
E f(ε i4 ε i3 )yi0 g = 0
E f(ε i4 ε i3 )yi1 g = 0
E f(ε i4 ε i3 )yi2 g = 0.
F. Guta (CoBE) Econ 654 Dec, 2023 144 / 211
All these moment conditions can be exploited in a
GMM framework.
To introduce the GMM estimator de…ne for general
sample size T ,
0 1
ε i2 ε i1
B C
B .. C
εi = B . C (3.4.15)
@ A
ε i;T ε i;T 1
where
F. Guta (CoBE) Econ 654 Dec, 2023 147 / 211
0 1 0 1
B yi 2 yi 1 C B yi 1 yi 0 C
B C B C
B C B C
B .. C B .. C
yi = B . C and yi ; 1 = B . C
B C B C
B C B C
@ A @ A
yi ;T yi ;T 1 yi ;T 1 yi ;T 2
1 1
plimWn = var Z0i ε i = E Z0i ε i ε 0i Zi (3.4.21)
n !∞
where b
ε i is a residual vector from a …rst-step
consistent estimator, for example using Wn = I.
The general GMM approach does not impose that
ε it is i.i.d. over individuals & time, and the optimal
weighting matrix is thus estimated without imposing
these restrictions.
F. Guta (CoBE) Econ 654 Dec, 2023 152 / 211
Note, however, that the absence of autocorrelation
was needed to guarantee the validity of the moment
conditions.
Instead of estimating the optimal weighting matrix
unrestrictedly, it is also possible (and potentially
advisable in small samples) to impose the absence
of autocorrelation in ε it , combined with a
homoscedasticity assumption.
Noting that under these restrictions
7
We give up potential e¢ ciency gains if some xit variables help ‘explaining’
the lagged endogenous variables.
F. Guta (CoBE) Econ 654 Dec, 2023 159 / 211
If the xit variables are not strictly exogenous but
predetermined, in which case current and lagged
xit s are uncorrelated with current error terms, we
only have that E fxit ε is g = 0 for s t.
This gives, E (α i ε i0 ) = 0
αi
yi1 = γyi0 + α i + ε i1 = γ + γε i0 + α i + ε i1
1 γ
αi
= + γε i0 + ε i1
1 γ
Thus, yi1 = (γ 1) ε i0 + ε i1 giving E ( yi1 α i ) = 0.
F. Guta (CoBE) Econ 654 Dec, 2023 164 / 211
Which in turn will give (with previous assumptions)
E [(yi ;t 1 yi ;t 2 )(α i + ε it )] = E ( yi ;t 1 (α i + ε it )) = 0 t = 2; 3; : : : ; T
Other points
+ ∑ (1 yit ) ln 1 F α i + x0it β
i ;t
Using that
1
P f yi 1 = 0j α i ; β g =
1 + exp α i + x0i 1 β
exp α i + x0i 2 β
P f yi 2 = 1j α i ; β g =
1 + exp α i + x0i 2 β
F. Guta (CoBE) Econ 654 Dec, 2023 183 / 211
It follows that the conditional probability is given by
exp (xi 2 xi 1 )0 β
P f (0; 1)j ti = 1=2; α i ; β g = (3.5.4)
1 + exp (xi 2 xi 1 )0 β
1
P f (1; 0)j ti = 1=2; α i ; β g = (3.5.5)
1 + exp (xi 2 xi 1 )0 β
while
f ( yi 1 ; : : : ; yiT j xi 1 ; : : : ; xiT ; β )
Z ∞
= f ( yi 1 ; : : : ; yiT j xi 1 ; : : : ; xiT ; α i ; β ) f (α i ) d α i
∞
F. Guta (CoBE) Econ 654 Dec, 2023 202 / 211
Z ∞
= [∏nt=2 f ( yit j yi ;t 1 ; xit ; α i ; β )] f ( yi 1 j xi 1 ; α i ; β ) f (α i ) d α i (3:5:14)
∞
where
!
x0it β + γ yi ;t 1 + α i
f ( yit j yi ;t 1 ; xit ; α i ; β ) = p if yit = 1
1 σ 2α
!
x0it β + γ yi ;t 1 + α i
= 1 p if yit = 0
1 σ 2α