Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Re: Cross sectional dependence panel data random effects

From   Gordon Hughes <[email protected]>
To   [email protected]
Subject   st: Re: Cross sectional dependence panel data random effects
Date   Sat, 21 Jul 2012 11:13:17 +0100

I have not checked the code for -xtcsd- recently but my memory is that it is not designed for panel data with large N and small T. Implicitly you are testing whether the variance-covariance matrix across groups is diagonal. For your data the matrix is 213 x 213 but since the matrix is symmetric it is necessary to compute 22578 covariances with 10 observations. This is technically possible using pairwise calculation but the result will be a singular matrix and this may explain why -xtcsd- refuses to go any further.

You may be better using a panel estimator which is robust to cross-section dependence such as the user written procedure -xtscc- which implements the Driscoll-Kraay estimator. However, you should bear in mind that allowing for cross sectional dependence in a large N, small T dataset will always be difficult unless you are willing to make some explicit assumptions about the nature of the dependence (i.e. the structure of the covariance matrix). An illustration is spatial panel models which assume a specific pattern of spatial (cross sectional) dependence.

Gordon Hughes
[email protected]


Date: Fri, 20 Jul 2012 11:41:38 +0200
From: Rauf Berent <[email protected]>
Subject: st: Cross sectional dependence panel data random effects


I would really appreciate some help regarding how to check for cross
sectional dependence in a random effects model when you have a highly
unbalanced panel.

I have an unbalanced panel (Number of obs: 1560, Groups: 213,
Observations per group max: 10, avg: 7.3) as my data consists of a lot
of companies that have been de-listed, merged or newly listed during a
10 year period.

I have done a Hausman test and concluded that I should use a random
effects model.

When checking for cross sectional dependence/contemporaneous
correlation in a random effects model xttest2 does not seem to work so
I have downloaded and used a user written program

ssc install xtcsd

The results I get are the following

. xtcsd, pesaran abs
Error: The panel is highly unbalanced.
Not enough common observations across panel to perform Pesaran's test.
insufficient observations

. xtcsd, friedman
no observations

xtcsd, frees
no observations

I am not really sure how to proceed as I was under the impression that
an unbalanced panel was not a problem for Pesaran. I also was under
the impression that friedman and frees tackle unbalanced panels by
only using observations available for all cross sectional units. Being
new to Stata and econometrics I would really appreciate all the help I
can get.

Thanks in advance,


*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index