Chapter 1
Chapter 1
Panel Data
Joan Llull
where:
ηi + vit is unobserved.
x0i1
yi1 vi1
y i ≡ ... , Xi = ... , η i = ηi ιT , and v i = ... ,
yN XN ηN vN
where ιT is a size T vector of ones.
Hence, we can use compact notation: y i = Xi β+(η i +v i ), and y = Xβ+(η+v).
Chapter 1. Panel Data 6
General assumptions for static models
For static models, we assume:
Strict exogeneity: E[xit vis ] = 0 ∀s, t. This assumption rules out eects of past vis
on current xit (e.g. xit cannot include lagged dependent variables).
Homoskedasticity and i.i.d. errors: ηi ∼ iid(0, ση2 ) and vit ∼ iid(0, σv2 ), which
does not aect any crucial result, but simplies some derivations.
β̂ OLS = (X 0 X)−1 X 0 y.
OLS
ln Prices (β1 ) -0.083 (0.015)
ln Income (β2 ) -0.032 (0.006)
Potential problems:
preferences,
education,
parental smoking behavior,...
Chapter 1. Panel Data 9
The xed eects model.
Within groups estimation.
1 1
x̃it = xit − (xi1 + ... + xiT ) and ṽit = vit − (vi1 + ... + viT ).
T T
This has motivated the development of dynamic panel data models, to relax this
assumption.
Limitations:
Not ecient:
When N → ∞ but T is xed, less ecient that e.g. β̂GLS if E[xit ηi ] = 0.
In our example:
OLS WG
OLS WG LSDV
(0.288)
(0.398)
(0.416)
(0.384)
(0.433)
Consistency requires E[∆xit ∆vit ] = 0 which is implied by but weaker than strict
exogeneity.
FDLS more ecient if vit random walk (∆vit = εit ∼ iid(0, σε2 )).
Chapter 1. Panel Data 17
FDLS in Cigarette Demand
To get FDLS we generate st dierences and estimate by OLS:
2
ση + σv2 ση2 ση2
...
σ2 ση2 + σv2 . . . ση2
0 η
E[ui ui ] = = Ωi ,
. . .. .
. . . .
. . .
ση2 ση2 2
. . . ση + σv2
−1
β̂ GLS = X 0 Ω−1 X X 0 Ω−1 y.
where:
∗
yit = yit − (1 − θ)ȳi ,
and:
σv2
θ2 = .
σv2 + T ση2
ˆ0 ṽ
ṽ ˆ
σ̂v2 =
N (T − 1) − K
Then, a consistent estimator of ση2 is given by the BG residuals:
ȳi = x̄0i β + η̄i + v̄i , i = 1, ..., N ⇒ β̂ BG
ˆi ≡ ȳi − x̄0i β̂ BG
ū
ˆ0 ū
ˆ
\
1 ū 1 2
σ̂ū2 = ση2 + σv2 = ⇒ σ̂η2 = σ̂ū2 − σ̂ .
T N −K T v
Chapter 1. Panel Data 24
Feasible GLS in Cigarette Demand
OLS WG FGLS
Output from software packages often includes the Hausman test. In our example:
Statistic P-value
Supposedly consistent estimators with α̂ >> αOLS or α̂ << α̂W G should be seen with suspicion.
where: −1
0
∆y
\ −1 = Z Z Z Z 0 ∆y −1 ,
where Z can be y −2 or ∆y −2 .
OLS WG Anderson-
Hsiao
ui = yi − f (xi , β) z i = g(xi ).
Sample analogue:
N
1 X
bN (β) = z i ui (β).
N
i=1
−1
Optimal GMM (ecient) uses
PN
1
E[z u u0 z0 ] , the inverse of the variance-
N i=1 i i i i
covariance matrix, as weighting matrix.
∂bN (β)
D ≡ plim ,
N →∞ ∂β 0
W ≡ plim WN ,
N →∞
N
1 X
S0 ≡ E[z i ui u0i z 0i ].
N
i=1
The most common one-step (and rst-step) matrix uses the structure of E[∆v i ∆v 0i ]:
−1
2 0 0 ... 0
−1 2 −1 0 ... 0
E[∆v i ∆v 0i ] = σv2 . .. .. .. .. .
.. . . . .
0 0 0 0 ... 2
Chapter 1. Panel Data 41
GMM in Cigarette Demand
GMM results in our example are:
Instruments are still valid, but have poor small sample properties.
Monte Carlo evidence shows that with α > 0.8, estimator behaves poorly unless huge
samples available.
x0i0 x0i1 00 00
yi0 ... 0 ... 0 ...
. .. .. .. .. .. .. .. ..
Zi = .. . . . . ... . . . . .
0 00 00 ... yi0 ... yiT −2 x0i0 ... x0iT −1
Results are:
OLS WG GMM
System GMM (Arellano and Bover, 1995) uses the assumption E[yi0 |ηi ] = 1−α
ηi
:
E[∆yit ηi ] = 0, ∀t
or, alternatively:
where:
Zi 0 ... 0 ∆v i ∆y −1i ∆y i
Zi∗ = , u∗i = , Xi∗ = and y ∗i = ,
00 ∆yi1 ... ∆yiT −1 ηi + viT yiT −1 yiT
Orthogonality conditions: are they small enough to not reject that they are
zero (overidentifying restrictions).
Serial correlation in the data: vital for the validity of the instruments
(Arellano-Bond test).
The test can only be implemented if the problem is overidentied (otherwise the sample
moments are exactly zero by construction).
where û are those predicted residuals from the rst step and û
ˆ are predicted from the second
stage, and:
a
S ∼ χ2 (L − K).