Ec571-Panel Data
Ec571-Panel Data
Ec571-Panel Data
Introduction
Model Representation
N-first or T-first representation
Pooled Model
Fixed Effects Model
Random Effects Model
Asymptotic Theory
N→∞, or T→∞
N→∞, T→∞
Panel-Robust Inference
Panel Data Analysis
Introduction
The Model
yit xit' it
it ui vt eit
'
y x
it ui vt eit
it
Unobserved Heterogeneity
Cross Section and Time Series Correlation
Cov(ui , u j ) 0, Cov(eit , e jt ) 0, i j
Cov(eit , ei ) 0, t
Panel Data Analysis
Introduction
Dummy Variables y Xβ Du e
Representation D I N iT or D iT I N
Panel Data Analysis
Introduction
Notations
yi1 xi' 1 x1,i1 x2,i1 xK ,i1 ei1 1
y ' x x2,i 2 xK ,i 2 e
x
y i i 2 , Xi i 2 , ei i 2 , β 2
1,i 2
'
iT
y xiT x1,iT x2,iT xK ,iT iT
e K
'
ytN xtN x1,tN x2,tN xK ,tN tN
e u N
Example: Investment Demand
Grunfeld and Griliches [1960]
Iit i Fit Cit it
Extensions: Var (e | u, X)
Panel Robust Variance-Covariance Matrix
Random Effects Model
Error Components
yit xit' β it
it ui eit (i 1, 2,..., N ; t 1, 2,..., T )
ui is random, independent of eit and xit.
Cov(ui , eit ) 0, Cov(ui , xit ) 0, Cov(eit , xit ) 0
Define the error components as it = ui + eit
y i Xi (uiiT ei ), i 1, 2,..., N
y t Xt (u et ), t 1, 2,..., T
Random Effects Model
Extensions:
Panel Robust Variance-Covariance Matrix
Fixed Effects Model
Estimation
Model Assumptions
E (eit | xit ) 0
Var (eit | xit ) (1 1/ T ) e2
Cov(eit , eis | xit , xis ) (1/ T ) e2 0, t s
1 '
Var (ei | Xi ) Q (IT iT iT )
2
e
2
e
T
Var (e | X) Ω I N
Fixed Effects Model
Estimation: OLS
i 1 i i i 1 i y i
ˆβ ( X' X) 1 X' y N X' X X
N'
OLS
1
ˆ i 1 X Xi
2 N '
e
i
ˆ e2 eˆ ' eˆ / ( NT N K ), eˆ y Xβˆ
Fixed Effects Model
Estimation: ML
Normality Assumption
yit xit' β ui eit (t 1, 2,..., T )
y i Xi β ui iTi ei (i 1, 2,..., N )
ei ~ normal iid (0, e2 IT )
y i Xi β ei with y i Qy i , Xi QXi , ei Qei ,
1 '
Q IT iT iT
T
ei ~ normal (0, ), where e2QQ ' e2Q
Fixed Effects Model
Estimation: ML
Log-Likelihood Function
T 1 1 ' 1
lli (β, | y i , Xi ) ln 2 ln ei ei
2
e
2 2 2
T T 1 1 ' 1
ln 2 ln( e ) ln Q 2 ei Q ei
2
2 2 2 2 e
Since Q is singular and |Q|=0, we maximize
T T 1 '
lli (β, | y i , Xi ) ln 2 ln( e ) 2 ei ei
2 2
2 e
e
2 2
Fixed Effects Model
Estimation: ML
ML Estimator
(β, e ) ML arg max i 1 lli (β, e2 | y i , Xi )
ˆ 2 N
i1 i i
ˆ ' eˆ
N
e 1 2 ˆ
ˆ
2
e 1 ˆ e , ei y i Xi βˆ
NT T
T ˆ
e ' ˆ
e
ˆ e2
e
ˆ 2
T 1 N (T 1)
Fixed Effects Model
Hypothesis Testing
The Model
y i Xi β ε i , ε i ui iT ei
E (ε i | Xi ) 0
Var (ε i | Xi ) e2 IT u2 iT iT'
2
T 2
e Q
2 e u
IT Q
e2
1 ' 1 '
where Q IT iT iT , IT Q iT iT
T T
Random Effects Model
Estimation: GLS
GLS
1
βˆ GLS ( XΩ X) XΩ y i 1 Xi Xi
1 1 1 1
i 1 i y i
1
N N
X
1
Var (βˆ GLS ) ( XΩ X) i 1 Xi Xi
1 1 1
N
1 2
' 1 e2
2 T
1
where 2 IT 2 u
i i 2
2 T T Q 2 I Q
e e T u e e T u
1
1 e2
2 T
and 2
Q I Q
e e T u
2
Random Effects Model
Estimation: GLS
Feasible GLS
Based on estimated residuals of fixed effects
model ˆ 2 eˆ ' eˆ / N (T 1)
e
1 T ˆ
ˆ T ˆ ˆ T e ' e / N , where ei t 1 eit
2
1
2
u
2
e
ˆ ˆ ˆ
T
βˆ GLS ( XΩ
ˆ 1X)1 XΩˆ 1y
Var (βˆ ) ( XΩ
GLS
ˆ 1X) 1
1 1 2
where 2 Q 2 IT Q , ˆ1 ˆ e2 Tˆ u2
ˆ 1
ˆ e ˆ1
Random Effects Model
Estimation: GLS
Feasible GLS
Within Model Representation
e2 e2
1 1
1 2
T u2 e2
yit yi (xit' xi' ) ( it i )
yit xit' it
it it i (1 )ui (eit ei )
E ( it ) 0, Var ( it ) e2
Cov( it , i ) Cov( it , jt ) 0
Random Effects Model
Estimation: ML
Log-Likelihood Function
where
e2 T u2
I i i Q
2 2 '
(I T Q )
e T u T T
e2
1 1 2
1 2
2 IT u
i i 2 Q
'
2 T T
e
(I T Q )
e T u e
2
e T u e
2 2
2
T 2
| | ( e ) IT 2 iT iT ( e ) 1 2
2 T u ' 2 T u
e e
Random Effects Model
Estimation: ML
ML Estimator
(βˆ , ˆ e2 , ˆ u2 ) ML arg max i 1 lli (β, e2 , u2 | y i , Xi )
N
where
T 1 1
lli (β, , | y i , Xi ) ln 2 ln εi 1εi
2
e
2
u
2 2 2
2
2
T
ln 2 e ln
2
1
2 e2
e T u
2
1 T 2 2
2 t 1 ( yit xit β) 2
2 ( yit xit β)
' u T '
2 e e T u t 1
2
Random Effects Model
Hypothesis Testing
2
2
NT i 1 t 1 it
N T
ˆ
e
1
2 T 1 eˆit N T 2
i 1 t 1
βˆ
where eˆit yit xit 1
'
uˆ Pooled
Random Effects Model
Hypothesis Testing
' 1
H βˆ RE βˆ FE Var (βˆ RE ) Var (βˆ FE ) βˆ RE βˆ FE
βi β u i
it