Panel Data Analysis
Using GAUSS
4
Kuan-Pin Lin
Portland State University
Panel Data Analysis
Hypothesis Testing
Panel Data Model Specification
Pool or Not To Pool
Random Effects vs. Fixed Effects
Heterscedasticity
Time Serial Correlation
Spatial Correlation
Fixed Effects vs. Random Effects
Hypothesis Testing
yit xit' ui eit
H 0 : Cov(ui , xit' ) 0 (random effects)
H1 : Cov(ui , xit' ) 0 ( fixed effects)
Estimator
Random Effects
E(ui|Xi) = 0
Fixed Effects
E(ui|Xi) =/= 0
GLS or RE-LS
Consistent and
(Random Effects) Efficient
Inconsistent
LSDV or FE-LS
(Fixed Effects)
Consistent
Possibly Efficient
Consistent
Inefficient
Random Effects vs. Fixed 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
H βˆ RE βˆ FE Var (βˆ RE ) Var (βˆ FE ) βˆ RE βˆ FE
~ 2 (# βˆ FE ), provided # βˆ FE # βˆ RE (no intercept )
Random Effects vs. Fixed Effects
Alternative Hausman Test
(Mundlak Approach)
Estimate the random effects model with the group
means of time variant regressors:
yit xit' β xi' γ eit
F Test that g = 0
H 0 : γ 0 H 0 : Cov(ui , xit ) 0
Hypothesis Testing
Fixed Effects Model
yit xit' β ui eit yit xit' β eit
eit ~ iid (0, e2 )
where yit yit yi , xit xit xi , eit eit ei
1 T
1 T '
1 T
'
yi yit , xi xit , ei eit
T t 1
T t 1
T t 1
Random Effects Model
yit xit' β ui eit yit xit' β eit
where yit yit yi , xit xit xi , eit eit ei
1
e2
T u2 e2
Heteroscedasticity
The Null Hypothesis
H 0 : eit ~ iid (0, e2 )
Based on the auxiliary regression
eˆit2 xit' g vit
where eˆ y x' ˆ , v ~ iid (0, 2 )
it
it
it
it
v
LM test statistic is NR2 ~ 2(K), N is total number
of observation (i,t)s.
Cross Sectional Correlation
The Null Hypothesis
H 0 : Cov(eit , e jt ) 0 t
Based on the estimated correlation coefficients
ˆij
eˆ eˆ
eˆ eˆ
t it
2
t it
, i 1, 2,..., N 1; j i
jt
t
2
jt
Breusch-Pagan LM Test (Breusch, 1980)
As T ∞ (N fixed)
N ( N 1)
T ˆ ~
2
i 1 j i 1
N 1
LM BP
N
2
ij
2
Cross Sectional Correlation
Bias adjusted Breusch-Pagan LM Test (Pesaran,
et.al. 2008)
Adj
LM BP
N 1 N (T K )
ˆij2 ˆ ij
2
N (0,1) as T , then N
N ( N 1) i 1 j i 1
ˆ ij
1
trace(M i M j )
T K
ij2 Var[(T K ) ˆij2 ] a1[trace(M i M j )2 ] 2a2{trace[(M i M j )(M i M j )]}
where ˆ ij E[(T K ) ˆij2 ]
M i IT Xi ( Xi' Xi ) 1 Xi
2
(T K 8)(T K 2) 24
1
a2 3
,
a
a
,T K 8
1
2
2
(T K )
(T K 2)(T K 2)(T K 4)
Time Serial Correlation
The Model and Null Hypothesis
yit xit' eit , eit eit 1 vit , vit ~ iid (0, v2 )
H0 : 0
LM Test Statistic
2
NT eˆ 'eˆ 1
LM
ˆ ' ˆ
T 1 e e
2
2
where eˆit yit xit' ˆ
N T ˆ ˆ
2 eit eit 1
NT
i 1 Nt 2T
~ 2 (1)
T 1
ˆ2
e
it
i 1 t 1
Joint Hypothesis Testing
Random Effects and Time Serial Correlation
The Model
yit xit' eit , eit eit 1 vit
yit yit yi , xit xit xi , eit eit ei
1
e2
2
,
v
~
iid
(0,
it
v)
2
T u2 e
Joint Test for AR(1) and Random Effects
H 0 : u2 0, 0
Joint Hypothesis Testing
Random Effects and Time Serial Correlation
Based on OLS residuals εˆ y Xβˆ :
LM 0, 2 0
u
NT 2
A2 4 AB 2TB 2 ~ 2 (2)
2(T 1)(T 2)
εˆ '(I N iT iT' )εˆ
εˆ ' εˆ 1
A
1, B
εˆ ' εˆ
εˆ ' εˆ
Joint Hypothesis Testing
Random Effects and Time Serial Correlation
Marginal Tests for AR(1) & Random Effects
LM 2 0
u
Robust Test for AR(1) & Random Effects
*
LM 2 0
u
NT A2
NT 2 B 2
2
~ (1); LM 0
~ 2 (1)
2(T 1)
T 1
NT (2 B A)2
NT 2 ( B A / T )2
2
*
~ (1); LM 0
~ 2 (1)
2(T 1)(1 2 / T )
(T 1)(1 2 / T )
Joint Test Equivalence
LM 0, 2 0 LM * 0 LM 2 0 LM * 2 0 LM 0 ~ 2 (2)
u
u
u
Panel Data Analysis
Extensions
Seeming Unrelated Regression
Dynamic Panel Data Analysis
Allowing Cross-Equation Dependence
Fixed Coefficients Model
Using FD Specification
IV and GMM Methods
Spatial Panel Data Analysis
Using Spatial Weights Matrix
Spatial Lag and Spatial Error Models
References
Baltagi, B., Li, Q. (1995) Testing AR(1) against MA(1) disturbances in an
error component model. Journal of Econometrics, 68, 133-151.
Baltagi, B., Bresson, G., Pirotte, A. (2006) Joint LM test for
homoscedasticity in a one-way error component model. Journal of
Econometrics, 134, 401-417.
Bera, A.K., W. Sosa-Escudero and M. Yoon (2001), Tests for the error
component model in the presence of local misspecification, Journal of
Econometrics 101, 1–23.
Breusch, T.S. and A.R. Pagan (1980), The Lagrange multiplier test and its
applications to model specification in econometrics, Review of Economic
Studies 47, 239–253.
Pesaran, M.H. (2004), General diagnostic tests for cross-section
dependence in panels, Working Paper, Trinity College, Cambridge.
Pesaran, M.H., Ullah, A. and Yamagata, T. (2008), A bias-adjusted LM test
of error cross-section independence, The Econometrics Journal,11, 105–
127.
© Copyright 2026 Paperzz