Vous êtes sur la page 1sur 137

Applied panel data econometrics

Alban Thomas
1
1
Department of Environmental Economics
University of Toulouse
AUB, February 26-28, 2007
Outline
Introduction
The nature of panel data
The issue of unobserved heterogeneity
Some notations
The linear panel-data model
Extending the OLS framework
Testing for effects
The Fixed-effect estimator
The Random-effect model and the GLS estimator
A test of model specication
Extensions (unbalanced panel, two-way models)
The augmented linear panel-data model
The issue of identication and a simple procedure
Instrumental Variable estimation
IV in a panel-data context
Exogeneity assumptions and a rst instrument matrix
More efcient procedures: Amemiya-MaCurdy and
Breusch-Mizon-Schmidt
Computation of variance-covariance matrix for IV estimators
Full IV-GLS estimation procedure
The dynamic panel-data model
OLS and Fixed-effect estimators
The Hsiao analysis
An estimator based on rst-difference (Anderson-Hsiao)
The Arellano-Bond estimator
Extensions
Discrete-choice models with panel data
A brief review of discrete-choice models
The Fixed-effect Logit estimator
The Random-effect Probit estimator
Extensions (selectivity in panel-data samples)
Introduction
The nature of panel data

Panel data: data containing time-series observations of a


number of individuals, rms, etc.
Also called cross-sections over time, longitudinal data or
pooled cross-section time-series data.

Observations in panel data involve two dimensions:


a cross-sectional (indexed by i ) and a time-series
dimension (indexed by t ).

But panel data can have a more complicated structure,


e.g., city j in country i at time t .
The nature of panel data
Advantages of panel data
Panel data combines inter-individual differences and
intra-individual dynamics, allowing for:

more accurate inference on model parameters (less


multicollinearity)

constructing and testing more complicated behavioral


hypotheses

a better treatment of endogeneity


Example 1: Stock market
Consider a cross-section sample of rm stocks, in which 50%
of observations are such that stock returns are above market
return.
Either the sample comes
from a homogeneous population of rms, and stocks are
expected to be above market return one every two year,
or
from two heterogeneous populations: stocks that are either
always above (or under) the market return.

In the latter case, observed situation of a stock is a perfect


predictor for future stock position.

A cross-section sample cannot distinguish between these


two possibilities.
Example 2: Effectiveness of (health, social) programs

In a cross-section sample, one does not simultaneously


observe health condition or income, employment status,
etc. when an individual benets from the program and
when she does not.

But with panel data, possible to observe the before- and


after-treatment effects for a proportion of the sample.

Individual i , time period t ,


indicator of receiving the treatment I
it
,
individual characteristics X
it
,
outcome R
it
= R(I
it
, X
it
).

Difference-in-difference method:
[R(I
it
= 1, X
it
) R(I
is
= 0, X
is
)]
_
R(I
jt
= 0, X
jt
) R(I
js
= 0, X
js
)

Some denitions

Typical panel: when number of units (N) is large, and


number of time periods (T) is small.

Short (long) panel: when T is small (large).

Balanced panel: same T for every unit (individual).

Rotating panel: A subset of individuals is replaced every


period. Rotating panels can be balanced or unbalanced.

Pseudo panel: when one is pooling cross-sections made of


different individuals for every period.
The issue of unobserved heterogeneity

Observations often originate from non-controlled


experiments, hence the i.i.d. hypothesis for unobserved
heterogeneity may have to be relaxed.

With panel data, easy to control for unobserved


heterogeneity across individuals.

Part of this heterogeneity is observed through intrinsic


individual characteristics, part of it is not: unobserved
heterogeneity.

This point is related to endogeneity and omitted variables


issues.
Some notations

Scalar form model:


y
it
= x
it
+ u
it
, i = 1, 2, . . . , N, t = 1, 2, . . . , T,
where y
it
is scalar, x
it
is a 1 K vector, is a (K 1)
vector of parameters, and u
it
is the residual term.

Model in vector form:


y
i
= x
i
+ u
i
, i = 1, 2, . . . , N,
where y
i
= (y
i 1
, y
i 2
, . . . , y
iT
)

and x
i
= (x
i 1
, x
i 2
, . . . , x
iT
)

are
T 1 vectors of observed variables.
Some notations

Model in matrix form: Y = X + U, where


Y =
_
_
_
_
_
_
_
_
_
_
_
_
y
11
.
.
.
y
1T
y
22
.
.
.
y
2T
.
.
.
y
N1
.
.
.
y
NT
_
_
_
_
_
_
_
_
_
_
_
_
, X =
_
_
_
_
_
_
_
_
_
_
_
_
x
111
x
211
. . . x
K11
.
.
.
.
.
.
.
.
.
.
.
.
x
11T
x
21T
. . . x
K1T
x
121
x
221
. . . x
K21
.
.
.
.
.
.
.
.
.
.
.
.
x
12T
x
22T
. . . x
K2T
.
.
.
.
.
.
.
.
.
.
.
.
x
1N1
x
2N1
. . . x
KN1
.
.
.
.
.
.
.
.
.
.
.
.
x
1NT
x
2NT
. . . x
KNT
_
_
_
_
_
_
_
_
_
_
_
_
, U =
_
_
_
_
_
_
_
_
_
_
_
_
u
11
.
.
.
u
1T
u
22
.
.
.
u
2T
.
.
.
u
N1
.
.
.
u
NT
_
_
_
_
_
_
_
_
_
_
_
_
(NT1) (NTK) (NT1)
Some notations
Standard matrices and operators

I
NT
: identity matrix with NT rows and NT columns

e
T
: T-vector of ones

B = I
N
(1/T)e
T
e

T
: (Between-individual operator)

Q = I
NT
I
N
(1/T)e
T
e

T
= I
NT
B (Within-individual
operator)
Some notations

The B operators are used to compute, from NT vectors


and matrices, individual- or time-specic means of
variables, stored in matrices of row dimension NT.

The Q operators are used to compute deviations from


these means.
Properties of operators

Symmetry, idempotency and orthogonality


Q

= Q, B

= B, Q
2
= Q, B
2
= B, BQ = QB = 0,

Rank of idempotent matrix = its trace


rank(Q) = N(T 1) and rank(B) = N.
Some notations
Decomposition of the Q operator with N = T = 2:
Qy =
_
_
_
_
_

_
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
_

_
1 0
0 1
_

1
2
_
1 1
1 1
_
_
_
_
_
y
=
_
_
_
_
y
11
y
12
y
21
y
22
_
_
_
_

1
2
_

_
1 1 0 0
1 1 0 0
0 0 1 1
0 0 1 1
_

_
_
_
_
_
y
11
y
12
y
21
y
22
_
_
_
_
=
_
_
_
_
y
11
y
12
y
21
y
22
_
_
_
_

1
2
_
_
_
_
y
11
+ y
12
y
11
+ y
12
y
21
+ y
22
y
21
+ y
22
_
_
_
_
We will also use the following notation on operators for a single
individual:
Between operator for a single group:
B
T
=
_
1
T
_
e
T
e

T
(a T T matrix)
Within operator for a single group:
Q
T
= I
T

_
1
T
_
e
T
e

T
= I
T
B
T
(a T T matrix)
The linear panel-data model
Extending the OLS framework
Consider the model
y
it
=
i
+ x
it

i
+
it
, i = 1, 2, . . . , N, t = 1, 2, . . . , T
i
,
where x
it
is scalar,
i
and
i
are parameters
and T
i
: number of time periods available for individual i .
Useful rst-order empirical moments are
y
i
=
1
T
i
T
i

t =1
y
it
, x
i
=
1
T
i
T
i

t =1
x
it
, S
xxi
=
T
i

t =1
(x
it
x
i
)
2
,
Extending the OLS framework
S
xyi
=
T
i

t =1
(x
it
x
i
)(y
it
y
i
), and S
yyi
=
T
i

t =1
(y
it
y
i
)
2
, i = 1, 2, . . . , N.
Least-square parameter estimates are computed as

i
= S
xyi
/S
xxi
and
i
= y
i
x
i

and the Residual Sum of Squares (RSS) for individual i is


RSS
i
= S
yyi
S
2
xyi
/S
xxi
, with(T
i
2) degrees of freedom.
Extending the OLS framework
Consider now a restricted model with constant slopes and
constant intercepts:
y
it
= + x
it
+
it
,
which obtains by imposing the following restrictions
_

1
=
2
= =
N
(= )

1
=
2
= =
N
(= ).
Under these restrictions, least-squares parameter estimates
would be

N
i =1

T
i
t =1
(x
it

x)(y
it

y)

N
i =1

T
i
t =1
(x
it

x)
2
, =

y

x

,
Extending the OLS framework
where

y =
1

i
T
i
N

i =1
T
i

t =1
y
it
,

x =
1

i
T
i
N

i =1
T
i

t =1
x
it
.
The Residual Sum of Squares is
RSS =
N

i =1
T
i

t =1
(y
it

y)
2

N
i =1

T
i
t =1
(y
it

y)(x
it

x)
_
2

N
i =1

T
i
t =1
(x
it

x)
2
,
with as number of degrees of freedom:

N
i =1
T
i
2.
Extending the OLS framework

For a majority of applications, the rst model is too general


as estimation would require a great number of time
observations.

If unobserved heterogeneity is additive in the model, we


might consider the following specication with constant
slope and different intercepts:
y
it
=
i
+ x
it
+
it
.
Minimizing

i

t
(y
it

i
x
it
)
2
with respect to
i
and ,
we have

t
(y
it

i
x
it
) = 0,

t
x
it
(y
it

i
x
it
) = 0,
Extending the OLS framework
so that
i
=

y
i

x
i
and

=

t
x
it
(y
it

y
i
)

t
x
it
(x
it

x
i
)
.

Residual Sum of Squares has now



i
T
i
(N + 1)
degrees of freedom (N + 1 parameters are estimated).

This is the most popular model encountered in empirical


applications.
Testing for effects

Poolability
y
it
=
i
+ x
it

i
+
it
versus
y
it
=
i
+ x
it
+
it
,
and x
it
is a K vector.
H
0
:
1
=
2
= =
N
(= )(K(N 1) constraints).
Fisher test statistic is
(RRSS URSS)/K(N 1)
URSS/N(T K 1)
F (K(N 1), N(T K 1)) ,
where RRSS: from Within regression (see later)
and URSS: =

N
i =1
[S
yyi
S
2
xyi
/S
xxi
]
Testing for effects

Testing for individual effects


H
0
:
1
= =
N
(= ).
y
it
= + x
it
+
it
(OLS)
versus
y
it
=
i
+ x
it
+
it
(Within).
Fisher test statistic is
(RRSS URSS)/(N 1)
URSS/(NT N K)
F ((N 1), NT N K)) ,
where RRSS: from OLS regression on pooled data and
URSS: from Within (see later) regression.
The Fixed-effect estimator
Interpretation as a covariance estimator
Model in vector form:
_

_
y
1
y
2
.
.
.
y
N
_

_
=
_

_
x
1
x
2
.
.
.
x
N
_

_
+
_

_
e
T
0
T
.
.
.
0
T
_

1
+
_

_
0
T
e
T
.
.
.
0
T
_

2
+ +
_

_
0
T
0
T
.
.
.
e
T
_

N
+
_

2
.
.
.

N
_

_
,
The Fixed-effect estimator
Assumptions:
E(
i
) = 0, E(
i

i
) =
2

I
T
, E(
i

j
) = 0i = j .
OLS estimates of and
i
obtain by
min
N

i =1

i
=
N

i =1
(y
i

i
x
i
)

(y
i

i
x
i
)

i
=

y
i

x
i
, i = 1, 2, . . . , N,
and substituting in partial derivative wrt. , we have

=
_
_
N,T

i ,t
(x
it

x
i
)(x
it

x
i
)

_
_
1
_
_
N,T

i ,t
(x
it

x
i
)(y
it

y
i
)
_
_
The Fixed-effect estimator

This is called the covariance estimator, or the LSDV


(Least-Square Dummy-Variable) estimator.


is unbiased, is consistent when N or T tends to innity.

Its covariance matrix is


Var
_

_
=
2

_
N

i =1
x
i
Q
T
x

i
_
1
,
where Q
T
= I
T
(1/T)e
T
e

T
.


i
is unbiased but consistent only when T .
The Fixed-effect estimator
The xed-effect estimator in terms of the
Frisch-Waugh-Lovell theorem
In a xed-effect context, inference is conditional on individual
effects: estimates obtain by regressing Y on X and on
individual dummies.
Consider the model
Y = X + E + = W + u
where W = [X, E], = (

, u = ,
and E is the NT N matrix of individual dummy variables
The Fixed-effect estimator
E =
_

_
1 0 0 0
1 0 0 0
1 0 0 0
0 1 0 0
0 1 0 0
0 1 0 0
.
.
.
.
.
.
0 0 0 1
0 0 0 1
0 0 0 1

(i = 1) (i = 2) (i = N)
_

_
The Fixed-effect estimator
Frish-Waugh-Lovell theorem: Parameter estimates are
numerically identical in the 2 following procedures:


from

OLS
= (

= (W

W)
1
W


= (X

)
1
X

where
X

= [I E(E

E)
1
E

]X = P
E
X,
Y

= [I E(E

E)
1
E

]Y = P
E
Y
(residuals from least-square regression of X and Y on E).
This is because P
E
= I E(E

E)
1
E

= I
1
T
E(I
N
)E

= I
1
T
(I
N
e
T
)(I
N
e
T
)

= I I
N

1
T
e
T
e

T
= Q.
Hence

= (X

)
1
(X

) = (X

E
P
E
X)
1
(X

E
P
E
Y)
= (X

QX)
1
(X

QY).
The Fixed-effect estimator
Idea behind the xed-effect estimation procedure:
Eliminate individual effects Eliminate individual-specic
deviations from variables
Transformation of the linear model as follows:
y
it
1/T

t
y
it
= (x
it
1/T

t
x
it
) + u
it
1/T

t
u
it
Y BY = (X BX) + u Bu QY = QX + Qu.
Least square parameter estimate:

=
_
(QX)

(QX)

1
(QX)

QY =
_
X

QX

1
(X

QY)
= (X

QX)
1
X

QY and Var (

) =
2

(X

QX)
1
.
The xed-effect estimator

Model transformation by ltering out individual components

Coefcients associated with time-invariant regressors are


not identied.

Fixed-effect procedure uses variation within periods for


each unit, hence the name.

Another possibility is the Between procedure, using


variation between individuals.
BY = BX + B + B,

=
_
(BX)

(BX)

1
(BX)

BY =
_
X

BX

1
X

BY.
Example: The CAPM
The Capital Asset Pricing Model (CAPM)
Simple form of the model:
R
it
r
ft
=
i
(R
mt
r
ft
) ,
where

R
it
: return on (risky) asset i at time t

R
mt
: market return at time t

R
ft
: return on risk-free asset f at time t
and

i
=
cov (R
it
, R
mt
)
Var (R
mt
)
.
Example: The CAPM (weekly returns on stocks)
-
.
0
2
-
.
0
1
0
.
0
1
.
0
2
r
e
t
m
80 85 90 95
year
rssd9035 = 1 rssd9035 = 3
rssd9035 = 13 rssd9035 = 16
rmt
Example: The CAPM
Table: OLS estimates of CAPM
Stock Intercept
i
R
2
rssd9035==1 -0.0003 0.8902 0.7071
(-0.39) (5.69)
rssd9035==3 0.0003 1.1459 0.8258
(0.52) (7.91)
rssd9035==13 0.0001 1.2337 0.6224
(0.10) (4.74)
rssd9035==16 0.0005 0.7959 0.4939
(0.46) (3.70)
Fixed effects 0.0001 1.0164 0.6617
(0.35) (10.16)
Test for effects
i
: F(3,51)=0.58 (0.63)
The Random-effect model and the GLS estimator

Problem with Fixed-effect model: degrees of freedom are


lost when N .

Different approach: assume individual effects are random,


i.e., model inference is drawn marginally (unconditionally
upon the
i
s) wrt. the population of all effects.

Assumptions:

i
IID(0,
2

),
it
IID(0,
2

), E(
i

it
) = E(
i
x
it
) = 0,
with
E(
i

j
) =
_

2

if i = j ,
0 otherwise,
E(
it

sj
) =
_

2

if i = j and t = s,
0 otherwise.
The Random-effect model and the GLS estimator
Hence cov(u
it
, u
js
) =
2

+
2

if i = j and t = s, and
2

if i = j
and t = s.
Let
T
= E(u
i
u

i
) =
_

+
2

+
2

.
.
.
.
.
.

+
2

_
,
a (T T) matrix, for every individual i , i = 1, 2, . . . , N.
We have E(uu

) = = I
N

T
= I
N

_

(e
T
e

T
) +
2

I
T
_
The Random-effect model and the GLS estimator
= I
N

_

(T B
T
) +
2

(Q
T
+ B
T
)
_
since Q
T
= I
T
B
T
and B
T
= (1/T)e
T
e

T
.
Therefore
= I
N

_

(T B
T
) +
2

(Q
T
+ B
T
)
_
= T
2

B +
2

I
NT
or equivalently: =
2

Q + (T
2

+
2

)B.
GLS estimation of the Random-effect model
General model form: Y = X + U, with E(UU

) = .

Generalized Least Squares (GLS) produce efcient


parameter estimates of ,
2

and
2

Based on known structure of variance-covariance matrix .

GLS
=
_
X

1
X
_
1
X

1
Y
Var (

GLS
) =
2

_
X

1
X
_
1
.

Computation of
1
: use of the formula

r
= (
2

)
r
Q + (T
2

+
2

)
r
B
for an arbitrary scalar r .
GLS estimation of the Random-effect model
Hence useful matrices are

1
=
1

Q +
1
T
2

+
2

B
and

1/2
=
1

Q +
1
(T
2

+
2

)
1/2
B.
We have

GLS
=
_
X

1
X
_
1
X

1
Y
=
_
X

_
1
X
_
1
_
X

_
1
Y
_
.
GLS estimation of the Random-effect model

GLS
=
_
X

(Q +B)
1
X
_
1
_
X

(Q +B)
1
Y
_
,
where = (T
2

+
2

)/
2

= 1 + T
2

/
2

.
GLS as Weighted Least Squares.
Premultiply the model by

1/2
and use OLS:
Y

= X

+ u

, where
Y

1/2
Y = (Q +
1/2
B)Y,
X

1/2
X = (Q +
1/2
B)X.
GLS estimation of the Random-effect model
In scalar form:
{y

it
} = (y
it

y
i
) +
1/2

y
i
= y
it
(1
1

y
i
{x

it
} = (x
it

x
i
) +
1/2

x
i
= x
it
(1
1

x
i
.
Comparison between GLS, OLS and Within

GLS
=
_
X

QX +
1

BX
_
1
_
X

QY +
1

BY
_

Within
= (X

QX)
1
X

QY,

Between
= (X

BX)
1
X

BY,
so that

GLS
= S
1

Within
+ S
2

Between
,
where
S
1
= [X

QX+
1

BX]
1
X

QX, S
2
= [X

QX+
1

BX]
1
X

BX

.
Comparison between GLS, OLS and Within

(i) If
2

= 0, then 1/ = 1 and

GLS
=

OLS
.

(ii) If T , then 1/ 0 and


GLS

Within
.

(iii) If 1/ , then

GLS

Between
.

(iv) Var (

Within
) Var (

GLS
) is a s.d.p. matrix.

(v) If 1/ 0 then Var (

Within
) Var (

GLS
).
Best Quadratic Unbiased Estimators of variances
If errors are normal, BQU estimates of
2

and
2

are found from



2

= u

Qu/tr (Q) =

N
i =1

T
t =1
(u
it

u
i
)
2
N(T 1)
and

+ T
2

= u

Bu/tr (B) = T
N

i =1

u
2
i
/N,
because tr (Q) = N(T 1) and tr (B) = N.
But in practice, the u
it
s are unknown and we must estimates
variances from the

u
it
s instead.

1/ Wallace and Hussain (1969): Use OLS residuals in


place of true us

2/ Amemiya (1971): Use LSDV residuals estimates.


A test of model specication
Recall: GLS is a consistent and efcient estimator provided
regressors are exogenous:
E(
i
x
it
) = 0 i , t .
Consider the model y
it
= x
it
+
i
+
it
.
If x
it
is endogenous in the sense E(
i
x
it
) = 0, then GLS are
not consistent:

GLS
= +
_
X

1
X
_
1
_
X

1
U
_
= +
_
X

_
Q +
1
B
_
X
_
1
_
X

_
Q +
1
B
_
U
_
,
where = 1 + T
2

/
2

.
A test of model specication
We have
E
_
X

_
Q +
1
B
_
U
_
= E
_
X

Q + X

(B + B)/

= 0 + E
_
X

B/
_
+ 0 = E
_
X

_
/ = 0,
because E(X

) = 0 and B = .
Important consequence in practice:
If (some of the) regressors are endogenous, GLS is not
consistent, but Within estimates are.
Remarks:

If all regressors are exogenous, use GLS (consistent and


the most efcient).

When using Within, all regressors are treated as


endogenous (not efcient)
A test of model specication
Null hypothesis: H
0
: E(X

) = 0 (exogeneity).
Comparison between two estimators:

GLS

Within
H
0
Consistent, Consistent,
efcient not efcient
Alternative Not consistent Consistent
Hausman test statistic: Under H
0
,
HT =
_

Within

GLS
_

_
Var (

Within
) Var (

GLS
)
_
1

Within

GLS
_

2
(K).
A test of model specication
Notes

Weighting matrix
_
Var (

Within
) Var (

GLS
)
_
is positive:
GLS more efcient than Within under the null. Recall that
Var (

GLS
) =
2

(X

QX +X

BX)
1
and
Var (

w
) =
2

(X

QX)
1
.

Interpretation of # of degrees of freedom of the test:


Within estimator is based on the condition E(X

QU) = 0,
whereas GLS is based on E(X

1
U) = 0
E(X

QU) = 0 and E(X

BU) = 0.
For GLS, we add K additional conditions (in terms of B):
rank of X.

Hausman test uses these additional restrictions.


Example: A model for market value
Simple model for market value
Sample of 186 British rms, observed from 1970 to 1989.
Specication is
MARKETVALUE
it
=
0
+
1
MARKETSHARE
it
+
2
PROFIT
it
+

k
d
k
INDUS
ik
+
i
+
it
,
where
INDUS
ik
=
_
1 if rm i belongs to industry k,
0 otherwise

Fi xed Fi xed Fi xed Fi xed- -- - ef f ect est i mat i on ef f ect est i mat i on ef f ect est i mat i on ef f ect est i mat i on


. xtreg market_value market_share profit, i( id) fe



Fi xed- ef f ect s ( wi t hi n) r egr essi on Number of obs = 1563
Gr oup var i abl e ( i ) : i d Number of gr oups = 109

R- sq: wi t hi n = 0. 3816 Obs per gr oup: mi n = 3
bet ween = 0. 5154 avg = 14. 3
over al l = 0. 4752 max = 17

F( 2, 1452) = 447. 96
cor r ( u_i , Xb) = - 0. 4474 Pr ob > F = 0. 0000


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
mar ket _val ue | Coef . St d. Er r . t P>| t | [ 95% Conf . I nt er val ]
- - - - - - - - - - - - - +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
mar ket _shar e | 1. 850196 . 0969919 19. 08 0. 000 1. 659937 2. 040455
pr of i t | . 4521674 . 019106 23. 67 0. 000 . 4146892 . 4896457
_cons | . 4812663 . 0310211 15. 51 0. 000 . 4204154 . 5421173
- - - - - - - - - - - - - +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
si gma_u | . 89782786
si gma_e | . 60332404
r ho | . 68891417 ( f r act i on of var i ance due t o u_i )
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
F t est t hat al l u_i =0: F( 108, 1452) = 23. 32 Pr ob > F = 0. 0000


. est store fe


Random Random Random Random- -- - ef f ect est i mat i on ef f ect est i mat i on ef f ect est i mat i on ef f ect est i mat i on


. xtreg market_value market_share Indus* profit, i( id) re


Random- ef f ect s GLS r egr essi on Number of obs = 1563
Gr oup var i abl e ( i ) : i d Number of gr oups = 109

R- sq: wi t hi n = 0. 3815 Obs per gr oup: mi n = 3
bet ween = 0. 6104 avg = 14. 3
over al l = 0. 5394 max = 17

Random ef f ect s u_i ~ Gaussi an Wal d chi 2( 15) = 1015. 45
cor r ( u_i , X) = 0 ( assumed) Pr ob > chi 2 = 0. 0000


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
mar ket _val ue | Coef . St d. Er r . z P>| z| [ 95% Conf . I nt er val ]
- - - - - - - - - - - - - +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
mar ket _shar e | 1. 685676 . 0928016 18. 16 0. 000 1. 503789 1. 867564
i ndus1 | - . 8737029 . 3375954 - 2. 59 0. 010 - 1. 535378 - . 212028
i ndus2 | - 1. 143198 . 4151289 - 2. 75 0. 006 - 1. 956836 - . 3295604
i ndus4 | - . 6424559 . 3597829 - 1. 79 0. 074 - 1. 347617 . 0627056
i ndus5 | - . 0749567 . 3364389 - 0. 22 0. 824 - . 7343648 . 5844514
i ndus6 | . 1181526 . 3547827 0. 33 0. 739 - . 5772087 . 8135139
i ndus7 | - . 570448 . 3366353 - 1. 69 0. 090 - 1. 230241 . 089345
i ndus8 | - . 4866771 . 3825003 - 1. 27 0. 203 - 1. 236364 . 2630098
i ndus9 | - 1. 320365 . 416362 - 3. 17 0. 002 - 2. 13642 - . 5043109
i ndus11 | - . 6695109 . 3114592 - 2. 15 0. 032 - 1. 27996 - . 0590621
i ndus12 | . 0572354 . 3093153 0. 19 0. 853 - . 5490114 . 6634821
i ndus13 | - . 2936718 . 3124267 - 0. 94 0. 347 - . 906017 . 3186733
i ndus14 | - . 3545938 . 2614296 - 1. 36 0. 175 - . 8669865 . 1577989
i ndus15 | - . 8566143 . 4132941 - 2. 07 0. 038 - 1. 666656 - . 0465727
pr of i t | . 4196861 . 0178462 23. 52 0. 000 . 3847082 . 454664
_cons | . 9127013 . 1893622 4. 82 0. 000 . 5415582 1. 283844
- - - - - - - - - - - - - +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
si gma_u | . 71574212
si gma_e | . 60332404
r ho | . 58461094 ( f r act i on of var i ance due t o u_i )
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

. est store re

. hausman fe re


Test : Ho: di f f er ence i n coef f i ci ent s not syst emat i c

chi 2( 2) = ( b- B) ' [ ( V_b- V_B) ^( - 1) ] ( b- B)
= 38. 24
Pr ob>chi 2 = 0. 0000
The unbalanced panel

Denition: number of time periods is different from one unit


(individual) to another.

For individual i , we have T


i
periods, and total number of
observations is now

N
i =1
T
i
(instead of NT previously).
Examples

Firms: may close down or new intrants in an industry

Consumers: may move, die or refuse to answer anymore

Worker: may become unemployed,...

Problem of attrition: probability of a unit staying in the


sample decreases as the number of periods increases.
The unbalanced panel
Consider the unbalanced model with T
1
= 3 and T
2
= 2:
_
_
_
_
_
_
y
11
y
12
y
13
y
21
y
22
_
_
_
_
_
_
=
_
_
_
_
_
_
x
11
x
12
x
13
x
21
x
22
_
_
_
_
_
_
+
_
_
_
_
_
_

2
_
_
_
_
_
_
+
_
_
_
_
_
_

11

12

13

21

22
_
_
_
_
_
_
.
To eliminate , we need a new Within operator
Q

=
_
I
3
e
3
e

3
/3 0
0 I
2
e
2
e

2
/2
_
The unbalanced panel
Q

=
_

_
2/3 1/3 1/3 0 0
1/3 2/3 1/3 0 0
1/3 1/3 2/3 0 0
0 0 0 1/2 1/2
0 0 0 1/2 1/2
_

_
,
and the same procedure as in the balanced case is applied:

Within
=
_
X

X
_
1
X

Y
where Q

= diag(I
T
i
e
T
i
e

T
i
/T
i
)|
i =1,2,...,N
.
The Two-way panel data model
Error component structure of the form:
u
it
=
i
+
t
+
it
i = 1, 2, . . . , N, t = 1, 2, . . . , T,
or in matrix form
U = (I
N
e
T
) + (e
N
I
T
) +,
where = (
1
, . . . ,
N
)

and = (
1
, . . . ,
T
)

i
and
t
are treated as xed parameters, conditional inference
on the N individuals over the period 1 T.
The Two-way panel data model
Fixed-effect estimates of obtain by using the new operator:
Q = I
N
I
T
I
N
(e
T
e

T
/T) (e
N
e

N
/N) I
T
,
so that Qu = {u
it

u
i

u
t
}
it
.
Averaging over individuals, we have

y
t
=

x
t
+
t
+
t
with restriction
N

i =1

i
= 0.
and averaging over time periods:

y
i
=

x
i
+

i
+
i
with restriction
T

t =1

t
= 0,
The Two-way panel data model
OLS on model in deviations yields

= (X

QX)
1
X

QY,

i
=

y
i

x
i

,

t
=

y
t

x
t

.
If the model contains an intercept, operator Q becomes
Q = I
N
I
T
I
N
(e
T
e

T
/T) (e
N
e

N
/N) I
T
+(e
N
e

N
/N) (e
T
e

T
/T)
so that
Qu = {u
it

u
i

u
t
+

u}
it
,
and Within estimates are

= (X

QX)
1
X

QY,

i
= (

y
i

y) (

x
i

x)

t
= (

y
t

y) (

x
t

x)

.
The Two-way panel data model
1/ H
0
:
1
= =
N1
=
1
= =
T1
= 0.
Fisher test statistic:
(RRSS URSS)/(N + T 2)
URSS/[(N 1)(T 1) K]
F(k
1
, k
2
),
where
k
1
= N + T 2, k
2
= (N 1)(T 1) K), and
URSS (Unrestricted RSS): from Within model,
RRSS: (Restricted RSS): from pooled OLS.
The Two-way panel data model
2/ H
0
:
1
= =
N1
= 0 given
t
= 0, t T 1.
Fisher test statistic:
(RRSS URSS)/(N 1)
URSS/[(N 1)(T 1) K]
F(k
1
, k
2
),
where
k
1
= N 1, k
2
= (N 1)(T 1) K), and
URSS: from Within model,
RRSS: from regression w/ time dummies only:
(y
it

y
t
) = (x
it

x
t
) + (u
it

u
t
).
The Two-way panel data model
3/ H
0
:
1
= =
T1
= 0 given
i
= 0, i N 1.
Fisher test statistic:
(RRSS URSS)/(T 1)
URSS/[(N 1)(T 1) K]
F(k
1
, k
2
),
where
k
1
= T 1, k
2
= (N 1)(T 1) K), and
URSS: from Within model,
RRSS: from Within regression as in one-way model:
(y
it

y
i
) = (x
it

x
i
) + (u
it

u
i
).
The Two-way panel data model
Example: Production function (Hoch 1962)
Sample: 63 Minnesota farms over the period 1946-1951.
Estimation of a Cobb-Douglas production function:
logOutput
it
=
0
+
1
logLabor
it
+
2
logReal estate
it
+
3
logMachinery
it
+
4
logFertilizer
it
.
Motivation for adding specic effects (into u
it
):

Climatic conditions, identical across farms (


t
)

Farm-specic factors (soil, managerial quality) (


i
).
The Two-way panel data model
Example: Production function (Hoch 1962)
Table: Least square estimates of Cobb-Douglas production
function
Assumption
(I) (II) (III)
Estimate
i
=
t
= 0
i
= 0
t
= 0

1
(Labor) 0.256 0.166 0.043

2
(Real estate) 0.135 0.230 0.199

3
(Machinery) 0.163 0.261 0.194

4
(Fertilizer) 0.349 0.311 0.289
Sum of s 0.904 0.967 0.726

R
2
0.721 0.813 0.884
The augmented linear panel-data model
The augmented linear panel-data model
Consider the model
y
it
= x
it
+ z
i
+
i
+
it
, i = 1, 2, . . . , N, t = 1, 2, . . . , T,
with

x
it
a 1 K vector of time- and individual-varying
regressors,

z
i
a 1 G vector of individual-specic (time-invariant)
regressors.
Example:
logWAGE =
1
HOURS+
1
EDUCATION+
2
EXPERIENCE+
i
+
it
.
The issue of identication and a simple procedure
Estimation method:

Within: is not identiable because


QY = QX + (I B)Z + Q + Q = QX + Q,
since BZ = Z. Only identiable.
But two-step procedure is feasible:
1/ Run Within regression

2/ Run Between regression on

y
i

x
i

=
i
+ Z
i
+
i
, i = 1, 2, . . . , N,
to estimate the s.
The issue of identication and a simple procedure

GLS: Both and are identiable.


Choice between Within and GLS

Important criterion of choice between Within and GLS:


presence of z
i
s in the model.

Recall: GLS is a consistent and efcient estimator


provided regressors are not correlated with
i

but Within estimates are consistent because is ltered


out
The issue of identication and a simple procedure
Three problems remain:

still not identied, because in the Between regression

y
i

x
i

= z
i
+
i
+
i
,
z
i
still correlated with
i

If one uses Within, all regressors are treated as


endogenous (no distinction between exogenous and
endogenous x
it
s)

Within estimates not efcient.


Example: The CAPM again
The Capital Asset Pricing Model again
Sample: stock returns for 141 companies in the Standard &
Poor
Yearly average of weekly returns, years 1980 to 1992
Lets introduce a variable of company origin :
GEODIV =
_
1 if rm i has American origin,
0 otherwise
Model: R
it
r
ft
= (R
mt
r
ft
) +GEODIV
i
+
i
+
it
We wish to check if company origin is correlated with
company-specic stock yield.

Random-effect estimation of the CAPM


. xt r eg r bar a r bar m geodi v, i ( r ssd9035) r e



Random- ef f ect s GLS r egr essi on Number of obs = 1261
Gr oup var i abl e ( i ) : r ssd9035 Number of gr oups = 141

R- sq: wi t hi n = 0. 2633 Obs per gr oup: mi n = 3
bet ween = 0. 6930 avg = 8. 9
over al l = 0. 3961 max = 11

Random ef f ect s u_i ~ Gaussi an Wal d chi 2( 2) = 687. 77
cor r ( u_i , X) = 0 ( assumed) Pr ob > chi 2 = 0. 0000


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
r bar a | Coef . St d. Er r . z P>| z| [ 95% Conf . I nt er val ]
- - - - - - - +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
r bar m | . 6330945 . 0268843 23. 55 0. 000 . 5804022 . 6857867
geodi v | . 0797252 . 0098219 8. 12 0. 000 . 0604746 . 0989759
_cons | . 2148725 . 006903 31. 13 0. 000 . 2013429 . 2284021
- - - - - - - - +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
si gma_u | . 03426304
si gma_e | . 1333353
r ho | . 06194281 ( f r act i on of var i ance due t o u_i )
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

. est st or e r e


Fixed -effect estimation of the CAPM


. xt r eg r bar a r bar m , i ( r ssd9035) f e


Fi xed- ef f ect s ( wi t hi n) r egr essi on Number of obs = 1261
Gr oup var i abl e ( i ) : r ssd9035 Number of gr oups = 141

R- sq: wi t hi n = 0. 2573 Obs per gr oup: mi n = 3
bet ween = 0. 7273 avg = 8. 9
over al l = 0. 3527 max = 11

F( 1, 1119) = 387. 58
cor r ( u_i , Xb) = 0. 3290 Pr ob > F = 0. 0000

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
r bar a | Coef . St d. Er r . t P>| t | [ 95% Conf . I nt er val ]
- - - - - - - - +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
r bar m | . 5419645 . 0275291 19. 69 0. 000 . 4879501 . 595979
- - - - - - +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
si gma_u | . 08551708
si gma_e | . 13398949
r ho | . 28944307 ( f r act i on of var i ance due t o u_i )
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
F t est t hat al l u_i =0: F( 140, 1119) = 3. 32 Pr ob > F = 0. 0000


Hausman test

. est st or e f e

. hausman f e r e


b = consi st ent under Ho and Ha; obt ai ned f r om xt r eg
B = i nconsi st ent under Ha, ef f i ci ent under Ho; obt ai ned f r om xt r eg

Test : Ho: di f f er ence i n coef f i ci ent s not syst emat i c

chi 2( 1) = ( b- B) ' [ ( V_b- V_B) ^( - 1) ] ( b- B)
= 236. 70
Pr ob>chi 2 = 0. 0000
Instrumental Variable estimation
Alternative method: Instrumental-variable estimation.
In the cross-section context with N observations:
Y = X +, E(X

) = 0, E(W

) = 0,
where W is a N L matrix of instruments.

If K = L,
_
W

(Y X)

= 0 (W

Y) = (W

X)

= (W

X)
1
W

Y (IV estimator).

If L > K,
_
W

(Y X)

= 0 (L conditions on K parameters)
Instrumental Variable estimation
and construct quadratic form
(Y X)

W(W

W)
1
W

(Y X)
where
P
W
= W(W

W)
1
W


= (X

W
X)
1
(X

P
W
Y).
Note: in general, instruments W originate from or outside the
equation.
IV in a panel-data context

Account for variance-covariance structure ()

Find relevant instruments, not correlated with .


Consider the general, augmented model:
Y = X
1

1
+ X
2

2
+ Z
1

1
+ Z
2

2
+ +,
where

X
1
: NT K
1
exogenous, varying across i and t

X
2
: NT K
2
endogenous, varying across i and t

Z
1
: NT G
1
exogenous, varying across i

Z
2
: NT G
2
endogenous, varying across i
IV in a panel-data context
Let = (X

1
, X

2
, Z

1
, Z

2
) and = (

1
,

2
,

1
,

2
)

.
General form of the Instrumental-variable estimator for panel
data:
Let Y

=
1/2
Y, X

=
1/2
X, and

=
1/2
. We have

IV
=
_

P
W

_
1
_

P
W
Y

_
=
_

1/2
P
W

1/2

_
1
_

1/2
P
W

1/2
Y
_
.
Computation of
1/2
: as in the usual GLS case.
Exogeneity assumptions and a rst instrument matrix
Exogeneity assumptions: E(X

1
) = E(Z

1
) = 0
Obvious instruments are X
1
and Z
1
, not sufcient because
K
1
+ G
1
< K
1
+ K
2
+ G
1
+ G
2
.

Additional instruments: must not be correlated with .

Because is the source of endogeneity, every variable


not correlated with is a valid instrument.

Best valid instruments: highly correlated with X


2
and Z
2
.
QX
1
and QX
2
are valid instruments:

E[(QX
1
)

] = E[X

1
Q] = 0

E[(QX
2
)

] = E[X

2
Q] = 0.
Exogeneity assumptions and a rst instrument matrix
As for X
1
, equivalent to use BX
1
because we need
E[X

1
U] = E[X

1
(Q +
1
B)U] = E[X

1
B(Q +
1
B)U]
since BQ = 0 and BB = B.
Hausman-Taylor (1981) matrix of instruments:
W
HT
= [QX
1
, QX
2
, BX
1
, Z
1
] = [QX
1
, QX
2
, X
1
, Z
1
].
Identication condition:
We have K
1
+ K
2
+ G
1
+ G
2
parameters to estimate, using
K
1
+ K
1
+ K
2
+ G
1
instruments K
1
+ K
2
instruments in QX).
Therefore, identication condition is K
1
G
2
.
More efcient procedures
Amemiya and MaCurdy (1986)
If x
it
is strongly exogenous, conditions E(x
it

i
) = 0i , t can be
used instead of E(x

i
) = 0.
Add matrix X

1
in the list of instruments:
X

1
=
_

_
x
11
x
12
. . . x
1T
(i = 1, t = 1)
x
11
x
12
. . . x
1T
(i = 1, t = 2)
. . . . . . . . . . . . . . .
x
11
x
12
. . . x
1T
(i = 1, t = T)
x
21
x
22
. . . x
2T
(i = 2, t = 2)
. . . . . . . . . . . . . . .
x
21
x
22
. . . x
2T
(i = 2, t = T)
. . . . . . . . . . . . . . .
x
N1
x
N2
. . . x
NT
(i = N, t = T)
_

_
More efcient procedures
such that QX

1
= 0 and BX

1
= X

1
.
AM instrument matrix is W
AM
= [QX, X

1
, Z
1
]
An equivalent estimator obtains by using
W
AM
= [QX, (QX
1
)

, BX
1
, Z
1
],
where (QX
1
)

is constructed as X

1
above.

Amemiya and MaCurdy estimator is as least as efcient as


Hausman-Taylor,
if
i
not correlated with regressors t .

Identication condition: TK
1
G
2
Why ?As [(QX
1
)

, X
1
] is of rank K
1
, we only add (T 1)K
1
instruments.
More efcient procedures
Even more efcient estimator: Breusch, Mizon and Schmidt
(1989)

Based on conditions E[(QX


2it
)

i
] = 0 i , t , instead of
condition E[(Q
T
X
2i
)

i
] = 0.

BMS estimator is more efcient if endogeneity in X


2
originates from a time-invariant component.

BMS instrument matrix:


W
BMS
= [QX, (QX
1
)

, (QX
2
)

, BX
1
, Z
1
]
where (QX
1
)

and (QX
2
)

are constructed the same way


as X

1
for AM.
More efcient procedures
Identication condition:
With BMS, we add (QX
2
)

to Amemiya-MaCurdy instruments.
Condition is then TK
1
+ (T 1)K
2
G
2
.
As before, we only add (T 1)K
2
instruments, as (QX
2
)

is not
full rank but (T 1)K
2
.
Computation of var-covariance in IV case
Problem here: endogenous regressors may yield unconsistent
estimates of variance components in , in particular parameter
.
Method suggested by Hausman-Taylor (1981) to get consistent
estimates.
Let M
1
: individual-mean vector of the Within residual
M
1
= BY BX

W
=
_
B BX(X

QX)
1
X

Q
_
Y
= Z + +
_
B BX(X

QX)
1
X

Q
_
,
where X = (X
1
|X
2
), Z = (Z
1
|Z
2
), and = (
1
,
2
).
Computation of var-covariance in IV case
Find instruments C for Z
2
in order to estimate :

B
= (Z

P
C
Z)
1
(Z

P
C
M
1
),
where P
C
: projection matrix from instruments C = (X
1
, Z
1
).
Using parameter estimates

W
and
B
, we form residuals

u
W
= QY QX

W
and

u
B
= BY BX

W
Z
B
.
These two vectors of residuals are used to compute variance
composants as in standard Feasible GLS.
Full IV-GLS estimation procedure

Step 1. Compute individual means and deviations, BX,


BY, QX and QY.

Step 2. Estimate parameters associated to X using


Within.

Step 3. Estimate
B
by the IV procedure above.

Step 4. Compute
2

and
2

from

u
W
and

u
B
, and compute

= 1 + T
2

/
2

Step 5. Transform variables by GLS scalar procedure ,


e.g., (Q +

B)Y = y
it
(1

y
i
.

Step 6. Compute projection projection P


W
from instrument
matrix W.

Step 7. Estimate parameters .


Example: The CAPM again (again)
Same sample as before
We introduce variable MRISKA
i
: company-specic volatility
measure (time-invariant).
Model becomes:
R
it
r
ft
= (R
mt
r
ft
) +GEODIV
i
+MRISKA
i
+

k
d
kt
+
i
+
it
where d
kt
: year dummies (from 1983 to 1992).
We assume that MRISKA
i
is exogenous, but GEODIV
i
is
endogenous.

Fi xed Fi xed Fi xed Fi xed- -- - ef f ect est i mat i on ef f ect est i mat i on ef f ect est i mat i on ef f ect est i mat i on


. xt r eg r bar a r bar m d83- d92, i ( r ssd9035 ) f e

Fi xed- ef f ect s ( wi t hi n) r egr essi on Number of obs = 1261
Gr oup var i abl e ( i ) : r ssd9035 Number of gr oups = 141

R- sq: wi t hi n = 0. 3635 Obs per gr oup: mi n = 3
bet ween = 0. 7095 avg = 8. 9
over al l = 0. 4176 max = 11

F( 11, 1109) = 57. 58
cor r ( u_i , Xb) = 0. 2888 Pr ob > F = 0. 0000

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
r bar a | Coef . St d. Er r . t P>| t | [ 95% Conf . I nt er val ]
- - - - - - - - - +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
r bar m | . 526998 . 0347449 15. 17 0. 000 . 4588248 . 5951711
d83 | - . 171329 . 0182153 - 9. 41 0. 000 - . 2070694 - . 1355887
d84 | - . 1699351 . 0184099 - 9. 23 0. 000 - . 2060571 - . 133813
d85 | - . 1426097 . 0181664 - 7. 85 0. 000 - . 178254 - . 1069654
d86 | - . 1268579 . 0189776 - 6. 68 0. 000 - . 164094 - . 0896217
d87 | - . 1018757 . 0217134 - 4. 69 0. 000 - . 1444797 - . 0592717
d88 | - . 1596456 . 0183452 - 8. 70 0. 000 - . 1956409 - . 1236504
d89 | - . 1880678 . 0186342 - 10. 09 0. 000 - . 2246301 - . 1515055
d90 | - . 0641675 . 0193947 - 3. 31 0. 001 - . 1022219 - . 026113
d91 | - . 1331352 . 0196702 - 6. 77 0. 000 - . 1717303 - . 0945402
d92 | - . 0853887 . 0191964 - 4. 45 0. 000 - . 123054 - . 0477234
- - - - - - - - - - - - - +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
si gma_u | . 08385647
si gma_e | . 12459227
r ho | . 31176518 ( f r act i on of var i ance due t o u_i )
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
F t est t hat al l u_i =0: F( 140, 1109) = 3. 41 Pr ob > F = 0. 0000

. est st or e f e


Random Random Random Random- -- - ef f ect est i mat i on ef f ect est i mat i on ef f ect est i mat i on ef f ect est i mat i on

xt r eg r bar a r bar m geodi v_i mr i ska_i d83- d92, i ( r ssd9035 ) r e

Random- ef f ect s GLS r egr essi on Number of obs = 1261
Gr oup var i abl e ( i ) : r ssd9035 Number of gr oups = 141

R- sq: wi t hi n = 0. 3592 Obs per gr oup: mi n = 3
bet ween = 0. 6690 avg = 8. 9
over al l = 0. 4793 max = 11

Random ef f ect s u_i ~ Gaussi an Wal d chi 2( 13) = 978. 00
cor r ( u_i , X) = 0 ( assumed) Pr ob > chi 2 = 0. 0000

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
r bar a | Coef . St d. Er r . z P>| z| [ 95% Conf . I nt er val ]
- - - - - - - - - +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
r bar m | . 6517782 . 0331715 19. 65 0. 000 . 5867633 . 7167931
geodi v | . 1216515 . 0163577 7. 44 0. 000 . 0895911 . 153712
mr i ska_i | 41. 76628 10. 20026 4. 09 0. 000 21. 77414 61. 75842
d83 | - . 1776299 . 01852 - 9. 59 0. 000 - . 2139284 - . 1413313
d84 | - . 1827487 . 0186894 - 9. 78 0. 000 - . 2193793 - . 1461181
d85 | - . 1509886 . 0184779 - 8. 17 0. 000 - . 1872046 - . 1147725
d86 | - . 1502976 . 0192109 - 7. 82 0. 000 - . 1879502 - . 1126449
d87 | - . 1485384 . 0216835 - 6. 85 0. 000 - . 1910373 - . 1060396
d88 | - . 1704982 . 0187765 - 9. 08 0. 000 - . 2072995 - . 1336969
d89 | - . 2012741 . 0190911 - 10. 54 0. 000 - . 2386919 - . 1638563
d90 | - . 0852341 . 0198194 - 4. 30 0. 000 - . 1240793 - . 0463889
d91 | - . 1549351 . 0201411 - 7. 69 0. 000 - . 1944109 - . 1154592
d92 | - . 0892633 . 0198119 - 4. 51 0. 000 - . 1280939 - . 0504326
_cons | . 3166908 . 0172989 18. 31 0. 000 . 2827855 . 3505961
- - - - - - - - - +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
si gma_u | . 03390187
si gma_e | . 12459227
r ho | . 06893578 ( f r act i on of var i ance due t o u_i )
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

. est st or e r e

. hausman f e r e

b = consi st ent under Ho and Ha; obt ai ned f r om xt r eg
B = i nconsi st ent under Ha, ef f i ci ent under Ho; obt ai ned f r om xt r eg
Test : Ho: di f f er ence i n coef f i ci ent s not syst emat i c

chi 2( 11) = ( b- B) ' [ ( V_b- V_B) ^( - 1) ] ( b- B)
= 144. 43
Pr ob>chi 2 = 0. 0000

Hausman Hausman Hausman Hausman- -- - Tayl or I V Tayl or I V Tayl or I V Tayl or I V est i mat i on est i mat i on est i mat i on est i mat i on


. xt ht ayl or r bar a r bar m geodi v mr i ska_i d83- d92, i ( r ssd9035 )
endog( geodi v_i )

Hausman- Tayl or est i mat i on Number of obs = 1261
Gr oup var i abl e ( i ) : r ssd9035 Number of gr oups = 141

Obs per gr oup: mi n = 3
avg = 8. 9
max = 11

Random ef f ect s u_i ~ i . i . d. Wal d chi 2( 13) = 782. 08
Pr ob > chi 2 = 0. 0000

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
r bar a | Coef . St d. Er r . z P>| z| [ 95% Conf . I nt er val ]
- - - - - - - - - +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TVexogenous |
r bar m | . 5360795 . 0340958 15. 72 0. 000 . 4692529 . 6029061
d83 | - . 1684054 . 0178907 - 9. 41 0. 000 - . 2034704 - . 1333403
d84 | - . 1676415 . 0180936 - 9. 27 0. 000 - . 2031042 - . 1321788
d85 | - . 1399427 . 0178502 - 7. 84 0. 000 - . 1749285 - . 1049569
d86 | - . 1259267 . 0186727 - 6. 74 0. 000 - . 1625245 - . 089329
d87 | - . 1037712 . 0213654 - 4. 86 0. 000 - . 1456465 - . 0618959
d88 | - . 1589341 . 0180527 - 8. 80 0. 000 - . 1943168 - . 1235514
d89 | - . 1880994 . 0183416 - 10. 26 0. 000 - . 2240481 - . 1521506
d90 | - . 0650253 . 0190922 - 3. 41 0. 001 - . 1024454 - . 0276052
d91 | - . 1346326 . 0193694 - 6. 95 0. 000 - . 172596 - . 0966692
d92 | - . 0857804 . 0189153 - 4. 53 0. 000 - . 1228538 - . 048707
TI exogenous |
mr i ska_i | 39. 01854 18. 3971 2. 12 0. 034 2. 960882 75. 0762
TI endogenous |
geodi v | . 3122912 . 0505559 6. 18 0. 000 . 2132034 . 411379
- - - - - - - - - +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
si gma_u | . 09332124
si gma_e | . 12397892
r ho | . 36166897 ( f r act i on of var i ance due t o u_i )
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
not e: TV r ef er s t o t i me var yi ng; TI r ef er s t o t i me i nvar i ant .

. est st or e ht


. hausman ht f e

b = consi st ent under Ho and Ha; obt ai ned f r om xt r eg
B = i nconsi st ent under Ha, ef f i ci ent under Ho; obt ai ned f r om xt ht ayl or

Test : Ho: di f f er ence i n coef f i ci ent s not syst emat i c

chi 2( 11) = ( b- B) ' [ ( V_b- V_B) ^( - 1) ] ( b- B)
= 3. 31
Pr ob>chi 2 = 0. 9859
The dynamic panel-data model
The dynamic panel-data model
Simple dynamic panel-data model:
y
it
= y
i ,t 1
+
i
+
it
, i = 1, 2, . . . , N; t = 1, 2, . . . , T.
We assume:

Initial conditions y
i 0
, i = 1, 2, . . . , N are known.

E(
it
) = 0 i , t

E(
it

js
) =
2

if i = j , t = s

E(
it

js
) = 0 otherwise

E(
i

it
) = 0i , t .
By continuous substitution:
y
it
=
it
+
i ,t 1
+
2

i ,t 2
+ +
t 1

i 1
+
1
t
1

i
+
t
y
i 0
.
OLS and Fixed-effect estimators
The Within estimator is:
=

N
i =1

T
t =1
(y
it

y
i
)(y
i ,t 1

y
i ,1
)

N
i =1

T
t =1
(y
i ,t 1

y
i ,1
)
2
,

i
=

y
i

y
i ,1
,
where

y
i
=
1
T
T

t =1
y
it
,

y
i ,1
=
1
T
T

t =1
y
i ,t 1
,
i
=
1
T
T

t =1

it
.
Also,
= +
1
NT

N
i =1

T
t =1
(
it

i
)(y
i ,t 1

y
i ,1
)
1
NT

N
i =1

T
t =1
(y
i ,t 1

y
i ,1
)
2
,
OLS and Fixed-effect estimators
This estimator exists if denominator = 0 and is consistent if
numerator converges to 0.

Numerator:
plim
N
1
NT
N,T

i ,t
(y
i ,t 1

y
i ,1
)(
it

i
) = plim
1
N
N

i =1

y
i ,1

i
because
it
not serially correlated and uncorrelated with
i
.
We use

y
i ,1
=
1
T
T

t =1
y
i ,t 1
=
1
T
_
1
T
1
y
i 0
+
(T 1) T +
T
(1 )
2

i
+
1
T1
1

i 1
+
1
T2
1

i 2
+ +
i ,T1
_
.
OLS and Fixed-effect estimators
We have
plim
1
N
N

i =1

y
i ,1

i
= plim
_
1
N
N

i =1

i
1
T
_
T1

t =1
1
Tt
1

it
__
= plim
_
1
N
N

i =1
_
1
T
T

t =1

it
_
1
T
_
T1

t =1
1
Tt
1

it
__
=

2

T
2
_
(T 1) T +
T
(1 )
2
_
.
OLS and Fixed-effect estimators

Denominator :
plim
1
NT
N,T

i ,t
(y
i ,t 1

y
i ,1
)
2
=

2

1
2
_
1
1
T

2
(1 )
2

(T 1) T +
T
T
2
_
Forming the ratio of these two terms, the asymptotic bias is
plim
N
( ) =
1 +
T 1
_
1
1
T
1
T
1
_

_
1
2
(1 )(T 1)
_
1
1
T
T(1 )
__
1
= O(1/T).
Simulation of the Fixed-effect bias
Table: Asymptotic bias in Fixed-Effects DPD estimator
T Bias Percent
0.2 6 -0.2063 -103.1693
8 -0.1539 -76.9597
10 -0.1226 -61.3139
20 -0.0607 -30.3541
40 -0.0302 -15.0913
0.5 6 -0.2756 -55.1282
8 -0.2049 -40.9769
10 -0.1622 -32.4421
20 -0.0785 -15.6977
40 -0.0384 -7.6819
0.7 6 -0.3307 -47.2392
8 -0.2479 -35.4084
10 -0.1966 -28.0912
20 -0.0938 -13.3955
40 -0.0449 -6.4114
0.9 6 -0.3939 -43.7633
8 -0.3017 -33.5179
10 -0.2432 -27.0248
20 -0.1196 -13.2934
40 -0.0563 -6.2561
OLS and Fixed-effect estimators
The OLS estimator is
=

N
i =1

T
t =1
y
it
y
i ,t 1

N
i =1

T
t =1
y
2
i ,t 1
= +

N
i =1

T
t =1
(
i
+
it
)y
i ,t 1

N
i =1

T
t =1
y
2
i ,t 1
.
We show that
plim
N
1
NT
N

i =1
T

t =1
y
2
i ,t 1
=
1
2T
T(1
2
)
.

N
i
y
2
i 0
N
+

2

(1 )
2
.
1
T
_
T 2
1
T
1
+
1
2T
1
2
_
+
2
T(1 )
_
1
T
1

1
2T
1
2
_
Cov(y
i 0
,
i
)
+

2

T(1
2
)
2
_
(T 1) T
2
+
2T
_
OLS and Fixed-effect estimators
and plim
N
1
NT
N

i =1
T

t =1
(
i
+
it
)y
i ,t 1
=
1
T
1
T
1
Cov(y
i 0
,
i
)
+
1
T

(1 )
2
_
(T 1) T +
T
_
,
Bias depends on initial conditions y
i 0
(constant or random).
The role of initial conditions
Two equivalent specications of the model:
(A) y
it
= y
i ,t 1
+ x
it
+ z
i
+
i
+
it
,
(B)
w
it
= w
i ,t 1
+ x
it
+ z
i
+
it
,
y
it
= w
it
+
i
.
The Hsiao analysis

Model (A): y
it
is driven by unobserved characteristics
i
,
different across units, in addition to x
it
and z
i
.

Model (B): dynamic process w


it
independent from
individual effects
i
.

Conditional on exogenous x
it
and z
i
, w
it
are driven by
identical processes with i.i.d. shocks
it
.

But observed value y


it
is shifted by individual-specic effect

i
.
Possible interpretation: w
it
is a latent variable, y
it
is observed,
and
i
is a time-invariant measurement error.
The two processes are equivalent because w
it
is unobserved.
But assumptions (or knowledge) on initial conditions may help
to distinguish between both processes.
The Hsiao analysis
Different cases:

1/ y
i 0
xed;

2/ y
i 0
random;

2.a/ y
i 0
independent of
i
, with E(y
i 0
) =
y
0
and
Var (y
i 0
) =
2
y
0
;

2.b/ y
i 0
correlated with
i
, with Cov(y
i 0
,
i
) =
2
y
0
;

3/ w
i 0
xed;

4/ w
i 0
random;

4.a/ w
i 0
random with common mean
w
and variance

/(1
2
) (stationarity assumption);

4.b/ w
i 0
random with common mean
w
and arbitrary
variance
2
w0
;

4.c/ w
i 0
random with mean
i 0
and variance
2

/(1
2
)
(stationarity assumption);

4.d/ w
i 0
random with mean
i 0
and arbitrary variance
2
w0
.
The Hsiao analysis
Table: Properties of the MLE for dynamic panel data models
Parameters N xed, T T xed, N
Case 1: y
i 0
xed
, ,
2

Consistent Consistent
,
2

Inconsistent Consistent
Case 2.a: y
i 0
random, y
i 0
ind. of
i
, ,
2

Consistent Consistent

y
0
, ,
2

,
2
y
0
Inconsistent Consistent
Case 2.b: y
i 0
correlated with
i
, ,
2

Consistent Consistent

y
0
, ,
2

,
2
y
0
, Inconsistent Consistent
Case 3: w
i 0
xed
, ,
2

Consistent Inconsistent
w
i 0
, ,
2

Inconsistent Inconsistent
Case 4.a: w
i 0
random, mean
w
, variance
2

/(1
2
)
, ,
2

Consistent Consistent

w
, ,
2

Inconsistent Consistent
Case 4.b: w
i 0
random, mean
w
, variance
2
w
0
, ,
2

Consistent Consistent

w
0
, ,
2

,
w
Inconsistent Consistent
Case 4.c: w
i 0
random, mean
i 0
, variance
2

/(1
2
)
, ,
2

Consistent Inconsistent

i 0
, ,
2

Inconsistent Inconsistent
Case 4.d: w
i 0
random, mean
i 0
, variance
2
w
0
, ,
2

Consistent Inconsistent

i 0
,
2

,
2
w
0
Inconsistent Inconsistent
An estimator based on rst-difference
(Anderson-Hsiao)
We may consider IV estimation as an alternative to
Fixed-effects, OLS or GLS estimation procedures.
Simple model without exogenous regressors:
y
it
= y
i ,t 1
+
i
+
it
.
Here, lagged dependent variable y
i ,t 1
is correlated by
construction with
i
.
Transform the model in rst-difference to eliminate individual
effects
i
:
y
it
y
i ,t 1
= (y
i ,t 1
y
i ,t 2
) +
it

i ,t 1
or
y
it
= y
i ,t 1
+
it
.
But
i ,t 1
is still correlated with y
i ,t 1
, and we must be sure that
E
_

it
y
i ,t 1
_
= 0.
An estimator based on rst-difference
(Anderson-Hsiao)
Instrumental-variable procedure:
Uses the fact that valid instruments are

correlated with y
i ,t 1
y
i ,t 2

not correlated with


it

i ,t 1
Anderson-Hsiao procedure: use either

y
i ,t 2
y
i ,t 3
or

y
i ,t 2
as instrument.
An estimator based on rst-difference
(Anderson-Hsiao)
We have:

E[y
i ,t 2
(
it

i ,t 1
)] = E(
i ,t 2

it
) E(
i ,t 2

i ,t 1
) = 0

E[(y
i ,t 2
y
i ,t 3
)(
it

i ,t 1
)] =
E[
i ,t 2
(
it

i ,t 1
)] E[
i ,t 3
(
it

i ,t 1
)] = 0

E[y
i ,t 2
(y
i ,t 1
y
i ,t 2
)] = 0 E(
2
i ,t 2
) =
2

E[(y
i ,t 2
y
i ,t 3
)(y
i ,t 1
y
i ,t 2
)] = 0 E(
2
i ,t 2
) =
2

An estimator based on rst-difference


(Anderson-Hsiao)
This IV estimator is consistent if N and/or T :
=

N
i =1

T
t =3
(y
it
y
i ,t 1
)(y
i ,t 2
y
i ,t 3
)

N
i =1

T
t =3
(y
i ,t 1
y
i ,t 2
)(y
i ,t 2
y
i ,t 3
)
or =

N
i =1

T
t =3
(y
it
y
i ,t 1
)y
i ,t 2

N
i =1

T
t =3
(y
i ,t 1
y
i ,t 2
)y
i ,t 2
.
Two drawbacks:

In the IV procedure, variance-covariance matrix is


restricted

Only one instrument is used (either y


i ,t 2
or y
i ,t 2
y
i ,t 3
).
An estimator based on rst-difference
(Anderson-Hsiao)
Consider a more general dynamic model:
y
it
= y
i ,t 1
+ x
it
+ z
i
+
i
+
it
.
IV estimation steps:

Step 1. Model in rst difference


(y
it
y
i ,t 1
) = (y
i ,t 1
y
i ,t 2
) +(x
it
x
i ,t 1
) +
it

i ,t 1
.
Use Anderson-Hsiao instrument y
i ,t 2
or (y
i ,t 2
y
i ,t 3
) to
estimate , with IV procedure

Step 2. Substitute and



in Between equation:

y
i

y
i ,1

x
i

= z
i
+
i
+
i
, i = 1, 2, . . . , N,
and estimate by OLS.

Step 3. Estimate variance components:



2

=
1
2N(T1)

N
i =1

T
t =1
_
(y
it
y
i ,t 1
) (y
i ,t 1
y
i ,t 2
)
(x
it
x
i ,t 1
)

_
2
,

2

=
1
N

N
i =1
_

y
i

y
i ,1
z
i

x
i

_
2

1
T

2

,
Convergence of this IV estimator :

IV estimates of , and
2

are consistent when N or T

IV estimates of and
2

are consistent only if T , but


not consistent when T is xed and N .
The Arellano-Bond estimator
First-difference (FD) the model and use past realizations of the
dependent variable as instruments for the transformed
dependent variable.
Let u
it
=
i
+
it
The FD model is :
y
it
y
i ,t 1
= (y
i ,t 1
y
i ,t 2
) +
it

i ,t 1
y
it
= y
i ,t 1
+
it
.
Assume

B1: E(
i
) = 0,

B2: E(
it
) = 0,

B3: E(
it

i
) = 0 for all i and for all t ,

B4: E(
it

is
) = 0 for i = 1, . . . , N and t = s.

B5: E(y
i 1

it
) = 0 for i = 1, . . . , N and t = 2, . . . , T.
The Arellano-Bond estimator
Let u
i
= (u
i 3
, u
i 4
, . . . , u
iT
)

.
Under assumptions B1-B5, we have m
d
= 0.5(T 1)(T 2)
orthogonality conditions (or moment conditions), which are
linear in :
E(y
i ,t s
u
it
) = 0 for t 3 and 2 s t 1. (1)
The full set of moment conditions can be written in a more
compact form:
E(Z

di
u
i
) = 0,
where Z
di
is the (T 2) m
d
matrix:
Z
di
=
_

_
y
i 1
0 0 . . . 0 . . . 0
0 y
i 1
y
i 2
. . . 0 . . . 0
.
.
.
.
.
.
.
.
. . . .
.
.
. . . .
.
.
.
0 0 0 . . . y
i 1
. . . y
i ,T2
_

_
The Arellano-Bond estimator
The GMM (Generalized Method of Moments) estimator builds
on these moment conditions to minimize u

Z
d
W
N
Z

d
u using
the metric W
N
,
where

d
: m
d
N(T 2) matrix, (Z

d1
, Z

d2
, . . . , Z

dN
)

: N(T 2) vector (u

1
, u

2
, . . . , u

N
)
The FD-GMM of is:

d
= (y

1
Z
d
W
N
Z

d
y
1
)
1
y

1
Z
d
W
N
Z

d
y,
where

i
: T 2 vector (y
i 3
, y
i 4
, . . . , y
iT
)

i ,1
: T 2 vector (y
i 2
, y
i 3
, . . . , y
i ,T1
)

y and y
1
: vectors of pooled observations on all
individuals.
The Arellano-Bond estimator
Different weighting matrices W
N
will produce consistent
estimates for large N and xed T.
In general, optimal weighting matrix is:
W
N
=
_
1
N
N

i =1
Z

di

u
i

i
Z
di
_
1
where

u
i
: residuals obtained from a rst-stage consistent
estimator.

This estimator is called two-step GMM.

Under assumptions B1-B5, the FD-GMM is asymptotically


efcient in the group of estimators building on linear
moment conditions.
The Arellano-Bond estimator
Remark: usual choice of rst-step weighting matrix is
W
N
= (N
1
N

i =1
Z

i
HZ
i
)
1
where H is the (T 2) (T 2) matrix:
H =
_
_
_
_
_
_
_
2 1 0 . . . 0
1 2 1 . . . 0
0 1 2 . . . 0
.
.
.
.
.
.
.
.
. . . .
.
.
.
0 0 0 . . . 2
_
_
_
_
_
_
_
.
The Arellano-Bond estimator
Weak instruments in a dynamic panel data model

If coefcient close to 1 and T is small, the Arellano-Bond


estimator can be biased.

Main reason: lagged variables in level (y


is
) are poor
instruments for variables (y
it
is close to 0).
Blundell and Bond (1998) propose a GMM estimator which is
improving on the standard FD-GMM estimator.
This GMM estimator combines

lags of the dependent variable in differences as


instruments of the model in levels,
and

lags of the dependent variable in levels as instruments for


the model written in differences.
Extensions
Assume further that (in addition to B1-B5):

B6: The
it
have constant variance.

B7: E(
i
y
i 2
) = 0 for i = 1, . . . , N.
Under assumptions B1-B7, the following T-2 linear moment
conditions are valid:
E(u
it
y
i ,t 1
) = 0 for t = 3, . . . , T.
The GMM estimator proposed by Blundell and Bond uses a
total of m
s
= 0.5(T + 1)(T 2) moment conditions:
E(y
i ,t s
u
it
) = 0 for t = 3, . . . , T and 2 s t 1,
E(u
it
y
i ,t 1
) = 0 for t = 3, . . . , T.
Extensions
In a more compact form:
E(Z

si
q
i
) = 0 where q
i
=
_
u
i
u
i
_
and
Z
si
=
_
Z
di
0
0 Z
li
_
=
_

_
Z
di
0 0 . . . 0
0 y
i 2
0 . . . 0
0 0 y
i 3
. . . 0
.
.
.
.
.
.
.
.
. . . . 0
0 0 0 . . . y
i ,T1
_

_
,
where Z
di
dened before and Z
li
is the instruments matrix for
the model in level.
Test of over-identifying restrictions
Standard specication test used in GMM setting:
The Sargan test (Sargan, 1958, and Hansen, 1982).
For the FD-GMM estimator:
Sar
d
=
1
N
_

Z
d
_
W
N
_
Z

u
_
,
where

W
N
: optimal weighting matrix and


u: vector of second-step residuals
If moment conditions are valid, Sar
d
is
2
(m
d
K),
with

m
d
: number of moment conditions

K : number of estimated parameters.


Procedure also works with the Blundell-Bond estimator.
Example: stock indexes
43 weekly observations on 9 stock markets: Lebanon, Egypt
(2), Bahrain, UAE, Saudi Arabia, Turkey, Jordan, Kuweit.
Period of observation: October 3, 2004 to July 24, 2005
Model 1: Simple dynamic panel on stock indexes
P
it
= P
i ,t 1
+
i
+
it
.
Model 2: Dynamic panel on stock index change rates
R
it
= R
i ,t 1
+
i
+
it
,
where R
it
=
P
it
P
i ,t 1
.
Example: stock indexes
Table: Model 1
Parameter Estimate Std. error t-Student
All time periods (43)
Constant 2.3816 1.8154 1.31
0.9323 0.0156 59.68
Sargan test
2
(801)= 355.30 (1.00)
After week 35
Constant 6.2173 5.1783 1.20
0.8802 0.0419 20.96
Sargan test
2
(65)= 77.79 (0.1328)
Weeks between 16 and 36
Constant 17.8578 4.8463 3.68
0.5927 0.0614 9.64
Sargan test
2
(77)= 113.60 (0.0042)
Example: stock indexes
Table: Model 2
Parameter Estimate Std. error t-Student
All time periods (43)
Constant 0.0297 0.0034 8.53
0.1135 0.0546 2.08
Sargan test
2
(801)= 331.66 (1.00)
After week 35
Constant 0.0215 0.0057 3.73
-0.1169 0.1052 -1.11
Sargan test
2
(65)= 71.46 (0.2720)
Weeks between 16 and 36
Constant 0.0439 0.0126 3.49
0.0007 0.0990 0.01
Sargan test
2
(77)= 88.50 (0.1744)
Discrete-choice models with panel data
A brief review of discrete-choice models
Models with qualitative variables: binary choice and multinomial
models.
For cross-section data and the binary case :
y

i
= x
i
+ u
i
, i = 1, 2, . . . , N,
y
i
= 1 if y

i
> 0,
y
i
= 0 if y

i
0,
where

i
: latent (unobserved) continuous variable

y
i
: observed variable

x
i
: 1 K vector of regressors.
Threshold 0 is arbitrary, as E(y

i
) is unknown.
A brief review of discrete-choice models
Linear Probability model
E(y
i
) = Prob(y
i
= 1) = x
i
+ u
i
.
Problem: predicted probabilility may not lie in [0, 1].
Logit model
Based on Extreme Value distribution:
Prob(y
i
= 1) = (x
i
) =
exp(x
i
)
1+exp(x
i
)
,
Prob(y
i
= 0) = 1 (x
i
) =
1
1+exp(x
i
)
Probit model
Based on Normal distribution: u
i
is N(0,
2
)
Prob(y
i
= 1) =
_
x
i

_
=
_
x
i
/

2
exp(
u
2
i
2
2
),
Prob(y
i
= 0) = 1
_
x
i

_
=
_
+
x
i
/
1

2
exp(
u
2
i
2
2
).
A brief review of discrete-choice models
Estimation method: Maximum Likelihood:

= arg max

i =1
[Prob(y
i
= 1)]
y
i
[1 Prob(y
i
= 0)]
1y
i
= arg min

i =1
F(
i
x
i
),
where

F(.): probability function ( or )


i
= 2y
i
1.
When moving to panel data, we consider u
it
=
i
+
it
, so that
Prob(y
it
= 1) = Prob(y

it
> 0) = Prob(
it
> x
it

i
)
= Prob(
it
< x
it
+
i
) = F(x
it
+
i
).
The Fixed-effect Logit estimator
Joint probability of y
i
:
Prob(y
i
) =
exp
_

i
_

T
t =1
y
it
_
+
_

T
t =1
y
it
x
it
_

T
t =1
[1 + exp(x
it
+
i
)]
.
Non linear model with xed-effects:
Maximum Likelihood only work with large T because
i
and
are not independently estimated.
Solution: consider the conditional probability of (y
1
, . . . , y
N
)
given (
1
, . . . ,
N
):

= arg max

i =1
f (y
i
|x
i
,
i
, ),
where
i
: sufcient statistic for
i
.
The Fixed-effect Logit estimator
A sufcient statistic for
i
is:
i
=

T
t =1
y
it
.
Conditional probability of y
i
given
i
is:
Prob (y
i
|
i
) =
exp
__

T
t =1
y
it
x
it
_

dB
i
exp
_

T
t =1
d
it
x
it

t
y
it
)!(T

t
y
it
)!
T!
,
where B
i
is a set of indices for individual i :
B
i
=
_
(d
i 1
, d
i 2
, . . . , d
iT
)|d
it
= 0, 1 and
T

t =1
d
it
=
T

t =1
y
it
_
.
Set B
i
: all possible combinations of y
it
for individual i with the
same number of 1s as described in

T
t
y
it
.
The Fixed-effect Logit estimator
Notes:

Groups with

T
t
y
it
= 0 or

T
t
y
it
= T contribute nothing to
the likelihood.

The second expression does not depend on and can be


dropped

To compute above probability, we have to consider for each


s all possible sequences of 0s and 1s.
Example: T = 2
Only case of interest: y
i 1
+ y
i 2
= 1.
Let

i
= 1 if (y
i 1
, y
i 2
) = (0, 1),

i
= 0 if (y
i 1
, y
i 2
) = (1, 0).
The Fixed-effect Logit estimator
Conditional probability is:
Prob(
i
= 1|y
i 1
+ y
i 2
= 1) =
Prob(
i
= 1)
Prob(
i
= 0) + Prob(
i
= 1)
=
_
exp(
i
+ y
i 2
x
i 2
)
[1 + exp(
i
+ x
i 1
)][1 + exp(
i
+ x
i 2
)]
_

_
[1 + exp(
i
+ x
i 1
)][1 + exp(
i
+ x
i 2
)]
exp(
i
+ x
i 1
) + exp(
i
+ x
i 2
)
_
=
exp(
i
+ x
i 2
)
exp(
i
+ x
i 1
) + exp(
i
+ x
i 2
)
=
exp[(x
i 2
x
i 1
)])
1 + exp[(x
i 2
x
i 1
)]
= [(x
i 2
x
i 1
)].
The Fixed-effect Logit estimator
Set of admissible sequences:
B
i
= {i |y
i 1
+ y
i 2
= 1} = {(0, 1), (1, 0)}
Conditional log-likelihood is
logL =

i B
i
{
i
log[(x
2i
x
i 1
)] + (1
i
) log{1 [(x
2i
x
i 1
)]}} .
Important note: similar to xed effects in the linear case:
rst-differences (x
i 2
x
i 1
) are computed
Only coefcients for time-varying explanatory variables are
identied.
The Random-effect Probit estimator
Consider

u
it
=
i
+
it


i
is drawn from distribution G(.)


i
and
it
are independent of the x
i
s.
Assume
Var () =
2

, Var (
it
) = 1, Corr (u
it
, u
is
) = =

2

1 +
2

.
Contribution to the likelihood of unit i is L
i
= Prob(y
i
)
=
_

i 1
x
i 1


_

iT
x
iT

f (u
i 1
, u
i 2
, . . . , u
iT
)du
i 1
du
iT
,
where


it
= 2y
it
1

f (.): joint density function of elements in u


i
.
The Random-effect Probit estimator
Integration above is difcult when T is large (T > 3)
One can work with the conditional density, because conditional
on
i
, the u
it
s are independent:
f (u
i 1
, u
i 2
, . . . , u
iT
) =
_
+

f (u
i 1
, u
i 2
, . . . , u
iT
|
i
)f (
i
)d
i
=
_
+

t =1
f (u
it
|
i
)f (
i
)d
i
,
where the density of
i
is N[0, /(1 )] (remember
=
2

/(1 +
2

)).
The Random-effect Probit estimator
Butler and Moftt (1982): we can write L
i
as
L
i
(y
i
) =
1

_
+

e
t
2
i
_
T

t =1
(
it
x
it
+
it
t
i

1
)
_
dt
i
,
which is now a one-dimensional integral that can be evaluated
numerically (Gauss-Hermite integration procedure).
Disadvantage of the method: assume a constant correlation )
across periods.
___ ____ ____ ____ ____t m
/ __ / ____/ / ____/
___/ / / ___/ / / ___/
St at i st i cs/ Dat a Anal ysi s

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
l og: E: \ dea\ panel \ 2004\ paper 31. smcl
l og t ype: smcl
opened on: 13 Apr 2004, 22: 44: 46

1 . cl ear 1 . cl ear 1 . cl ear 1 . cl ear

2 . use paper 31 2 . use paper 31 2 . use paper 31 2 . use paper 31

3 . sum 3 . sum 3 . sum 3 . sum

Var i abl e | Obs Mean St d. Dev. Mi n Max
- - - - - - - - - - - - - +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
pgn | 3892 2031. 673 507. 0337 649. 3506 4935. 065
ef f | 3892 127. 4245 124. 4005 0 1200
pk | 3892 1854. 373 8357. 252 9 270000
we | 3892 . 7526084 . 1939825 . 0755102 1
wg | 3892 . 0691366 . 1490749 0 . 9244898
wf l | 3892 . 0595062 . 1532768 0 . 8358098
wf d | 3892 . 1048921 . 1381208 0 . 8143532
wbp | 3892 . 0138567 . 0599029 0 . 7816901
l npk | 3892 7. 620966 . 2802385 6. 176086 8. 751222
l npgn | 3892 - 4. 36909 1. 362804 - 11. 26895 - . 1333181
l npf l | 3892 - 4. 396743 1. 319552 - 10. 76311 - . 1630243
l npf d | 3892 - 4. 372553 1. 268942 - 10. 34875 - . 2750275
l npbp | 3892 - 4. 37296 1. 285537 - 10. 44155 - . 1853326
annee | 3892 1989. 5 4. 031647 1983 1996
si r e | 3892 5. 64e+15 2. 28e+15 5. 48e+13 9. 98e+15
r | 3892 2. 604573 . 8067498 0 4
l ef f | 3891 4. 447666 . 9390137 2. 302585 7. 090077




4 . xt l ogi t wg l npgn l npk l npf l l npf d l ef f , i ( si r e) f e 4 . xt l ogi t wg l npgn l npk l npf l l npf d l ef f , i ( si r e) f e 4 . xt l ogi t wg l npgn l npk l npf l l npf d l ef f , i ( si r e) f e 4 . xt l ogi t wg l npgn l npk l npf l l npf d l ef f , i ( si r e) f e


not e: mul t i pl e posi t i ve out comes wi t hi n gr oups encount er ed.
not e: 197 gr oups ( 2758 obs) dr opped due t o al l posi t i ve or
al l negat i ve out comes.

I t er at i on 0: l og l i kel i hood = - 440. 50788
I t er at i on 1: l og l i kel i hood = - 244. 73554
I t er at i on 2: l og l i kel i hood = - 218. 80164
I t er at i on 3: l og l i kel i hood = - 214. 75859
I t er at i on 4: l og l i kel i hood = - 214. 58631
I t er at i on 5: l og l i kel i hood = - 214. 58586

Condi t i onal f i xed- ef f ect s l ogi t Number of obs = 1133
Gr oup var i abl e ( i ) : si r e Number of gr oups = 81

Obs per gr oup: mi n = 13
avg = 14. 0
max = 14

LR chi 2( 5) = 482. 63
Log l i kel i hood = - 214. 58586 Pr ob > chi 2 = 0. 0000

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
wg | Coef . St d. Er r . z P>| z| [ 95% Conf . I nt er val ]
- - - - - - - - - - - - - +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
l npgn | - 4. 911574 . 5046251 - 9. 73 0. 000 - 5. 900621 - 3. 922527
l npk | . 8308617 . 7184896 1. 16 0. 248 - . 577352 2. 239075
l npf l | - 1. 406169 . 6057111 - 2. 32 0. 020 - 2. 593341 - . 2189966
l npf d | 2. 446032 . 7488206 3. 27 0. 001 . 9783705 3. 913693
l ef f | . 3644786 . 6587024 0. 55 0. 580 - . 9265543 1. 655512
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


5 . xt pr obi t wg l npgn l npk l npf l l npf d l ef f , i ( si r e) r e 5 . xt pr obi t wg l npgn l npk l npf l l npf d l ef f , i ( si r e) r e 5 . xt pr obi t wg l npgn l npk l npf l l npf d l ef f , i ( si r e) r e 5 . xt pr obi t wg l npgn l npk l npf l l npf d l ef f , i ( si r e) r e

Fi t t i ng compar i son model :

I t er at i on 0: l og l i kel i hood = - 2219. 598
I t er at i on 1: l og l i kel i hood = - 1491. 5615
I t er at i on 2: l og l i kel i hood = - 1424. 133
I t er at i on 3: l og l i kel i hood = - 1421. 415
I t er at i on 4: l og l i kel i hood = - 1421. 408

Fi t t i ng f ul l model :

r ho = 0. 0 l og l i kel i hood = - 1421. 4078
r ho = 0. 1 l og l i kel i hood = - 1140. 8174
r ho = 0. 2 l og l i kel i hood = - 1016. 5969
r ho = 0. 3 l og l i kel i hood = - 942. 64415
r ho = 0. 4 l og l i kel i hood = - 892. 79813
r ho = 0. 5 l og l i kel i hood = - 857. 7847
r ho = 0. 6 l og l i kel i hood = - 832. 86653
r ho = 0. 7 l og l i kel i hood = - 814. 12095
r ho = 0. 8 l og l i kel i hood = - 804. 14302
I t er at i on 0: l og l i kel i hood = - 814. 12092
I t er at i on 1: l og l i kel i hood = - 730. 50278
I t er at i on 2: l og l i kel i hood = - 696. 05937
I t er at i on 3: l og l i kel i hood = - 679. 81218
I t er at i on 4: l og l i kel i hood = - 666. 53806
I t er at i on 5: l og l i kel i hood = - 665. 50986
I t er at i on 6: l og l i kel i hood = - 658. 13604
I t er at i on 7: l og l i kel i hood = - 657. 09612
I t er at i on 8: l og l i kel i hood = - 657. 08286
I t er at i on 9: l og l i kel i hood = - 657. 08286

Random- ef f ect s pr obi t Number of obs = 3891
Gr oup var i abl e ( i ) : si r e Number of gr oups = 278

Random ef f ect s u_i ~ Gaussi an Obs per gr oup: mi n = 13
avg = 14. 0
max = 14

Wal d chi 2( 5) = 405. 09
Log l i kel i hood = - 657. 08286 Pr ob > chi 2 = 0. 0000



- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
wg | Coef . St d. Er r . z P>| z| [ 95% Conf . I nt er val ]
- - - - - - - - - - - - - +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
l npgn | - 3. 541549 . 2524669 - 14. 03 0. 000 - 4. 036375 - 3. 046723
l npk | . 9321749 . 3466973 2. 69 0. 007 . 2526607 1. 611689
l npf l | - . 6432045 . 2752501 - 2. 34 0. 019 - 1. 182685 - . 1037243
l npf d | 2. 488594 . 3997656 6. 23 0. 000 1. 705068 3. 27212
l ef f | . 4004405 . 138137 2. 90 0. 004 . 1296969 . 6711841
_cons | - 18. 61093 3. 124295 - 5. 96 0. 000 - 24. 73443 - 12. 48742
- - - - - - - - - - - - - +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
/ l nsi g2u | 1. 970308 . 1089466 1. 756777 2. 183839
- - - - - - - - - - - - - +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
si gma_u | 2. 678224 . 1458918 2. 407017 2. 979989
r ho | . 8776442 . 0116992 . 8528055 . 8987889
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Li kel i hood r at i o t est of r ho=0: chi bar 2( 01) = 1528. 65 Pr ob >= chi bar 2 = 0. 000



6 . l og cl ose 6 . l og cl ose 6 . l og cl ose 6 . l og cl ose

l og: E: \ dea\ panel \ 2004\ paper 31. smcl
l og t ype: smcl
cl osed on: 13 Apr 2004, 22: 46: 43
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Vous aimerez peut-être aussi