Panel Data Models

Panel Data Models
Econometric Analysis
Dr. Keshab Bhattarai
Hull Univ. Business School
March 28, 2011
Dr. Bhattarai
(Hull Univ. Business School)
Panel Data Models
March 28, 2011
1 / 54
Panel Data
for i = 1,. . . .N countries and t = 1,. . . .,T years
Table: Structure of Panel Data
Dependent Variable
y1,1
.
y1,T
y2,1
.
y2,T
.
yN ,1
.
y2,T
Dr. Bhattarai
(Hull Univ. Business School)
Explanatory Variable
x1,1
.
x1,T
x2,1
.
x2,T
.
xN ,1
.
x2,T
Panel Data Models
Random Error
e1,1
.
e1,T
e2,1
.
e2,T
.
e,1
.
e2,T
March 28, 2011
2 / 54
Advantages of Panel Data Model
Large number of observations over individuals and time make
estimates more e¢ cient and asymptotically consistent.
Possible to check individual and time e¤ects in a regression.
Very inclusive and comprehensive, state and space dimensions.
Can use vast amount of information from census, household surveys,
…rm or country wise statistics.
Background for testing economic theories at micro as well as macro
level.
Dr. Bhattarai
(Hull Univ. Business School)
Panel Data Models
March 28, 2011
3 / 54
Recent literature on Panel Data Model
Theory of Panel Data Estimation
Pooling time sereis and cross section: SUR
Between and Within E¤ects
Fixed and Random E¤ect Models
Dynamic Panel
Panel Unit Root and Panel Cointegration
Panel Data Model for Limited Dependent Variables
Lessons from Static and Dynamic Panel data Models
Economic Growth of Countries around the World:
Unemployment-in‡ation Trade-o¤s in OECD Countries
Dr. Bhattarai
(Hull Univ. Business School)
Panel Data Models
March 28, 2011
4 / 54
Pooling Cross Section and Time Series: Seemming
Unrelated Regression (SUR) MODEL
SUR if formed by stacking models
Y1 = X1 β + e1
(1)
Y2 = X2 β + e2
(2)
...
(3)
Ym = Xm β + em
(4)
There are m equations and T observations in the SURE system (in growth
rate example we have 151 countries and 31 observations). They can be
stacked into one large equation system as following.
Dr. Bhattarai
(Hull Univ. Business School)
Panel Data Models
March 28, 2011
5 / 54
Pooling Cross Section and Time Series: Seemming
Unrelated Regression (SUR) MODEL
There are m equations and T observations in the SURE system (in growth
rate example we have 151 countries and 31 observations). They can be
stacked into one large equation system as following.
3
2
2
3 2
3
e1
Y1
X1 0
. . 0
β1
6 e2 7
6 Y2 7 6 0 X2 . . 0 7 β
7
6
6
7 6
7 2
6
7
6 . 7=6 .
. X3 . 0 7
(5)
6
7 6
7 . +6 . 7
5
4
4 . 5 4 .
5
.
.
.
. . .
βm
em
Ym
0
0
. . Xm
Each Ym and em has a dimension of T by 1 and Xm has T by K
dimension and each βm has K by 1 dimension. The covariance matrix
of errors has TM by TM dimension.
Dr. Bhattarai
(Hull Univ. Business School)
Panel Data Models
March 28, 2011
6 / 54
Seemming Unrelated Regression (SUR) MODEL:
Assumptions
Mean of ei ,t is zero for every value of , E (ei ,t ) = 0
variance of ei ,t is constant for every ith observation, var (e1t ) = σ2i
cov (ei ,t , ei ,s ) = 0 for al t=s; this also means there is no
autocorrelation
All of the above assumptions are standard to the OLS assumptions.
The major di¤erence lies on assumption of contemporaneous
correlation across the disturbance terms in above two models.
cov (ei ,t , ej ,s ) = σ2i ,j The systems are related due to errors.
Dr. Bhattarai
(Hull Univ. Business School)
Panel Data Models
March 28, 2011
7 / 54
Variance Covariance Structure in SUR MODEL
Dimension of each of the σi ,j , like that of the identity matrix I, is T
by T, and re‡ects the variance covariance matrix of the stacked
regression.
The Kronnecker product Σ
matrix.
I is a short way of writing this covariance
Σ is the variance covariance matrix
is the symbol for the Kronnecker product
I is Identity Matrix with T M by T M dimension.
Dr. Bhattarai
(Hull Univ. Business School)
Panel Data Models
March 28, 2011
8 / 54
Pooling Cross Section and Time Series: Seemming
Unrelated Regression (SUR) MODEL
2
e1
6 e2
6
ee 0 = 6 .
4 .
em
3
7
7
7
5
e1
2
e2
var (e1 )
6 cov (e1 e2 )
6
E (ee 0) = 6 cov (e1 e3 )
4 cov (e e )
1 4
cov (e1 e5 )
Dr. Bhattarai
(Hull Univ. Business School)
.
2
em
e12
6 e1 e2
6
=6
6 e1 e3
4 e1 e4
e1 e5
e1 e2
e22
e2 e3
e4 e2
e5 e2
cov (e1 e2 )
var (e2 )
cov (e2 e3 )
cov (e4 e2 )
cov (e5 e2 )
cov (e1 e3 )
cov (e2 e3 )
var (e3 )
cov (e4 e3 )
cov (e5 e3 )
cov (e1 e4 )
cov (e2 e4 )
cov (e3 e4 )
var (e4 )
cov (e5 e4 )
.
Panel Data Models
e1 e3
e2 e3
e32
e4 e3
e5 e3
e1 e4
e2 e4
e3 e4
e42
e5 e4
e1 e5
e2 e5
e4 e5
e4 e5
e52
3
cov (e1 e5 )
cov (e2 e5 ) 7
7
cov (e4 e5 ) 7
cov (e4 e5 ) 5
var (e5 )
3
7
7
7
7
5
March 28, 2011
(6)
(7)
9 / 54
Pooling Cross Section and Time Series: Seemming
Unrelated Regression (SUR) MODEL
2
6
6
E (ee 0) = 6
6
4
σ21
σ2,1
σ3,1
σ4,1
σ5,1
σ1,2
σ22
σ3,2
σ4,2
σ5,2
σ1,3
σ2,3
σ23
σ4,3
σ5,3
σ1,4
σ2,4
σ3,4
σ24
σ5,4
σ1,5
σ2,5
σ3,5
σ4,5
σ25
3
7
7
7=V =Σ
7
5
I
(8)
Application of the OLS technique individual equations generates
inconsistent results. Sure method aims to correct this problem by
estimating all equations simultaneously.
The SURE method is essentially a generalised least square estimator. Note
V
Dr. Bhattarai
(Hull Univ. Business School)
1
=Σ
1
Panel Data Models
I
(9)
March 28, 2011
10 / 54
Pooling Cross Section and Time Series: Seemming
Unrelated Regression (SUR) MODEL
Aitken generalised least square
b
β = X 0V
1
X
2
6
6
6
b
β=6
6
4
1
X 0V
0
σ1,1 X 1 X 1
0
σ2,1 X 2 X 1
0
σm,1 X m X 1
1
Y = X0 Σ
0
σ1,1 X 1 X 2
0
σ2,2 X 2 X 2
0
σm,2 X m X 2
1
0
σ1,1 X 1 X 3
0
σ2,3 X 2 X 3
0
σm,3 X m X 3
I X
0
σ1,m X 1 X m
0
σ2,m X 2 X m
0
σm,4 X m X m
1
X0 Σ
32
76
76
7
76
76
54
1
0
∑ σ1,j X 1 Y j
0
∑ σm,j X m Y j
I Y (10)
3
7
7
7
7
5
(11)
Steps for SUR Estimation
Estimate each equation separately using the least square technique.
Use the least square residuals from step 1 to estimate the error term.
Use the estimates from the second step to estimate two equations
jointly within a generalised least square framework. If m=2 the
variance covariance matrix will be as given below.
Dr. Bhattarai
(Hull Univ. Business School)
Panel Data Models
March 28, 2011
11 / 54
Estimation of Seemming Unrelated Regression (SUR) by
GLS
Ω=
σ21 σ1,2
σ2,1 σ22
(12)
Using a theorem in matrix algebra W can be decomposed into two
parts as
P 0P = Ω
1
(13)
Use this partition of Ω to transform the original model as
Y = Xβ+ε
βOLS = X 0 X
Dr. Bhattarai
(Hull Univ. Business School)
1
Panel Data Models
(14)
X 0Y
(15)
March 28, 2011
12 / 54
Estimation of Seemming Unrelated Regression (SUR) by
GLS
Transform it to
P 0Y = P 0X β + P 0ε
(16)
Y = X β+ε
(17)
βGLS = X 0 P 0 PX
1
X 0 P 0 PY
(18)
1
X 0Ω
(19)
In matrix notation
βGLS = X 0 Ω
1
X
1
Y
Ω 1 is inverse of variance covariance matrix.
The GLS estimates are best, linear and unbiased estimators of the
coe¢ cients in the SURE system.
Dr. Bhattarai
(Hull Univ. Business School)
Panel Data Models
March 28, 2011
13 / 54
Total E¤ect
T N
∑∑ Xi ,t
βOLS =
X
t i
T N
Yi ,t
Y
=
∑∑ Xi ,t
X
t i
Xi ,t
X
tx ,y
tx ,x
(20)
T N
tx ,y =
∑∑
t
Xi ,t
Xi + Xi
T N
tx ,y
=
∑∑
t
X
Yi +Yi
Yi ,t
Y
(21)
i
N
Xi ,t
i
Xi
Yi ,t
Yi + T∑ Xi
X
Yi
Y
i
= Wx ,y + bx ,y
Dr. Bhattarai
(Hull Univ. Business School)
(22)
Panel Data Models
March 28, 2011
14 / 54
Within and between e¤ects
Between group e¤ect
T
βb =
bx ,y
=
bx ,x
∑ Xi ,t
Xi
t
Yi
Yi ,t
(23)
T
∑ Xi ,t
t
Xi
2
Within group e¤ect
N
βW
Wx ,y
=
=
Wx ,x
∑ Xi ,t
Xt
∑ Xi ,t
βOLS tx ,x = tx ,y = Wx ,y + bx ,y = βW
(Hull Univ. Business School)
Yt
(24)
T
t
Dr. Bhattarai
Yi ,t
i
Xt
2
Wx ,x
bx ,x
+ βb
(25)
Wx ,y + bx ,y
Wx ,y + bx ,y
Panel Data Models
March 28, 2011
15 / 54
Recent literature on Panel Data Model
Wallace and Hussain (1969), Balestra and Nerlove (1966), Hausman
(1978), Chamberlain (1984), Arulampalam and Booth(1998), Blundell and
Smith (1989),Chesher (1984) , Hansen (1982), Hausman (1978),
Heckman (1979), Im, Pesaran and Shin (2003), Imbens and Lancaster
(1994), Keifer (1988), Kao (1999), Kwaitkowski, Phillips, Schmidt and
Shin (1992), Larsson, Lyhagen and Lothgren (2001) Levin, Lin and Chu
(2002), Pedroni (1999), Pesaran and Smith (1995) Phillips (1987),
McCoskey and Kao (1999), Johansen Soren (1988), Johansen Soren
(1988) Staigler Stock (1997), Lancaster (1979) Lancaster and Chesher
(1983) Zellner A. (1985), Weidmeijer (2005). Similarly there are number
of excellent texts Baltagi, B.H. (1995), Davidson R and MacKinnon J. G.
(2004) ,Greene W. (2000) ,Hsiao Cheng (1993) Lancaster (1990) Ruud P.
A. (2000) Verbeek (2004) Wooldridge (2002),
Dr. Bhattarai
(Hull Univ. Business School)
Panel Data Models
March 28, 2011
16 / 54
Panel Data: Fixed E¤ects
yi ,t = αi + xi ,t β + ei ,t
IID 0, σ2e
ei ,t
(26)
where parameter αi picks up the …xed e¤ects that di¤er among individuals
but constant over time,β is the vector of coe¢ cients on explanatory
variables. These parameters can be estimated by OLS when N is small but
not when that is large.
The model need to be transformed to the least square dummy variable
method when N is too large. For this take time average
y i = α i + x i β + ei
yi = T
1
∑yi ,t
(27)
i
Take the mean di¤erence
yi ,t
y i = (xi ,t
x i ) β + (ei ,t
ei )
(28)
…xed e¤ect least square dummy variable estimator of β is
Dr. Bhattarai
(Hull Univ. Business School)
Panel Data Models
March 28, 2011
17 / 54
Panel Data Model: Fixed E¤ect
…xed e¤ect least square dummy variable estimator of β is
T N
βFE =
∑∑ (xi ,t
t
x i ) (xi ,t
xi )
i
0
!
1
T N
∑∑ (xi ,t
t
x i ) (yi ,t
y i )0
i
(29)
αi = y i
x i βFE
(30)
These estimators are unbiased, consistent and e¢ cient with corresponding
covariance matrix given by:
cov ( βFE ) =
where
Dr. Bhattarai
σ2e =
σ2e
T N
1
y
∑
N (T 1 ) ∑ ( i ,t
t i
(Hull Univ. Business School)
T N
∑∑ (xi ,t
t
x i ) (xi ,t
i
αi
xi )
0
!
1
(31)
xi ,t βFE )
Panel Data Models
March 28, 2011
18 / 54
Panel Data Model: Fixed E¤ect in Matrix Notation
yi = i αi + X i β + ei
2
6
6
6
6
4
Y1
Y1
.
.
YN
3
2
7 6
7 6
7=6
7 6
5 4
I 0 . . 0
0 I . . 0
. . I . 0
. . . . .
0 0 . . I
Y =
3
7
7
7
7
5
2
X1
Y1
6
Y1
6 X1
. +6
6 .
4 .
.
YN
XN
d1 d2 . . dN
X
(32)
3
2
6
7
6
7
7β+6
6
7
4
5
e1
e1
.
.
eN
3
7
7
7
7
5
α
β
(34)
Y = Dα + X β + e
Dr. Bhattarai
(Hull Univ. Business School)
Panel Data Models
(33)
(35)
March 28, 2011
19 / 54
Panel Data Model: Fixed E¤ect in Matrix Notation
This can be easily estimated by the OLS when the number of cross section
units are small. Many panel data studies have much larger observations. It
results in over parameterisation and loss of degree of freedom. For this the
model is transformed by a projection matrix
Md = I
Md Y = IDα
2
6
6
6
Md = 6
6
6
4
Dr. Bhattarai
M0 0
.
0
. M0
.
0
.
0 M0 0
.
.
. M0
.
0
.
0
.
.
.
.
(Hull Univ. Business School)
D D 0D D 0
(36)
Md X β + Md e
(37)
. 0
. 0
. 0
. .
. 0
. M0
3
7
7
7
7 wehre M 0 = IT
7
7
5
Panel Data Models
1 0
ii
T
March 28, 2011
(38)
20 / 54
Panel Data Model: Fixed E¤ect in Matrix Notation
Multiplying any variable by M 0 is equivalent taking deviation from the
mean ie
M 0 Xi = Xi
Xi
(39)
Y = Dα + X β + e
α = D 0D
1
D (Y
(40)
Xb )
var (b ) = s 2 X 0 Md X
(41)
1
(42)
and
T N
2
s =
Dr. Bhattarai
(Hull Univ. Business School)
∑∑ (yi ,t
αi
xi ,t b )
NT
N
K
t i
Panel Data Models
(43)
March 28, 2011
21 / 54
Panel Data Model: Random E¤ect
Random e¤ect models are more appropriate for analysing determinants of
growth as
yi ,t = µ + xi ,t β + αi + ei ,t
(44)
where αi ~ IID 0, σ2α
are individual speci…c random errors and ei ,t ~
IID 0, σ2e are remaining random errors.
α i ι T + ei
where ιT = (1, 1, .....1)
(45)
var (αi ιT + ei ) = Ω = σ2α ιT ιT0 + σ2e IT
(46)
Errors are correlated therefore this requires estimation by the Generalised
1
Least Square estimator.
Transform the
i model by pre-multiplying by Ω
h
2
σα
ι ι0
where Ω 1 = σ2e IT
σ 2 +T σ 2 T T
e
Dr. Bhattarai
(Hull Univ. Business School)
α
Panel Data Models
March 28, 2011
22 / 54
Panel Data Model: Random E¤ect
T N
βGLS
=
∑∑ (xi ,t
t
x i ) (xi ,t
∑∑ (xi ,t
Dr. Bhattarai
x i ) + ψT
i
i
i
(Hull Univ. Business School)
∑ (xi ,t
x i ) (xi ,t
N
T N
t
0
N
x i ) (yi ,t
y i )0 + ψT ∑ (xi ,t
x i ) (yi ,t
xi )
1
!
y i )0 (47)
i
Panel Data Models
0
!
March 28, 2011
23 / 54
Panel Data Model: Random E¤ect
2
6
6
6
Ω=6
6
6
4
σ2α + σ2e
σ2α
.
.
.
σ2α
Ω
1
2
1
σe
=
βGLS =
∑
σ2α
σ2α + σ2e
.
.
.
σ2α
"
IT
X 0Ω
1
1
X
σ2α
.
.
.
.
σ2α
p
1
(Hull Univ. Business School)
.
σ2α
.
.
.
.
.
.
.
.
. σ2α + σ2e
#
3
7
7
7
7
7
7
5
σe
(49)
σ2e + T σ2α
∑
X 0Ω
1
(48)
Y
(50)
i
i
Dr. Bhattarai
.
.
.
.
.
.
Panel Data Models
March 28, 2011
24 / 54
Dynamic Panel Data Model: GMM Estimator
generalised method of moments (GMM) as proposed by Hansen (1982).
yi ,t = γyi ,t
1β
+ αi + ei ,t
γ<1
(51)
which generates the following estimator
T N
∑∑ (yi ,t
γFE
=
t i
y i ) (yi ,t
= T
1
1)
;
T N
∑∑ (yi ,t
y i ,t
∑yi ,t ; and
y i,
t i
yi
y i ,t
1)
1
2
=T
i
1
∑yi ,t
1
(52)
i
This is not asymptotically unbiased estimator:
Dr. Bhattarai
(Hull Univ. Business School)
Panel Data Models
March 28, 2011
25 / 54
Dynamic Panel Data Model: GMM Estimator
This is not asymptotically unbiased estimator:
T N
1
NT
∑∑ (ei ,t
t i
γFE = γ +
p lim
N !∞
=
Dr. Bhattarai
σ2e (T
T2
(Hull Univ. Business School)
1
NT
e i ) (yi ,t
y i ,t
(53)
T N
∑∑ (yi ,t
t i
1)
y i,
1)
2
T N
1
NT
∑∑ (ei ,t
t
e i ) (yi ,t
y i ,t
1)
i
1)
T γ + γT
(1
γ )2
Panel Data Models
6= 0
(54)
March 28, 2011
26 / 54
Panel Data Model: Instrumental Variables for GMM
Instrumental variable methods have been suggested to solve this
inconsistency
T N
∑∑yi ,t
b IV =
γ
2
t i
T N
(yi ,t
1
y i ,t
2)
(55)
∑∑yi ,t
(yi ,t
1
yi ,t
2)
where yi ,t 2 is used as instrument of (yi ,t
It is asymptotically
1
yi ,t
2)
p lim
N !∞
2
t i
1
NT
T N
∑∑ (ei ,t
t
e i ) yi ,t
(56)
2
i
Moment conditions with vector of transformed error terms
Dr. Bhattarai
(Hull Univ. Business School)
Panel Data Models
March 28, 2011
27 / 54
Panel Data Model: Instrumental Variables for GMM
Moment conditions with vector of transformed error terms
0
1
ei ,2 ei ,1
B ei ,3 ei ,2 C
C
B
C
.
∆ei = B
B
C
@
A
.
ei ,T ei ,T 1
Dr. Bhattarai
(Hull Univ. Business School)
Panel Data Models
(57)
March 28, 2011
28 / 54
Panel Data Model: Instrumental Variables for GMM 2
2
[yi ,0 ]
0
0
.
0
6
6
Zi = 6
6
4
0
. .
[yi ,0, yi ,1, ] 0 .
0
. .
.
. .
0
. .
n 0
o
E Zi ∆ei = 0
0
.
0
0
[yi ,0, yi ,T
3
2]
7
7
7
7
5
(59)
Or for moment estimator write the transformed errors as
n 0
o
E Zi (∆yi ,t γ∆yi ,t ) = 0
min
γ
Dr. Bhattarai
1
N
N
∑ Zi (∆yi ,t
0
i =1
(Hull Univ. Business School)
γ∆yi ,t )
!0
N
WN ∑ Zi (∆yi ,t
Panel Data Models
(58)
0
(60)
γ∆yi ,t )0
(61)
i =1
March 28, 2011
29 / 54
Panel Data Model: Instrumental Variables for GMM 2
GMM method includes the most e¢ cient instrument
N
γGMM
∑ ∆yi ,t Zi
=
i =1
N
∑ ∆yi ,t Zi
i =1
!
!
N
WN
∑ Zi ∆yi ,t
0
i =1
N
WN
∑ Zi ∆yi ,t
0
i =1
!!
1
!!
(62)
Blundell and Smith (1989) and Verbeek (2004), Wooldridge (2002) among
others have more extensive exposure in GMM estimation. The essence of
the GMM estimation remains in …nding a weighting matrix that can
guarantee the most e¢ cient estimator. This should be inversely
proportional to transformed covariance matrix.
WNopt
Dr. Bhattarai
(Hull Univ. Business School)
=
N
0
1
Zi ∆ei ,t ∆ei,,t Zi
∑
NPanel Data
i =1 Models
!
1
(63)
March 28, 2011
30 / 54
Panel Data Model: Instrumental Variables for GMM 2
Doornik and Hendry (2001, chap. 7-10) provide a procedure on how to
estimate coe¢ cients using …xed e¤ect, random e¤ect and the GMM
methods including a lagged terms of dependent variable among
explanatory variables for a dynamic panel data model:
p
yi ,t
=
∑ ak yi ,t
s
+ βt (L) xi ,t + λt + αi + ei ,t
i =1
or inshortyi ,t
= Wi δ + ι i a i + ei
(64)
The GMM estimator with instrument (levels, …rst di¤erences, orthogonal
deviations, deviations from individual means, combination of …rst
di¤erences and levels) used in PcGive is :
Dr. Bhattarai
(Hull Univ. Business School)
Panel Data Models
March 28, 2011
31 / 54
Panel Data Model: Instrumental Variables for GMM 2
The GMM estimator with instrument (levels, …rst di¤erences, orthogonal
deviations, deviations from individual means, combination of …rst
di¤erences and levels) used in PcGive is :
b
δ=
N
∑ Wi
Zi
i =1
!
N
AN
∑ Zi Wi
i =1
0
!!
1
N
∑ Wi
i =1
Zi
!
N
AN
∑ Zi yi
0
i =1
!!
(65)
N
where AN =
1
0
∑ Zi Hi Zi
is the individual speci…c weighting matrix.
i =1
Dr. Bhattarai
(Hull Univ. Business School)
Panel Data Models
March 28, 2011
32 / 54
Panel Estimation
Table: Determinants of growth rate of per capita income and Exchange Rate
Determinants
Investment ratio
Export Ratio
Exchange rate -1
Real Interest rate
Population growth rate
Constant
Nepal
India
South Africa
Brazil
UK
Japan
USA
Germany
Dr. Bhattarai
(Hull Univ. Business School)
Growth Model
Coe¢ cient
t-prob
0.1820
.00060
0.0257
.3830
-0.8849
0.1540
3.0116
0.1780
-3.0341
0.0000
-2.0244
0.0000
-5.1070
0.0000
-4.5529
0.0000
-4.5630
0.0020
-5.9846
0.0000
-3.7902
0.0000
-5.6408
0.0000
N =324
R 2 = 0.46
Panel Data Models
Exchange Rate Model
Coe¢ cient
t-value
0.9710
0.00
-0.0290
0.00
0.7917
0.00
0.3400
0.00
0.0662
0.00
0.0496
0.00
0.0709
0.00
-0.0324
0.00
0.0031
0.00
-0.0422
0.00
0.0295
0.00
-0.0074
0.00
N =312
R 2 = 0.9857
March 28, 2011
33 / 54
Panel Cointegration
Table: Cointegration Test of Growth and Exchange Rate Equations
Cointegration in Growth Model
Cointegration in Exchange rate Mo
ADF test (T=321; Constant; 5%=-2.87; 1% = -3.45)
Determinants
ADF-Statistics
Decision
ADF-Statistics
Decision
Investment ratio
-4.449**
Stationary
Export Ratio
-1.9000
Non-Stationary
Exchange rate -1
-1.510
Non-Stationary
Real Interest rate
-2.59
Non-Stationary
Population growth rate
-6.171**
Stationary
-6.171**
Stationary
Residual
-10.62**
Stationary
-4.96**
Stationary
Conclusion: Variables in both growth and exchange rates equations are cointegrated.
Dr. Bhattarai
(Hull Univ. Business School)
Panel Data Models
March 28, 2011
34 / 54
Panel Unit root test
Increasingly recent studies have looked into nonstationarity and
heterogeneity issues in panel data model. Levin and Lin (1992)
∆yi ,t = αi + ρyi ,t
n
1
+
∑ φk ∆yi ,t
1
+ δi t + θ t + ui ,t
(66)
k =1
H0 : ρ = 1 against H0 : ρ < 1
Levin, A., C. Lin and C. Chu (2002): “Unit Root Tests in Panel Data:
Asymptotic and …nite sample properties”, Journal of Econometrics, 108,
p.12-24.
IM, Pesharan and Shin (1997)
Im, K.S., M. Pesaran and Y. Shin (2003): “Testing for Unit Roots in
Heterogeneous Panels”, Journal of Econometrics, 115, p.53-74.
∆yi ,t = αi + ρyi ,t
n
1
+
∑ φi ∆yi ,t
1
+ δi t + θ t + ui ,t
(67)
k =1
Heterogeneity in unit roots: against no unit root
Dr. Bhattarai
p
(Hull Univ. Business School)
Panel
n Data Models
March 28, 2011
35 / 54
Panel Unit root test
Maddala and Wu (1999) tests for unbalanced panel
Maddala, G.S. and S. Wu (1999): “A comparative study of unit root test
with panel data and a new simple test”, Oxford Bulletin of Economics and
Statistics, 61, p.631-652.
Π=
n
2 ∑ ln π i with χ2 distribution
k =1
where π i is the probability limit of ADF test
KSSS test
T
KPSS =
S2
∑ σbt2
(69)
t =1
T
where St2 = ∑ et is the partial sum of errors in a regression of Y on an
t =1
intercept and time trend. In contrast to the unit root test this test assumes
that Y series are stationary and alternative hypothesis is nonstationarity.
Kwaitkowski, D. P.C. Phillips, P. Schmidt and Y. Shin (1992): “Testing
the null hypothesis of Stationarity against the alternative of a unit root”,
Dr. Bhattarai
(Hull Univ. Business School)
Panel Data Models
March 28, 2011
36 / 54
Panel Unit root: Kao test
Kao, C. (1999): “Spurious Regression and residual-based Tests for
Cointegration in Panel Data”, Journal of Econometrics, 90, p.1-44.
Start with yi ,t = αi + xi ,t β + ei ,t
ei ,t
IID 0, σ2e
Residual based cointegration ei ,t = ρei ,t 1 + vi ,t
T
Estimate ρ =
N
ei ,t b
ei ,t
∑ ∑b
t =1 n =1
T N
1
and
ei2,t
∑ ∑b
t =1 n =1
related t statistics tp =
Dr. Bhattarai
(Hull Univ. Business School)
1
NT
ρ 1)
(b
T
s
N
T
N
ei2,t
∑ ∑b
t =1 n =1
ei2,t b
ρb
ei2,t )
∑ ∑ (b
t =1 n =1
Panel Data Models
March 28, 2011
37 / 54
Panel Cointegration
Analytical results from a dynamic optimisation model for a global economy
show how exchange rates are determined by relative prices of trading
countries.
Prices depend on preferences on domestic and foreign goods, marginal
productivities of capital and labour as well as the relative rates of taxes
and tari¤s across two countries.
Dynamic model is solved for numerical simulation and scenario analyses.
Long run relationship obtained in the dynamic general equilibrium are
tested by the GMM estimation of dynamic panel model.
The determinants of growth of per capita output and the exchange rates
across eleven countries representing the global economy in fact validate
the conclusion of general equilibrium results.
Estimates support the standard neoclassical theory of economic growth
and uncovered interest parity theory of exchange rate though country
speci…c factors, including preferences and technology, can also have
signi…cant in‡uence in estimation of each of these models.
Dr. Bhattarai
(Hull Univ. Business School)
Panel Data Models
March 28, 2011
38 / 54
Panel Cointegration: Larsson Test:
Based their test on Johanhes’maxmimum likelihood procedure.
∆Yi ,t = Πi Yi ,t
n
1
+ ∑ Γk ∆yi ,t
k
+ ui ,t
k =1
H0 : rank (Πi ) ri < r for all i from 1 to N.
HA : rank (Πi ) = p for all i from 1 to N.
The standard rank test statistics is de…ned in terms of average of the trace
statistic for each cross section unit and mean and variance of trace
statistics.
p
N (LRNT E (Zk ))
p
(70)
LR =
var (Zt )
Dr. Bhattarai
(Hull Univ. Business School)
Panel Data Models
March 28, 2011
39 / 54
Panel Cointegration: PedroniTest
Within group tests
Panel v statistic
3
2
T 2N 2
3
T N ZvNT =
N
T
∑ ∑
t =1 n =1
L1,12
Panel ρ statistic
T
p
T
p
T
N
N
ei2,t ∆b
ei2,t
∑ ∑ L1,12 b
t =1 n =1
T N
NZ ρNT =
∑ ∑
t =1 n =1
Panel t statistic
v
u
u
Z
= t σ2
tNT
NT
T
N
∑ ∑ L1,12
t =1 n =1
Univ. Business
School)
Panel t(Hull
statistic
(parametric)
Dr. Bhattarai
T
b
ei2,t
(71)
b
ei2,t
1
L1,12
N
b
ei2,t
∑ ∑ L1,12
t =1 n =1
Panel Data Models
bi
λ
b
ei2,t ∆b
ei2,t
(72)
bi
λ
!
March 28, 2011
(73)
40 / 54
Panel Cointegration: PedroniTest
Between group tests
Group statistic
T
p
T
p
T
N∑
b
ei2,t ∆b
ei2,t
t =1
T N
NZ ρNT =
∑ ∑
b
ei2,t
t =1 n =1
Group t statistic
p
NZtNT
1
=
p
N
N∑
n =1
Group t statistic (parametric)
p
NZtNT
1
=
p
v
u
u
t σ2
N
N∑
n =1
Dr. Bhattarai
(Hull Univ. Business School)
T
T
t =1
t =1
i
v
u
u
t σ2
i
bi
λ
∑ bei2,t ∑ bei2,t ∆bei2,t
T
T
t =1
t =1
∑ bet2 ∑ bei2,t ∆bei2,t
Panel Data Models
(75)
bi
λ
(76)
bi
λ
(77)
March 28, 2011
41 / 54
Construction of Panel Data Work…le in Eviews
1. File/New/ Work…le
2. Select Balanced panel give start and end dates.
3. save this panel work …le.
For data
4. Open data …le e.g. unido_panel.csv
5. select variables and copy them in the new panel work…le.
6. Do panel tests including the panel unit root test, panel cointegration
test.
Dr. Bhattarai
(Hull Univ. Business School)
Panel Data Models
March 28, 2011
42 / 54
Panel Unit Root Test in Eviews
Panel unit root test: Summary
Series: EDU_R
Date: 04/22/10 Time: 08:55
Sample: 1971 2006
Exogenous variables: Individual effects
User-specified lags: 1
Newey-West automatic bandwidth selection and Bartlett kernel
Balanced observations for each test
Method
Statistic
Null: Unit root (assumes common unit root process)
Levin, Lin & Chu t*
-2.57787
Null: Unit root (assumes individual unit root process)
Im, Pesaran and Shin W-stat
-0.17536
ADF - Fisher Chi-square
23.2299
PP - Fisher Chi-square
28.7105
Dr. Bhattarai
(Hull Univ. Business School)
Prob.**
Crosssections
Obs
0.0050
14
476
0.4304
0.7215
0.4273
14
14
14
476
476
490
Panel Data Models
March 28, 2011
43 / 54
Panel Cointegration in Eviews
Save data in excel/csv; import in Eviews as foreign data …le/ Select Basic
structure as panel data (have panel id and year id variables in the data
…le); Quick/ Group statistics/Johansen cointegration test; then list
variables; select pedroni (Engle-Granger based) – select other
speci…cations then estimate. You get results as following.
Study the trace and max –eigen value tests.
Unrestricted Cointegration Rank Test (Trace and Maximum Eigenvalue)
Hypothesized
No. of CE(s)
Fisher Stat.*
(from trace test)
Prob.
Fisher Stat.*
(from max-eigen test)
Prob.
None
At most 1
At most 2
At most 3
72.00
27.83
20.99
32.79
0.0000
0.4735
0.8256
0.2435
65.75
22.71
17.79
32.79
0.0001
0.7477
0.9314
0.2435
Dr. Bhattarai
(Hull Univ. Business School)
Panel Data Models
March 28, 2011
44 / 54
Panel Model for Limited Dependent Variables
Panel models of limited dependent variables
yi ,t = αi + xi ,t β + ei ,t
ei ,t
IID 0, σ2e
yi ,t = 1 if yi ,t > 0 where yi ,t is a latent variable; yi ,t = 0 otherwise.
log L ( β, α1 , ..., αN ) =
∑yi ,t log F
αi + xi0,t β
i ,t
+ ∑ (1
yi ,t ) 1
log F αi + xi0,t β
(78)
i ,t
f (yi ,t , ....., yi ,T /xi ,t , ....., xi ,T , β)
=
=
Dr. Bhattarai
Z ∞
Z
∞
∞
∞
f (yi ,t , ....., yi ,T /xi ,t , ....., xi ,T , β) f (αi ) d αi
Πf (yi ,t /xi ,t , β) f (αi ) d αi
(79)
i
(Hull Univ. Business School)
Panel Data Models
March 28, 2011
45 / 54
Random E¤ect Tobit Model
yi ,t = αi + xi ,t β + ei ,t
ei ,t
IID 0, σ2e
yi ,t = 1 if yi ,t > 0 where yi ,t is a latent variable; yi ,t = 0 otherwise.
f (yi ,t , ....., yi ,T /xi ,t , ....., xi ,T , β)
=
=
Z ∞
Z
∞
∞
∞
f (yi ,t , ....., yi ,T /xi ,t , ....., xi ,T , β) f (αi ) d αi
Πf (yi ,t /xi ,t , β) f (αi ) d αi
f (yi ,t /xi ,t , β) = Φ
.......... = (1
Dr. Bhattarai
(80)
i
(Hull Univ. Business School)
xi0,t β + αi
p
1 σ2u
Φ)
!
xi0,t β + αi
p
1 σ2u
Panel Data Models
yi ,t = 1
if
!
if
yi ,t = 0
March 28, 2011
(81)
(82)
46 / 54
Dynamic Tobit Panel Model
yi ,t = αi + γyi ,t
1
+ xi0,t β + ei ,t
(83)
f (yi ,t , ....., yi ,T /xi ,t , ....., xi ,T , β)
=
=
f (yi ,t /yi ,t
Z ∞
∞
Z ∞
∞
f (yi ,t , ....., yi ,T /xi ,t , ....., xi ,T , β) f (αi ) d αi
Πf (yi ,t /yi ,t
i
1, xi ,t , β )
= Φ
.......... = (1
Dr. Bhattarai
(Hull Univ. Business School)
1, xi ,t , αi , β )
f (yi ,t /xi ,t , β) f (αi ) d αi (84)
xi0,t β + γyi ,t 1 + αi
p
1 σ2u
Φ)
!
if yi ,t = 1
xi0,t β + +γyi ,t 1 + αi
p
1 σ2u
Panel Data Models
!
(85)
if yi ,t =(86)
0
March 28, 2011
47 / 54
Estimation of Panel Data Model with BHPS in SATA
See log …le; panel.smcl
Take a cross section dataset as from the BHPS data such as qindresp.sav
determine panel id:
Command for random e¤ect: xtreg qprearn qsex qqfachi age_years, re
Random-e¤ects GLS regression Number of obs = 14910
Group variable: qdoiy4 Number of groups = 3
R-sq: within = 0.1641 Obs per group: min = 31
between = 0.9944 avg = 4970.0
overall = 0.1636 max = 14077
Random e¤ects u_i ~Gaussian Wald chi2(3) = 2915.32
Fixed e¤ect: xtreg qprearn qsex qqfachi age_years, re
Between e¤ect: xtreg qprearn qsex qqfachi age_years, be
MLE:xtreg qprearn qsex qqfachi age_years, mle
Dr. Bhattarai
(Hull Univ. Business School)
Panel Data Models
March 28, 2011
48 / 54
Estimation of Panel Data Model with BHPS in SATA
Random-e¤ects GLS regression Number of obs = 14910
Group variable: qdoiy4 Number of groups = 3
R-sq: within = 0.1641 Obs per group: min = 31
between = 0.9944 avg = 4970.0
overall = 0.1636 max = 14077
Random e¤ects u_i ~Gaussian Wald chi2(3) = 2915.32
corr(u_i, X) = 0 (assumed) Prob > chi2 = 0.0000
——————————————————————————
qprearn j Coef. Std. Err. z P>jzj [95% Conf. Interval]
— — — — -+— — — — — — — — — — — — — — — — — — — — — qsex j .3702326 .0105693 35.03 0.000 .3495171 .3909481
qqfachi j -.2928379 .0054389 -53.84 0.000 -.3034979 -.2821778
age_years j .0731788 .0149741 4.89 0.000 .0438302 .1025274
_cons j -7.350651 .0552183 -133.12 0.000 -7.458877 -7.242425
— — — — -+— — — — — — — — — — — — — — — — — — — — — sigma_u j 0
sigma_e j 1.8103504
Dr. Bhattarai
(Hull Univ. Business School)
Panel Data Models
March 28, 2011
49 / 54
Error Component Method
The error component method decomposes these errors into a common
intercept and the random part.
Thus the model will take the following form:
yi ,t = α0,i + α1,i xi ,t + ei ,t
(87)
α0,i = α1 + µi
(88)
where i =1.., N. Each cross section unit (country) had its own intercept
parameter in the pooled dummy variable model.
α1 represents the population mean intercept and µi are independent of
each error ei ,t . It has a constant mean and constant variance.
E (µi ) = 0; var (µi ) = σ2µ
yi ,t
Dr. Bhattarai
= (α1 + µi ) + α1,i xi ,t + ei ,t
= α1 + α1,i xi ,t + (ei ,t + µi ) = α1 + α1,i xi ,t + vi ,t
(Hull Univ. Business School)
Panel Data Models
March 28, 2011
(89)
(90)
50 / 54
Error Component Method
The error component include overall error and individual speci…c error , :
common and individual speci…c errors.
the compound error term has mean zero, E (vi ,t ) = 0;
its variance var (vi ,t ) = σ2µ + σ2e is homoskedastic
covar (vi ,t , vi ,s ) = σ2µ error from the same country in di¤erent periods are
correlated
covar (vi ,t , vj ,s ) = σ2µ for i=j errors from di¤erent countries are always
uncorrelated.
Like in the SURE method the generalised least square estimator, with
transformed method produces the most e¢ cient estimators or error
component model.
Dr. Bhattarai
(Hull Univ. Business School)
Panel Data Models
March 28, 2011
51 / 54
Error Component Method
The error component include overall error and individual speci…c error , :
common and individual speci…c errors.
the compound error term has mean zero, E (vi ,t ) = 0;
its variance var (vi ,t ) = σ2µ + σ2e is homoskedastic
covar (vi ,t , vi ,s ) = σ2µ error from the same country in di¤erent periods are
correlated
covar (vi ,t , vj ,s ) = σ2µ for i=j errors from di¤erent countries are always
uncorrelated.
Like in the SURE method the generalised least square estimator, with
transformed method produces the most e¢ cient estimators or error
component model.
Dr. Bhattarai
(Hull Univ. Business School)
Panel Data Models
March 28, 2011
52 / 54
References
Arulampalam W., Booth A.L., (1998), ”Learning and Earning: Do Multiple Training Events Pay?”, Journal of Economic
Literature
Blundell R W and R J. Smith (1989) Estimation in a class of simultaneous equation limited dependent variable models,
Review of Economic Studies, 56:37-38.
Chesher A (1984) Improving the e¢ ciency of Probit estimators, Review of Economic Studies,66:3:523-527.
Hansen L.P. (1982) Large sample properties of generalized method of moment estimators, Econometrica, 50:4:1029-1054.
Hausman J.A., (1978), ”Speci…cation Tests in Econometrics”, Econometrica, Vol. 46, No. 6, pp.1251-1271.
Heckman J. J., (1979), Sample Selection Bias as a Speci…cation Error, Econometrica, Vol. 47, No. 1, pp153-161.
1Im, K.S., M. Pesaran and Y. Shin (2003): “Testing for Unit Roots in Heterogeneous Panels”, Journal of Econometrics,
115, p.53-74.
Imbens G. W. and T Lancaster (1994) Combining Micro and Macro Data in Microeconometric Models, Review of
Economic Studies, 61:4:655-680.
Keifer N (1988) Economic duration data and hazard functions, Journal of Economic Literature, 26:647-679.
Kao, C. (1999): Spurious Regression and residual-based Tests for Cointegration in Panel Data, Journal of Econometrics,
90, p.1-44.
Kwaitkowski, D. P.C. Phillips, P. Schmidt and Y. Shin (1992): Testing the null hypothesis of Stationarity against the
alternative of a unit root, Journal of Econometrics, 54, p.159-178.
Larsson, R., J. Lyhagen and M. Lothgren (2001): Likelihood-based cointegration tests in heterogeneous panels,
Econometrics Journal, 4, p.109-142
Dr. Bhattarai
(Hull Univ. Business School)
Panel Data Models
March 28, 2011
53 / 54
References
Levin, A., C. Lin and C. Chu (2002): “Unit Root Tests in Panel Data: Asymptotic and …nite sample properties”, Journal
of Econometrics, 108, p.12-24.
Pedroni, P. (1999): “Critical values for cointegration tests in heterogeneous panels with multiple regressors”, Oxford
Bulletin of Economics and Statistics, 61, p.653-670.
Pesaran, M.H. and R. Smith (1995): “Estimating long-run relationships from dynamic heterogeneous panels”, Journal of
Econometrics, 68, p.79-113
Phillips P.C.B. (1987) Time Series Regression with an Unit Root, Econometrica, vol. 55, No. 2, 277-301.
McCoskey, S. and C. Kao (1999): “Testing the stability of a Production function with Urbanisation as a shift factor”,
Oxford Bulletin of Economics and Statistics, 61, p.671-690.
Johansen Soren (1988) Statistical analysis of cointegration vectors, Journal of Economic Dynamics and Control,
12:231-254, North Holland.
Johansen Soren (1988) Estimation and Hypothesis Testing of Cointegration Verctors in Gaussian Vector Autoregressive
Models, Econometrica, 59:6, 1551-1580.
Staigler D., Stock J. H., (1997), ”Instrumental Variables Regression with Weak Instruments”, Econometrica, Vol. 65, No.
3, pp.557-586.
Lancaster T and A Chesher (1983) The Estimation of Models of Labour Market Behviour Review of Economic Studies,
50:4:609-624.
Dr. Bhattarai
(Hull Univ. Business School)
Panel Data Models
March 28, 2011
54 / 54