The article introduces a new Stata command, xtcsd, which tests for cross-sectional dependence in panel-data models. The command implements three tests: Pesaran's CD test, Friedman's test, and Frees' test. These tests are valid for large-N, small-T panels and can be used with balanced and unbalanced panels. The CD test, proposed by Pesaran (2004), is based on the sum of pairwise correlations of residuals and is asymptotically distributed as a standard normal distribution under the null hypothesis. Friedman's test uses the average Spearman's rank correlation coefficient, while Frees' test is based on the sum of squared rank correlation coefficients and follows a joint distribution of two chi-squared variables. The article also discusses the implications of cross-sectional dependence in panel-data models, including the potential bias of standard fixed-effects and random-effects estimators. The xtcsd command complements existing tests like xttest2, which is valid for small-N, large-T panels. The article illustrates the use of xtcsd with an empirical example based on a balanced panel dataset of U.S. states from 1970 to 1986. The results show that there is significant cross-sectional dependence in the errors, and all three tests reject the null hypothesis of cross-sectional independence. The article concludes that the xtcsd command provides a useful tool for testing cross-sectional dependence in panel-data models.The article introduces a new Stata command, xtcsd, which tests for cross-sectional dependence in panel-data models. The command implements three tests: Pesaran's CD test, Friedman's test, and Frees' test. These tests are valid for large-N, small-T panels and can be used with balanced and unbalanced panels. The CD test, proposed by Pesaran (2004), is based on the sum of pairwise correlations of residuals and is asymptotically distributed as a standard normal distribution under the null hypothesis. Friedman's test uses the average Spearman's rank correlation coefficient, while Frees' test is based on the sum of squared rank correlation coefficients and follows a joint distribution of two chi-squared variables. The article also discusses the implications of cross-sectional dependence in panel-data models, including the potential bias of standard fixed-effects and random-effects estimators. The xtcsd command complements existing tests like xttest2, which is valid for small-N, large-T panels. The article illustrates the use of xtcsd with an empirical example based on a balanced panel dataset of U.S. states from 1970 to 1986. The results show that there is significant cross-sectional dependence in the errors, and all three tests reject the null hypothesis of cross-sectional independence. The article concludes that the xtcsd command provides a useful tool for testing cross-sectional dependence in panel-data models.