eviews understanding
TRANSCRIPT
Econometric Analysis of Panel Data
• Panel Data Analysis– Random Effects• Assumptions• GLS Estimator• Panel-Robust Variance-Covariance Matrix• ML Estimator
– Hypothesis Testing• Test for Random Effects• Fixed Effects vs. Random Effects
Panel Data Analysis
• Random Effects Model
– ui is random, independent of eit and xit.
– Define it = ui + eit the error components.
' ( 1, 2,..., )
( 1,2,..., )i
it it i it i
i i i T i
y u e t T
u i N
x β
y X β i e
Random Effects Model
• Assumptions– Strict Exogeneity
• X includes a constant term, otherwise E(ui|X)=u.
– Homoschedasticity
– Constant Auto-covariance (within panels)
( | ) 0, ( | ) 0 ( | ) 0it i itE e E u E X X X
2 2 '( | )i i ii e T u T TVar ε X I i i
2 2
2 2 2
( | ) , ( | ) , ( , ) 0
( | )it e i u i it
it e u
Var e Var u Cov u e
Var
X X
X
Random Effects Model
• Assumptions– Cross Section Independence
2 2 '
1
2
( | )
0 00 0
( | )
0 0
i i ii i e T u T T
N
Var
Var
ε X I i i
ε X Ω
Random Effects Model
• Extensions– Weak Exogeneity
– Heteroscedasticity
1 2
1 2
( | , ,..., ) ( | ) 0
( | , ,..., ) 0( | ) 0
iit i i iT it i
it i i it
it it
E E
EE
x x x X
x x xx
22 2
2( | ) ( | ) it
i i
i
eit i u it i u
e
Var Var e
X X
Random Effects Model
• Extensions– Serial Correlation
– Spatial Correlation
1'
1
, it itit it i it it
i it it
e vy u e e
e v
x β
' , ,it it it it ij jt it it i itj
y w e e u v x β
Model Estimation: GLS
• Model Representation
2 2 '
2 22
2
'
,
( | )
( | )
1
i
i i i
i
i i i
i i i i i T i
i i
i i i e T u T T
e i ue i T i
e
i T T Ti
u
E
Var
TQ Q
where QT
y X β ε ε i e
ε X 0
ε X I i i
I
I i i
Model Estimation: GLS
• GLS
11 1 1 1 1
1 1
11 1 1
1
21
2 2 2
21/2
2 2
ˆ ( )
ˆ( ) ( )
1
1
i
i
N NGLS i i i i i ii i
NGLS i i ii
ei i T i
e e i u
ei i T i
e e i u
Var
where Q QT
and Q QT
β XΩ X XΩ y X X X y
β XΩ X X X
I
I
Model Estimation: RE-OLS
• Partial Group Mean Deviations' '
'
2
2 2
' '
'
( )
( )
1
( ) [(1 ) ( )]
it it it it i it
i i i i
ei
e i u
it i i it i i i i it i i
it it it
y u e
y u e
T
y y u e e
y
x β x β
x β
x x β
x β
Model Estimation: RE-OLS
• Model Assumptions
• OLS
'
' 2 2 2 2 2
' 2 2 2 2
2
2 2
( | ) 0
( | ) (1 ) (1 2 / / )
( , | ) (1 ) ( 2 / / ) 0,
: 1
it i
it i i u i i i i e e
it is i i u i i i i e
ei
e i u
E
Var T T
Cov T T t s
NoteT
x
x
x
1' 1 ' '
1 1
12 ' 1 2 '
1
2
ˆ ( )
ˆˆ ˆ ˆ( ) ( )
ˆ ˆ ˆ ˆˆ ' / ( ),
N NOLS i i i ii i
NOLS e e i ii
e
Var
NT K
β XX Xy X X X y
β XX X X
ε ε ε y Xβ
Model Estimation: RE-OLS
• Need a consistent estimator of :
– Estimate the fixed effects model to obtain– Estimate the between model to obtain– Or, estimate the pooled model to obtain– Based on the estimated large sample variances, it
is safe to obtain
2
2 2
ˆˆ 1ˆ ˆ
ei
e i uT
2ˆe2 2ˆ ˆu vT
ˆ0 1
2 2ˆ ˆe u
Model Estimation: RE-OLS
• Panel-Robust Variance-Covariance Matrix– Consistent statistical inference for general
heteroscedasticity, time series and cross section correlation.
1 1' ' ' '
1 1 1
1 1' ' '
1 1 1 1 1 1 1
ˆ ˆ ˆˆ ( ) [( )( ) ']
ˆ ˆ
ˆ ˆ
ˆˆ ˆ,
i i i i
N N Ni i i i i i i ii i i
N T N T T N Tit it it is it is it iti t i t s i t
i i i it
Var E
β β β β β
X X X ε ε X X X
x x x x x x
ε y X β
' ˆit ity x β
Model Estimation: ML
• Log-Likelihood Function
' '
2 2 '
2 2 1
( ) ( 1,2,..., )( 1, 2,..., )
~ ( , ),
1 1( , , | , ) ln 2 ln2 2 2
i i i
it it i it it it i
i i i
i i i e T u T T
ii e u i i i i i i
y u e t Ti N
iidn
Tll
x β x βy X β ε
ε 0 I i i
β y X ε ε
Model Estimation: ML
• ML Estimator
2 2 2 21
2 2 1
2 22
2
2 2' 2 '
2 2 21 1
ˆ ˆ ˆ( , , ) argmax ( , , | , )
1 1( , , | , ) ln 2 ln2 2 2
1ln 2 ln2 2
1 ( ) ( )2
i i
Ne u ML i e u i ii
ii e u i i i i i i
i e ue
e
T Tuit it it itt t
e e i u
ll
whereT
ll
T T
y yT
β β y X
β y X ε ε
x β x β
Hypothesis TestingTo Pool or Not To Pool, Continued
• Test for Var(ui) = 0, that is
– If Ti=T for all i, the Lagrange-multiplier test statistic (Breusch-Pagan, 1980) is:
, , ,( ) ( ) ( )it is i it i is it isCov Cov u e u e Cov e e
222'
1 1 2' 2
1 1
' '
ˆˆ ˆ( )1 1 ~ (1)
ˆ ˆ2 1 2 1 ˆ
ˆˆ 1 ,
ˆ
N Titi tN T
N Titi t
it it it T T T
Pooled
eI JNT NTLMT T e
where e y Ju
e ee e
βx i i
Hypothesis TestingTo Pool or Not To Pool, Continued
– For unbalanced panels, the modified Breusch-Pagan LM test for random effects (Baltagi-Li, 1990) is:
– Alternative one-side test:
22 2
1 1 1 2
21 11
ˆ1 ~ (1)
ˆ2 ( 1)
i
i
N N Ti iti i t
N TNiti i i ti
T eLM
eT T
0~ (0,1)
: Pr ( )n
LM N under H
P Value z LM
Hypothesis TestingTo Pool or Not To Pool, Continued
• References– Baltagi, B. H., and Q. Li, A Langrange Multiplier Test for the Error
Components Model with Incomplete Panels, Econometric Review, 9, 1990, 103-107.
– Breusch, T. and A. Pagan, “The LM Test and Its Applications to Model Specification in Econometrics,” Review of Economic Studies, 47, 1980, 239-254.
Hypothesis TestingFixed Effects vs. Random Effects
'0
'1
: ( , ) 0 ( )
: ( , ) 0 ( )i it
i it
H Cov u random effects
H Cov u fixed effects
x
x
Estimator Random EffectsE(ui|Xi) = 0
Fixed EffectsE(ui|Xi) =/= 0
GLS or RE-OLS(Random Effects)
Consistent and Efficient
Inconsistent
LSDV or FE-OLS(Fixed Effects)
ConsistentInefficient
ConsistentPossibly Efficient
Hypothesis TestingFixed Effects vs. Random Effects
• Fixed effects estimator is consistent under H0 and H1; Random effects estimator is efficient under H0, but it is inconsistent under H1.
• Hausman Test Statistic ' 1
2
ˆ ˆ ˆ ˆ ˆ ˆ( ) ( )
ˆ ˆ ˆ~ (# ), # # ( )
RE FE RE FE RE FE
FE FE RE
H Var Var
provided no intercept
β β β β β β
β β β
Hypothesis TestingFixed Effects vs. Random Effects
• Alternative (Asym. Eq.) Hausman Test– Estimate any of the random effects models
– F Test that = 0
' ' ' '
' ' '
' ' '
' ' '
( ) ( ) ( )
( , random effects model : ( ) )
( ) ( )
( ) ( )
it i it i it i it
it it it i it
it i it i i it
it i it i it it
y y e
or y e
y y e
y y e
x x β x x γ
x β x x γ
x x β x γ
x x β x γ
0 0: 0 : ( , ) 0i itH H Cov u γ x
Hypothesis TestingFixed Effects vs. Random Effects
• Ahn-Low Test (1996)– Based on the estimated errors (GLS residuals) of
the random effects model, estimate the following regression:
2 2
ˆ ˆ( )
~ (# )it it i i itX X X e
NTR
β γ
γ
Hypothesis TestingFixed Effects vs. Random Effects
• References– Ahn, S.C., and S. Low, A Reformulation of the Hausman Test for
Regression Models with Pooled Cross-Section Time-Series Data, Journal of Econometrics, 71, 1996, 309-319.
– Baltagi, B.H., and L. Liu, Alternative Ways of Obtaining Hausman’s Test Using Artificial Regressions, Statistics and Probability Letters, 77, 2007, 1413-1417.
– Hausman, J.A., Specification Tests in Econometrics, Econometrica, 46, 1978, 1251-1271.
– Hausman, J.A. and W.E. Taylor, Panel Data and Unobservable Individual Effects, Econometrics, 49, 1981, 1377-1398.
– Mundlak, Y., On the Pooling of Time Series and Cross-Section Data, Econometrica, 46, 1978, 69-85.
Example: Investment Demand
• Grunfeld and Griliches [1960]
– i = 10 firms: GM, CH, GE, WE, US, AF, DM, GY, UN, IBM; t = 20 years: 1935-1954
– Iit = Gross investment
– Fit = Market value
– Cit = Value of the stock of plant and equipment
it i it it itI F C