------------------------------------------------------------------------------- help forxtcsd-------------------------------------------------------------------------------

Test for cross-sectional dependence in panel data models

xtcsd,[pesaranfriedmanfreesabsshow]

xtcsdis a post-estimation command for use with cross-section time-series data followingfeorremodels. You must tsset your data before usingxtcsd; see help tsset.

Description

xtcsdtests for cross-sectional dependence in Fixed Effects of Random Effects panel data models. One of method's optionspesaranfriedmanorfreesmust be specified.A standard assumption in panel data models (xtreg) is that the error terms are independent across cross-sections. This assumption is employed for identification purposes rather than descriptive accuracy. In the context of large T and small N, the LM test statistic proposed by Breusch and Pagan (1980) can be used to test for cross-sectional dependence (see help xttest2). However, in most cases, cross-sectional time-series data sets come in the form of small T and large N. In this case the Breusch-Pagan test is not valid.

xtcsdtest the hypothesis of cross-sectional independence in panel data models with small T and large N by implementing two semi-parametric tests proposed by Friedman (1937) and Frees (1995,2004), as well as the parametric testing procedure proposed by Pesaran (2004).xtcsdwith optionpesarancan handle balanced as well as unbalanced panels.

Options

pesarantest for cross-sectional dependence following the methods shown in Pesaran (2004). Pesaran's statistic follows a standard normal distribution and it is able to handle balanced and unbalanced panels.

friedmantest for cross-sectional dependence using Friedman's chi-square distributed statistic. For unbalanced panels Friedman's test uses only the observations available for all cross-sectional units.

freestest for cross-sectional dependence using Frees' Q distribution (T-asymptotically distributed). For unbalanced panels Frees' test uses only the observations available for all cross-sectional units.

abscomputes the average absolute value of the off-diagonal elements of the cross-sectional correlation matrix of residuals.

showshows the cross-sectional correlation matrix of residuals.

NotesThe small sample comparative performance of these tests under various model specifications is examined in Sarafidis and De Hoyos (2006).

Examples. use "http://www.econ.cam.ac.uk/phd/red29/xtcsd_baltagi.dta"

. xtreg lngsp lnpcap lnpc lnemp unemp, fe

. xtcsd, frees

. xtcsd, pesaran show

. xtreg lngsp lnpcap lnpc lnemp unemp, re

. xtcsd, friedman show abs

ReferencesFrees, E.W. (1995) `Assessing cross-sectional correlations in panel data',

Journal of Econometrics, 64, 393-414.Frees, E.W. (2004) `Longitudinal and panel data: analysis and applications in the social sciences',

Cambridge University Press.Friedman, M. (1937) `The use of ranks to avoid the assumption of normality implicit in the analysis of variance',

Journal of theAmerican Statistical Association, 32, 675-701.Pesaran, M.H. (2004) `General diagnostic tests for cross section dependence in panels',

Cambridge Working Papers in Economics, 0435, University of Cambridge.Sarafidis, V. and De Hoyos, R.E. (2006) `On testing for cross sectional dependence in panel data models',

mimeo, University of Cambridge.

AcknowledgementsOur code benefited greatly from Christopher Baum's xttest2. Thanks to David Drukker for very useful suggestions.

AuthorsRafael E. De Hoyos, Faculty of Economics, University of Cambridge. red29@cam.ac > .uk

Vasilis Sarafidis, Discipline of Econometrics and Business Statistics, Universi > ty of Sydney. V.Sarafidis@econ.usyd.edu.au

Also seeManual:

[U] 23 Estimation and post-estimation commands[XT] xtregOnline: help for xttest2 (if installed), bpagan (if installed), ivreg2 (if inst > alled)