Panel Data Lecture Rome
Panel Data Lecture Rome
Panel Data Lecture Rome
Lecture II
Microeconometrics Lectures
Richard Blundell
UCL and IFS
March 2005
Dynamic Panel Data Methods
Background
= xit ′ β + η i + vit
2
An Example: Company Investment Rates
I it I it −1
=β + ηi + λt + vit
K it K it −1
Unbalanced panel
Company level data
T = 4-10, N = 700.
3
Example
OLS Within DIF
Levels Groups 2SLS
Instruments ( I / K )it −2
4
Three common specifications to deal with η i :
1. Random effects
2. Fixed effects
3. First Differences
In the model
yit = xit ′ β + uit
uit = η i + vit
we assume that
a f a
E vit = 0; E vit | xit = 0 f
5
The Random Effects specification further assumes that
a f a
E η i = 0; E η i | xit = 0f
i.e. it assumes that the individual effect η i is uncorrelated with the
regressors xit .
Therefore
a f a f a f
E yit | xit = xit ′ β + E η i | xit + E vit | xit = xit ′ β
and therefore the simple OLS estimator on the pooled data is unbiased.
However, it is not efficient, and the estimated standard errors are wrong,
as it does not take account of the dependence of the error term within
individual over time.
6
Let uit = η i + vit and assume independence of vis and vit , s ≠ t , and of η i
and the vit , then
a f b g
E uis uit = E η i2 = σ η2
and therefore the uis and uit are correlated. The within individual
variance-covariance matrix is given by, ui′ = ui1 ui 2 ... uiT ,a f
LMσ + σ
2
η
2
v σ η2 OP
σ η2
Ω = Eau u ′f =
i i
M
MM
σ 2
η σ η2 + σ 2v
σ 2
P
PP
η
N σ 2
η σ η2 σ +σ Q
2
η
2
v
β RE
F I
= G ∑ X ′Ω X J
N
−1
−1 N
∑ i yi
Ω
′ −1
Hi =1 Ki i X
i =1
7
Fixed Effects
The more likely and interesting case is when the unobserved individual
effects are correlated with the regressors:
a f
E η i | xit ≠ 0.
Clearly, in this case OLS and the Random Effects estimator are biased
and inconsistent as
a f a f a f
E yit | xit = xit ′ β + E η i | xit + E vit | xit
= x ′ β + Eaη | x f ≠ x ′ β
it i it it
8
A solution is to estimate the model with a separate intercept for every
individual by OLS. As
η i = yi − xi ′ β − vi
a f a
yit − yi = xit − xi ′ β + vit − vi f
Therefore, for the fixed effects, or within group estimator, only the
effects of variables that change over time can be estimated.
(OLS standard errors in this model are again wrong as it ignores the fact
that N intercepts have been estimated).
9
For the fixed effects estimator to be unbiased, one needs that the xit in
all periods are uncorrelated with the vis in all periods:
a f
E vis xit = 0; s = 1,..., T , t = 1,..., T
10
First Differencing
a f a f a f a
yit − yit −1 = xit − xit −1 ′ β + uit − uit −1 = xit − xit −1 ′ β + vit − vit −1 f
11
a f
and therefore OLS is unbiased if vit − vit −1 and xit − xit −1 are a f
uncorrelated. This is a weaker assumption than the strict exogeneity
assumption of the fixed effects estimator.
Again OLS estimated standard errors are wrong as it does not take
a f a
account of the correlation between vit − vit −1 and vit −1 − vit −2 f
a fa
E vit − vit −1 vit −1 − vit −2 f = −σ 2
v
LM 2 −1 0 OP
Eav v ′f = σ M P
2
−1 2
i i
MM
v
−1P
N0 −1 2 PQ
12
Endogenous Variables
a f a
yit − yit −1 = xit − xit −1 ′ β + vit − vit −1 f
And xit is endogenous if it is correlated with vit .
a
There can also be feedback from vit −1 to xit such that E xit vit −1 ≠ 0. In f
this case we call xit predetermined or weakly exogenous.
ba fa fg
In both cases E xit − xit −1 vit − vit −1 ≠ 0 and OLS is biased.
If the uit are not correlated over time, lagged values of xit can be used as
instruments for the endogenous differences, and the model can be
estimated by the Instrumental Variables estimator.
13
a f a f
If xit is endogenous, E xit vit ≠ 0 and E xit −1vit −1 ≠ 0 . Valid instruments
a f
are xis , with s=1,…,t-2, as E xit −2 vit = 0.
a f a f
If xit is predetermined, E xit vit−1 ≠ 0 but E xit −1vit −1 = 0 . Valid
instruments therefore are xis , with s=1,…,t-1.
14
Treatment Effects in Panels
Typically once the program is in place this dummy is set to unity for all
remaining time periods.
If the time effects, the group effects and the x are sufficient to render
di = 1 exogenous, then within groups (fixed effects) will be consistent for
the ATT impact of the treatment.
In this case, if the treatment occurs at the same time for all groups that
are treated then diff-in-diff and within groups are identical estimators.
15
Dynamic Panel Data Models
a f
Clearly, yit −1 = αyit −2 + η i + vit −1 is correlated with η i .
Fixed Effects estimator is biased downwards (this bias gets smaller for
larger T)
16
For the first differenced model
a f a
yit − yit −1 = α yit −1 − yit −2 + vit − vit −1 f
yit −1 is of course correlated with vit −1, ( y is predetermined), and the OLS
estimator in the differenced model is severely downward biased.
a f
Valid instruments for yit −1 − yit −2 are the lagged levels yit −2 , yit −3 ,..., yi1,
b a fg
as E yit −2 vit − vit −1 = 0 .
17
Let ∆vi be the vector of errors for individual i in the first differenced
equation:
LM
vi 3 − vi 2 OP
∆yi 3 − α∆yi 2 LM OP
∆yi 4 − α∆yi 3
∆vi = MM
vi 4 − vi 3
= PP MM PP
MNv
iT − viT −1 PQ MN∆y iT − α∆yiT −1 PQ
and let Zi be the matrix of instruments for individual i
LM yi1 0 0 0 OP
Z =M PP
0 yi1 yi 2 0 0
i
MM PQ
N0 … 0 yi1 yi 2 … yiT −2
18
Then
e j
E Zi ′ ∆vi = 0,
a total of (T − 1)(T − 2) / 2 moment conditions.
F N
1 ′ I ′
F 1 ′ I
= G ∑ Z ∆v J W G ∑ Z ∆v J
N
JN
HNi =1 K HN
i i
K N
i =1
i i
Choosing WN =
FG
1
∑
N
′Z IJ
−1
H
N i =1
Z i i
K results in the Two-Stage Least Squares
estimator.
19
The one-step GMM estimator uses as the weight matrix
F
= G ∑Z A Z J
N
1 ′ I −1
WN 1
HNi =1 K i N i
LM 2 −1 0 0 OP
=M P
−1 2 0
AN
MM 0 −1P
N 0 0 −1 2 PQ
and is efficient when the errors are homoscedastic and not correlated
over time. This is often too restrictive. However, the one-step results are
consistent, and robust standard errors that adjust for heteroscedasticity
and autocorrelation are easily obtained.
20
The two-step estimator is efficient under more general conditions, like
heteroscedasticity. The efficient weight matrix is computed as
F 1 N
′ ′ I
= G ∑ Z ∆v ∆v Z J
−1
WN 2
HN i =1 Ki i i i
21
Sargan test for overidentifying restrictions:
The null hypothesis for this test is that the instruments are valid in the
sense that they are not correlated with the errors in the first-differenced
equation. It is computed as
F 1 ′
N
I ′
F 1 ′ I
S = NJ aα f = N G ∑ Z ∆v J W G ∑ Z ∆v J .
N
N 2
HN K HN
i =1
i i2
K N2
i =1
i i2
Under the null, this test statistic has a χ 2q distribution, with q equal to the
total number of instruments minus the number of parameters in the
model.
FG I IJ = λ + α FG I IJ + η + v
it −1
HK K HK K
it
t i it
it it −1
and results are presented in Table 1 for OLS, within groups, just
identified Two-Stage Least Squares for a differenced model, with
( I / K )it −2 as an instrument for ∆( I / K )it −1, and two GMM estimates for
α in the differenced model, one using ( I / K )it −2 and ( I / K )it −3, the other
using ( I / K )it −2 ,..., ( I / K )i1 as instruments.
23
OLS Within 2SLS DIF GMM1 DIF GMM1 DIF
Levels Groups
24
Exogeneity/Endogeneity of additional regressors and instrument set
Consider again the dynamic model with one other explanatory variable:
L
Z =M
y , x ,..., x
i1 i1 i4 0 OP
i
N 0 yi1 , yi 2 , xi1 ,..., xi 4Q.
25
When x is predetermined
L
Z =M
y ,x ,x
i1 i1 i2 0 OP
i
N 0 yi1 , yi 2 , xi1 , xi 2 , xi 3Q.
L
Z =M
y ,x i1 i1 0 OP
i
N 0 yi1 , yi 2 , xi1 , xi 2Q.
26
An example and finite sample inference
The table presents estimation results for the one- and two-step GMM
estimators.
27
One-Step Two-Step
coeff std err coeff std err std errc
nit −1 .535 .166 .474 .085 .185
nit −2 -.075 .068 -.052 .027 .052
wit -.592 .168 -.513 .049 .146
wit −1 .292 .142 .225 .080 .142
kit .359 .054 .293 .040 .063
ysit .597 .172 .610 .109 .156
ysit −1 -.612 .212 -.446 .125 .217
m1 -2.493 -2.826 -1.999
m2 -0.359 -0.327 -0.316
Wald 219.6 372.0 142.0
28
Another test statistic with reasonable finite sample properties is the
difference between the Sargan test statistics in the models with and
without the restriction imposed. Imposing α 2 = 0 (keeping time periods
and instruments the same) results in a Sargan test of 30.58. The
difference between the Sargan tests is therefore 0.47, which is much
smaller that the 5% critical value of the chi-squared distribution with
one degree of freedom. H0 : α 2 = 0 is therefore not rejected.
29
Weak Instruments and Dynamic Panels
1.They are not correlated with the error term in the equation of interest.
2.They are correlated with the endogenous explanatory variable.
Whether the instruments are correlated with the error term is tested by
means of the Sargan test. If the Sargan test rejects the null of no
correlation, the IV estimator is biased and inconsistent.
However, even if the instruments are not correlated with the error term,
a serious small sample bias can occur if they are only weakly correlated
with the endogenous explanatory variable.
30
For the dynamic panel data model in first differences
lagged levels yit −2 ,..., yi1 as instruments for ∆yit −1 become less
informative as α increases. (For the extreme unit root case,
yit = yit −1 + vit , α is not identified in the first differenced GMM model).
The weak instrument bias tend to go in the direction of the within
groups bias (i.e. downward).
This occurs for any highly persistent endogenous r.h.s. variable – capital
etc.
31
There are T − 2 additional moment conditions (additional to the moment
conditions for the model in first differences) for this case are
a f ba f
E uit ∆yit −1 = E η i + vit ∆yit −1 g
= Eba y it f
− αyit −1 ∆yit −1 = 0g
These additional moment conditions are available if the initial
conditions satisfy
a
E η i ∆yi 2 = 0 , f
which holds when the process is mean stationary:
ηi
yi1 = + ε i1
1−α .
a f a f
E ε i1 = E η i ε i1 = 0
32
The GMM estimator that combines the moment conditions for the
differenced model with those for the levels model is call the SYSTEM
estimator (Blundell and Bond (1998)) and has been shown to perform
much better (less bias and more precision), especially when α is large,
i.e. when the series are persistent. This is due to the fact that ∆yit −1 is a
good instrument for yit −1, it explains yit −1 well, irrespective of the value
of α . Whether the additional moment conditions are valid has of course
to be tested, using the Sargan test.
33
The model is
34
OLS WG DIF SYS
Mean St D Mean St D Mean St D Mean St D
ρ = 0.5
ρ 0.762 .012 0.265 .018 0.494 .034 0.501 .024
35
OLS WG DIF SYS
Mean St D Mean St D Mean St D Mean St D
ρ = 0.95
ρ 0.997 .001 0.591 .017 0.676 .222 0.958 .031
36
An Example: Company Capital Stock
37
Count Data Models
e− µi µ i y
a f
f yi | xi =
yi !
where
a f e j
µ i = E yi | xi = exp xi ′ β
38
a f
As ln µ i = xi ′ β , the model is often called a log-linear model. The
Poisson distribution has the property that the conditional variance is
equal to the conditional mean (equidispersion):
a f a f e j
Var yi | xi = E yi | xi = exp xi ′ β .
e j
yi = exp xi ′ β + ui
a f a f
with E ui | xi = 0 from which it follows that E xi ui = 0. As long as these
conditions are valid in the population, the Poisson estimator for β is
consistent, even if the true distribution is not Poisson.
39
Parameter Interpretation
a f
∂E y| x
e j
= β j exp x ′ β .
∂x j
Further,
βj =
a f
∂E y| x 1
a f
∂x j E y| x
40
Overdispersion
41
Overdispersion can be introduced directly into the model by introducing
an unobserved heterogeneity term, η i . Conditional on xi and η i , the yi
are Poisson distributed with
a f e j e j
E yi | xi , η i = exp xi ′ β + η i = exp xi ′ β ε i
If ε i is independent of xi and has a gamma distribution with E ε i = 1 a f
a f
and Var ε i = δ 2 , then the conditional distribution of yi given xi is
negative binomial with
a f e j
E yi | xi = exp xi ′ β
Var a y | x f = expe x ′ β j + δ e j
2
i i i
2
exp xi ′ β
Note again, that as the conditional mean has not changed, the Poisson
ML estimator is consistent in this case, but not efficient.
42
Panel Data
To allow for general correlation between xit and η i the fixed effects
Poisson estimator is obtained by including N individual specific
dummies in the model. This is similar to the within groups estimator in
the linear model, and therefore the Poisson model does not suffer from
the incidental parameter problem. This fixed effects, within groups
mean scaling estimator is obtained from the regression
yi
yit = µ it + wit
µi
e j ′ 1 T
where µ it = exp xit β and µ i = ∑t =1 µ it .
T
43
#cigs Pooled Poisson Fixed Effects Poisson
coeff se coeff se
age .789 .052 .725 .078
age2 -.102 .006 -.095 .002
lrhi -.112 .020 .019 .004
hsownd -.586 .028 -.132 .008
unemp .218 .030 -.016 .008
dkid04 -.115 .028 -.041 .006
female -.202 .028
44
Weak exogeneity
For both the random and fixed effects estimators, the xit have to be
strictly exogenous. This assumption can be relaxed and quasi-
differencing techniques can be used to allow for endogenous and/or
predetermined explanatory variables.
e j
yit = exp xit ′ β uit
uit = ε i vit
45
Then
yit
µ it
−
yit −1
µ it −1
a f a
= uit − uit −1 = ε i vit − vit −1 f
a f
If for example xit is endogenous, E xit vit ≠ 0, valid moment conditions
are
LM FG
yit yit −1
− = 0, for s ≥ 2.
IJ OP
N Hµ KQ
E xit − s
it µ it −1
L F
EMx G y
µ it −1 IJ OP = E L x F y expF −a x f IK
− xit −1 ′ β − yit −1 I OP = 0,
N Hit − s it
µ it
− yit −1
K Q MN H H it − s it it
KQ for s ≥ 1.
Richard Blundell
UCL and IFS
March 2005
47
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: