diagnostic tests of cross section independence for ...ftp.iza.org/dp2756.pdf · diagnostic tests of...

21
IZA DP No. 2756 Diagnostic Tests of Cross Section Independence for Nonlinear Panel Data Models Cheng Hsiao M. Hashem Pesaran Andreas Pick DISCUSSION PAPER SERIES Forschungsinstitut zur Zukunft der Arbeit Institute for the Study of Labor April 2007

Upload: truongdung

Post on 24-Apr-2018

224 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Diagnostic Tests of Cross Section Independence for ...ftp.iza.org/dp2756.pdf · Diagnostic Tests of Cross Section Independence for Nonlinear Panel Data Models Cheng Hsiao University

IZA DP No. 2756

Diagnostic Tests of Cross Section Independencefor Nonlinear Panel Data Models

Cheng HsiaoM. Hashem PesaranAndreas Pick

DI

SC

US

SI

ON

PA

PE

R S

ER

IE

S

Forschungsinstitutzur Zukunft der ArbeitInstitute for the Studyof Labor

April 2007

Page 2: Diagnostic Tests of Cross Section Independence for ...ftp.iza.org/dp2756.pdf · Diagnostic Tests of Cross Section Independence for Nonlinear Panel Data Models Cheng Hsiao University

Diagnostic Tests of

Cross Section Independence for Nonlinear Panel Data Models

Cheng Hsiao University of Southern California

M. Hashem Pesaran CIMF, Cambridge University,

University of Southern California and IZA

Andreas Pick CIMF, Cambridge University

Discussion Paper No. 2756 April 2007

IZA

P.O. Box 7240 53072 Bonn

Germany

Phone: +49-228-3894-0 Fax: +49-228-3894-180

E-mail: [email protected]

Any opinions expressed here are those of the author(s) and not those of the institute. Research disseminated by IZA may include views on policy, but the institute itself takes no institutional policy positions. The Institute for the Study of Labor (IZA) in Bonn is a local and virtual international research center and a place of communication between science, politics and business. IZA is an independent nonprofit company supported by Deutsche Post World Net. The center is associated with the University of Bonn and offers a stimulating research environment through its research networks, research support, and visitors and doctoral programs. IZA engages in (i) original and internationally competitive research in all fields of labor economics, (ii) development of policy concepts, and (iii) dissemination of research results and concepts to the interested public. IZA Discussion Papers often represent preliminary work and are circulated to encourage discussion. Citation of such a paper should account for its provisional character. A revised version may be available directly from the author.

Page 3: Diagnostic Tests of Cross Section Independence for ...ftp.iza.org/dp2756.pdf · Diagnostic Tests of Cross Section Independence for Nonlinear Panel Data Models Cheng Hsiao University

IZA Discussion Paper No. 2756 April 2007

ABSTRACT

Diagnostic Tests of Cross Section Independence for Nonlinear Panel Data Models*

In this paper we discuss tests for residual cross section dependence in nonlinear panel data models. The tests are based on average pair-wise residual correlation coefficients. In nonlinear models, the definition of the residual is ambiguous and we consider two approaches: deviations of the observed dependent variable from its expected value and generalized residuals. We show the asymptotic consistency of the cross section dependence (CD) test of Pesaran (2004). In Monte Carlo experiments it emerges that the CD test has the correct size for any combination of N and T whereas the LM test relies on T large relative to N. We then analyze the roll-call votes of the 104th U.S. Congress and find considerable dependence between the votes of the members of Congress. JEL Classification: C12, C33, C35 Keywords: cross-section dependence, nonlinear panel data model Corresponding author: Hashem Pesaran Faculty of Economics University of Cambridge Sidgwick Avenue Cambridge, CB3 9DD United Kingdom E-mail: [email protected]

* The research for this paper began when the third author was post-doctoral research fellow at De Nederlandsche Bank (DNB). He would like to thank DNB for its hospitality. We would like to thank Qi Li for helpful comments.

Page 4: Diagnostic Tests of Cross Section Independence for ...ftp.iza.org/dp2756.pdf · Diagnostic Tests of Cross Section Independence for Nonlinear Panel Data Models Cheng Hsiao University

1 Introduction

Many panel data models assume that observations across individuals areindependent. However, there could be common shocks that affect all in-dividuals. Often economic theories also predict that agents take actionsthat lead to interdependence among themselves. For example, the predic-tion that risk-averse agents will make insurance contracts allowing them tosmooth idiosyncratic shocks implies dependence in consumption across in-dividuals. If observations are dependent across individuals, estimators thatare based on the assumption of cross sectional independence may be in-consistent. Since contrary to time series data, there is no natural orderingfor cross sectional indices, i, appropriate modeling and estimation of crosssectional dependence can be difficult, in particular if the dimension of crosssectional observations, N , is large and the time series dimension, T , is small.Therefore, it is appealing to first test for cross sectional dependence beforeone attempts to incorporate cross sectional dependence into a model.

There are essentially two approaches to test for cross sectional depen-dence. One is to postulate a “connection” or “spatial” matrix, then testif the coefficient of this spatial matrix is zero, e.g. Moran (1948), Kelejianand Prucha (2001). Although under the null of no cross-correlations thecoefficient of spatial matrix is zero no matter how this matrix is postulated,the power of this kind of test presumably will depend on the choice of thespatial matrix. Moreover, the computation of the spatial regression modelis quite complicated, see Kelejian and Prucha (1999) and Lee (2002).

Another approach to testing cross sectional dependence is to directly testif the cross-correlations of the errors are zero. For example, Breusch and Pa-gan’s (1980) Lagrangian multiplier (LM) test is based on the average of thesquared pair-wise correlation coefficients. However, the mean of the squaredcorrelation coefficients is not correctly centered when T is small. When N islarge, the incorrect centering of the squared correlation coefficients is likelyto be accentuated, resulting in significant size distortions. Pesaran, Ullahand Yamagata (2006) have proposed a bias-adjusted normal approximationversion of the LM test for linear regression models with strictly exogenousregressors and normal errors. Small sample evidence based on their MonteCarlo experiments suggests that the bias adjusted LM tests successfully con-trol the size. However, if the model is nonlinear, it does not appear feasibleto derive the exact mean and variance based, for example, on the work ofUllah (2004).

As an alternative to the test based on the square of the error correla-tion coefficients, Pesaran (2004) proposes to use the simple average of allpair-wise correlation coefficients of the least squares residuals from the in-dividual linear regressions in the panel, which is closely related to the CAVE

by Frees (1995). The advantage of Pesaran cross section dependence test(CD test) is that it is correctly centered for fixed N and T under the nullof cross section independence assuming that the errors are symmetrically

2

Page 5: Diagnostic Tests of Cross Section Independence for ...ftp.iza.org/dp2756.pdf · Diagnostic Tests of Cross Section Independence for Nonlinear Panel Data Models Cheng Hsiao University

distributed.In a recent paper, Ng (2006) employs spacing variance ratio statistics

to test the severity of cross section correlation in panels by partitioning thepair-wise cross-correlations into groups from high to low. The proposedstatistics are intended as agnostic tools for identifying and characterizingcorrelations across groups. However, they cannot be used as diagnostic testsof cross section independence that underlie the standard analysis of paneldata. Such tests are important as parameter estimates may be inconsistentif cross section correlation of errors is not accounted for at the estimationstage. It is, therefore, important to establish whether the cross section errorindependence can be maintained prior to estimation and inference.

This paper explores the use of the LM and CD tests for nonlinear paneldata models. In such models, the calculation of the errors is not as straight-forward as in linear models. We consider two approaches to estimate theerrors. The first estimate of the errors is the deviation of the observed depen-dent variable from its expected value, and the second estimate is to predictthe errors conditional on the observed dependent variable, the so called gen-eralized residual, see e.g. Gourieroux, Monfort and Trognon (1985). Basedon the estimated residuals we introduce the LM and CD test statistics fornonlinear panel data model and, using Monte Carlo experiments, we exam-ine the small sample performance of the tests for the probit and the Tobitmodel. Using data on voting in the U.S. Congress and campaign contri-butions by political lobby groups previously analyzed by Wawro (2001) wedemonstrate the application of the test.

The next section introduces the nonlinear panel data model. Section 3discusses the estimation of the residuals and the tests for cross section de-pendence. The small sample performance is evaluated using Monte Carloexperiments in Section 4, and the tests are applied to the data on voting inthe U.S. Congress in Section 5. Finally, Section 6 provides some conclud-ing remarks. Technical details are provided in Appendices A and B, anda bootstrap procedure to approximate the finite sample distribution of theCD test is discussed in Appendix C.

2 The nonlinear panel data model

Suppose that the latent variable, y∗it, is generated by the following nonlinearpanel data model,

f(y∗it,xit,θi) = εit, for i = 1, 2, . . . , N, t = 1, 2, . . . , T, (1)

where xit is a k × 1 vector of exogenous variables, θi is a q × 1 vector ofparameters, εit is a scalar disturbance, N is the number of cross sectionobservations, and T is the number of observations in time. The variable yit

is observed, which is related to the latent variable via the link function g(·),yit = g(y∗it) . (2)

3

Page 6: Diagnostic Tests of Cross Section Independence for ...ftp.iza.org/dp2756.pdf · Diagnostic Tests of Cross Section Independence for Nonlinear Panel Data Models Cheng Hsiao University

This general model encompasses many econometric models. Examplesinclude binary choice models where

f(y∗it,xit,βi) = y∗it − β′ixit, (3)

andg(y∗it) = I(y∗it) (4)

where I(A) is the indicator function, which is unity if A > 0 and zerootherwise. If the distribution of εit is the logistic, then this constitutesthe logit model. If εit is standard normally distributed, then this is theprobit model. The Tobit model is obtained if the latent model is that ofequation (3), errors are normal and the link function is

g(y∗it) = y∗itI(y∗it) . (5)

The disturbances are assumed to be potentially contemporaneously cor-related, εt ∼ (0,Σ), where εt = (ε1t, ε2t, . . . , εNt)′. This paper focuses ontesting Σ = D against Σ 6= D, where D is a diagonal matrix . Such an errorstructure could arise, for example, from the presence of unobserved commonfactors

εit = γ ′if t + eit,

where γi is the vector of factor loadings, f t ∼ iid (0,Σf ), and eit ∼ iid(0, σ2

e

).

3 Testing for cross section independence

Pesaran (2004) has suggested two approaches to test for cross section de-pendence using the pair-wise correlation coefficients of the residuals in theregression equations of the ith and jth unit, ρij . One is the LM test ofBreusch and Pagan (1980)

LM =

√1

N(N − 1)

N−1∑

i=1

N∑

j=i+1

(T ρ2ij − 1). (6)

The other is the CD test

CD =

√2T

N(N − 1)

N−1∑

i=1

N∑

j=i+1

ρij

. (7)

It is clear that, in contrast to the LM test, the CD test requires the crosssection correlation to be different from zero on average to detect deviationsfrom cross-section independence. While we believe that this is not a restric-tive assumption for most real life situations, this limitation should be bornein mind when applying the CD test.

4

Page 7: Diagnostic Tests of Cross Section Independence for ...ftp.iza.org/dp2756.pdf · Diagnostic Tests of Cross Section Independence for Nonlinear Panel Data Models Cheng Hsiao University

For linear models residuals are estimated directly from the underlyinglinear regressions. For nonlinear models the concept of a residual is ambigu-ous and can be defined in a number of different ways. One possibility wouldbe to define the disturbances of the nonlinear models analogous to the linearcase as the deviation of the observed dependent variable from its expectedvalue

uit = yit − E(yit|xit,θi) (8)

with an estimated counterpart, the residual, given by

uit = yit − E(yit|xit, θi

), (9)

where θi is a consistent estimator of θi under the null of cross section inde-pendence. For the probit model, for example, this deviation is given by

uit = yit − Φ(β′ixit), (10)

and for the Tobit model it is

uit = yit −(β′ixit + σiλit

(β′ixit

σi

), (11)

where

λit = φ

(β′ixit

σi

)[Φ

(β′ixit

σi

)]−1

,

and φ(·) is the standard normal probability density function (pdf), and Φ(·)is the standard normal cumulative distribution function (cdf).

For many models, the residuals will be heteroskedastic. One can trans-form them into homoskedastic residuals by dividing the estimated residualsby their estimated standard errors. In the case of the probit model the“standardized residual” is defined as

u∗it =yit − Φ(β

′ixit)√

Φ(β′ixit)(1− Φ(β

′ixit))

, (12)

and, in the case of the Tobit model, it is

u∗it = uit/ωit (13)

where

ω2it =

[(β′ixit)2 + β

′ixitσiλit + σ2

i − (β′ixit + σiλit)2Φ

(β′ixit

σi

)]Φ

(β′ixit

σi

).

The derivations of the residuals and their variances is given in Appendix A.Alternatively, the computation of ρij can be based on the generalized

residual proposed by Gourieroux, Monfort, and Trognon (1985), Gourieroux,

5

Page 8: Diagnostic Tests of Cross Section Independence for ...ftp.iza.org/dp2756.pdf · Diagnostic Tests of Cross Section Independence for Nonlinear Panel Data Models Cheng Hsiao University

Monfort, Renault, and Trognon (1987), and Chesher and Irish (1987). Thegeneralized residuals are defined as

ugit = E0(f(y

∗it,xit, θi) |yit) = ψ0(yit,xit, θi), (14)

where E0(.) is the expectation operator under the null hypothesis of no crosssection dependence. In contrast to the residual (8), the expectation of thegeneralized residuals in (14) is conditional on the observed dependent vari-able, yit. An estimator of ψ0(yit,xit, θi) is given by

ugit = ψ0(yit,xit, θi). (15)

Using equation (15), the “generalized residual” for the probit models is givenby

ugit =

φ(β′ixit)

Φ(β′ixit)[1− Φ(β

′ixit)]

[yit − Φ(β′ixit)]. (16)

For the Tobit model we have

ugit = (yit − βixit)I(yit)− σi

φ(βixit/σi)Φ(−βixit/σi)

[1− I(yit)], (17)

where σi is the estimated standard deviation of the error term (Chesher andIrish (1987)).

The generalized residual is also heterskedastic for many models. In Ap-pendix A we give the variances for the probit and the Tobit model, whichcould be used to obtain standardized versions of the generalized residuals.However, in line with the literature we will use the residuals (16) and (17)below.

In general ρij can be estimated using any of the residuals defined above.For example, using the residuals, uit, we have

ρji =∑T

t=1(uit − ¯ui)(ujt − ¯uj)(∑Tt=1(uit − ¯ui)2

)1/2 (∑Tt=1(ujt − ¯uj)2

)1/2, (18)

where

¯ui = T−1T∑

t=1

uit.

The estimated correlation coefficient, ρji, is then used in equations (6)and (7) to obtain the LM and CD test statistics. For large T ¯ui will tendto zero and could be ignored but for better small sample performance themean correction might be desirable.

Under the null hypothesis and for T sufficiently large, ρjip→ 0, for each

i and j. However, the probability limit of ρji will differ from zero in thepresence of cross section dependence. Under the null of cross section inde-pendence and for sufficiently large N and T , the CD statistic tends to astandard normal variate. See Appendix B for a proof and precise mathe-matical conditions.

6

Page 9: Diagnostic Tests of Cross Section Independence for ...ftp.iza.org/dp2756.pdf · Diagnostic Tests of Cross Section Independence for Nonlinear Panel Data Models Cheng Hsiao University

4 Small sample properties: Monte Carlo evidence

4.1 Data generating process

The Monte Carlo experiments are based on the following data generatingprocess (DGP) for the latent variable,

y∗(r)it = α

(r)i + β′x(r)

it + ε(r)it , (19)

where i = 1, 2, . . . , N , t = 1, 2, . . . , T, and r, r = 1, 2, . . . , R, denotes thereplication index in the Monte Carlo experiments with R = 1000, β = 1.The regressors are generated as

x(r)it = δf

(r)t + η

(r)it

η(r)it = λη

(r)i,t−1 + ζ

(r)it , ζ

(r)it ∼ iidN(0, 1), and f

(r)t ∼ iidN(0, 1). We set δ = 1

and λ = 0.5. Finally,α

(r)i = x

(r)i + S

(r)xi ν

(r)i ,

where x(r)i =

∑Tt=1 x

(r)it /T , S

(r)xi =

[(N − 1)−1

∑Ni=1(x

(r)i − ¯x(r))2

]1/2, ¯x(r) =

∑Ni=1 x

(r)i /N , and ν

(r)i ∼ iidN(0, 1). Hence, the setup covers the case, where

the individual specific effects are allowed to be correlated with the explana-tory variables. This is an important consideration in the analysis of micropanels, as noted, for example, by Chamberlain (1980).

The estimation of β under a probit specification only makes use of y(r)it =

I(y∗(r)it

), and under the Tobit specification y

(r)it = y

∗(r)it I

(y∗(r)it

). Hence,

without loss of generality the variance of the error term, u(r)it , may be set

equal to unity. To allow for correlation across the errors of different crosssection units we adopt the following standardized one-factor structure

ε(r)it =

γ(r)i f

(r)t + e

(r)it√

1 + γ(r)2i

where γ(r)i is a scalar, f

(r)t ∼ iidN(0, 1), and e

(r)it ∼ iidN(0, 1). Under

these assumptions we have E(ε(r)it ) = 0 and Var(ε(r)

it ) = 1. The pair-wisecorrelation coefficient of the errors is given by

Corr(ε(r)it , ε

(r)jt

)=

γ(r)i γ

(r)j√(

1 + γ(r)2i

)(1 + γ

(r)2j )

.

In the experiments reported below we use γ(r)i = 0, ∀i, γ

(r)i ∼ U(0.1, 0.3),

and γ(r)i ∼ U(−0.2, 0.6), where U(a, b) denotes the uniform distribution with

lower bound a and upper bound b.

7

Page 10: Diagnostic Tests of Cross Section Independence for ...ftp.iza.org/dp2756.pdf · Diagnostic Tests of Cross Section Independence for Nonlinear Panel Data Models Cheng Hsiao University

Using the artificial data, βi, (and σi in the case of the Tobit model) areestimated under the assumption of cross section independence by maximumlikelihood for each i, separately. Then, ρij is computed using the two al-ternative residuals, u∗it and ug

it, and the CD and LM test statistics are thencalculated with mean corrections given in (18).

4.2 Results

Table 1 presents the size and power of CD and LM tests for the probitmodels, and Table 2 presents the size and power of CD and LM tests forTobit model. The results in these tables suggest the following.

(i) There are substantial size distortions for the LM test even when N orT or both are large.

(ii) The empirical size is close to the nominal size for the CD test evenfor N and T as small as 10. This result holds generally and does notrequire the fixed effects and the regressors to be uncorrelated.

(iii) The power of CD test improves as either N or T increases. However,the power improves much faster when N increases than when T in-creases. When T = 20 and N = 100, the power is about 0.9. On theother hand, when N = 20 and T = 100, the power of CD test is about0.6 ∼ 0.7.

(iv) The test results are robust to the way residuals from the nonlinearmodels are computed.

(v) Even when the LM test has the correct size, as in the case whereT = 100 and N = 10, the CD test continues to exhibit a higher power.

5 Application to an analysis of campaign contri-butions and roll-call votes

We illustrate the use the use of the CD test by re-analyzing the data onvoting and campaign contributions of Wawro (2001). Using a panel probitmodel Wawro analyzes the influence of campaign contributions of a businesslobby group, the US Chamber of Commerce (USCC), and a labor lobbygroup, the American Federation of Labor-Congress of Industrial Organiza-tions (AFL-CIO), on the voting behaviour of members of the US Congresswith the unemployment rate in the constituency of each member of Congressas an additional explanatory variable.

The data set, which is available from Prof. Wawro’s web page1, con-tains data for a selections of the roll-call votes for each session of the 102th,103rd and 104th Congress, where the selected roll-call votes are those that

1http://www.columbia.edu/∼gjw10/panelprobit.html

8

Page 11: Diagnostic Tests of Cross Section Independence for ...ftp.iza.org/dp2756.pdf · Diagnostic Tests of Cross Section Independence for Nonlinear Panel Data Models Cheng Hsiao University

Table 1: Size and power of CD and LM tests: The probit modelStandardized residuals, u∗it Generalized residuals, ug

it

T\N 10 20 30 50 100 10 20 30 50 100

γ(r)i = 0, ∀iCD test

10 0.064 0.059 0.077 0.064 0.068 0.066 0.063 0.078 0.057 0.05420 0.057 0.056 0.059 0.058 0.075 0.056 0.055 0.051 0.059 0.07230 0.054 0.052 0.063 0.048 0.049 0.054 0.053 0.062 0.047 0.05150 0.050 0.045 0.061 0.059 0.061 0.048 0.045 0.060 0.056 0.062

100 0.046 0.051 0.060 0.067 0.062 0.048 0.057 0.060 0.066 0.061LM test

10 0.197 0.459 0.698 0.974 1.000 0.192 0.456 0.712 0.975 1.00020 0.085 0.203 0.356 0.656 0.985 0.093 0.224 0.419 0.734 0.99630 0.077 0.132 0.235 0.394 0.858 0.074 0.160 0.290 0.527 0.94050 0.070 0.087 0.099 0.196 0.491 0.076 0.113 0.152 0.346 0.784

100 0.060 0.083 0.067 0.083 0.195 0.063 0.091 0.095 0.186 0.534

γ(r)i ∼ U(0.1, 0.3)

CD test10 0.097 0.153 0.235 0.381 0.702 0.098 0.141 0.231 0.365 0.67420 0.128 0.220 0.361 0.596 0.903 0.136 0.235 0.371 0.596 0.89730 0.140 0.281 0.473 0.736 0.973 0.149 0.295 0.487 0.738 0.97850 0.190 0.404 0.639 0.908 0.998 0.188 0.424 0.657 0.909 0.999

100 0.246 0.634 0.891 0.993 1.000 0.266 0.660 0.898 0.994 1.000LM test

10 0.193 0.475 0.728 0.971 1.000 0.186 0.485 0.733 0.973 1.00020 0.126 0.244 0.383 0.759 0.991 0.130 0.264 0.429 0.821 0.99530 0.104 0.175 0.261 0.559 0.943 0.105 0.191 0.311 0.652 0.97450 0.097 0.142 0.240 0.437 0.868 0.092 0.154 0.283 0.548 0.952

100 0.095 0.145 0.238 0.440 0.880 0.102 0.158 0.290 0.548 0.957

γ(r)i ∼ U(−0.2, 0.6)

CD test10 0.104 0.126 0.206 0.347 0.642 0.101 0.129 0.200 0.329 0.61520 0.124 0.195 0.298 0.545 0.838 0.132 0.203 0.295 0.543 0.83630 0.136 0.270 0.394 0.661 0.929 0.141 0.280 0.396 0.667 0.93450 0.170 0.358 0.550 0.808 0.992 0.181 0.366 0.561 0.818 0.993

100 0.243 0.501 0.766 0.938 1.000 0.251 0.502 0.773 0.941 1.000LM test

10 0.206 0.450 0.730 0.974 1.000 0.208 0.465 0.737 0.974 1.00020 0.147 0.286 0.466 0.822 0.996 0.145 0.306 0.518 0.871 0.99630 0.114 0.222 0.402 0.681 0.988 0.114 0.268 0.457 0.774 0.99650 0.136 0.252 0.403 0.681 0.975 0.140 0.281 0.481 0.786 0.996

100 0.176 0.373 0.613 0.854 0.999 0.198 0.427 0.687 0.919 1.000The Table reports the percentage of rejections of the null of no cross-section dependence for the

CD-statistic (7) and the LM-statistic (6) from the standardized and the generalized residuals at the

5% significance level for 1000 repetitions of the experiment.9

Page 12: Diagnostic Tests of Cross Section Independence for ...ftp.iza.org/dp2756.pdf · Diagnostic Tests of Cross Section Independence for Nonlinear Panel Data Models Cheng Hsiao University

Table 2: Size and power of CD and LM tests: The Tobit modelStandardized residuals, u∗it Generalized residuals, ug

it

T\N 10 20 30 50 100 10 20 30 50 100

γ(r)i = 0, ∀iCD test

10 0.063 0.080 0.060 0.066 0.072 0.062 0.048 0.068 0.054 0.05720 0.059 0.055 0.047 0.055 0.066 0.048 0.048 0.070 0.053 0.05630 0.069 0.066 0.063 0.067 0.059 0.049 0.064 0.059 0.055 0.04750 0.048 0.052 0.052 0.043 0.064 0.050 0.055 0.045 0.057 0.060

100 0.038 0.046 0.062 0.060 0.053 0.045 0.065 0.048 0.038 0.046LM test

10 0.184 0.461 0.737 0.984 1.000 0.201 0.498 0.765 0.982 1.00020 0.122 0.253 0.406 0.722 0.985 0.137 0.288 0.501 0.822 0.99630 0.114 0.160 0.260 0.467 0.893 0.102 0.214 0.374 0.668 0.98350 0.069 0.129 0.153 0.245 0.589 0.080 0.126 0.246 0.537 0.941

100 0.067 0.078 0.092 0.134 0.255 0.084 0.070 0.182 0.362 0.882

γ(r)i ∼ U(0.1, 0.3)

CD test10 0.144 0.267 0.388 0.600 0.881 0.133 0.261 0.391 0.613 0.88420 0.173 0.379 0.545 0.786 0.971 0.200 0.371 0.588 0.808 0.97830 0.174 0.474 0.674 0.892 0.999 0.221 0.497 0.710 0.924 0.99650 0.261 0.620 0.846 0.984 1.000 0.301 0.682 0.883 0.990 1.000

100 0.402 0.841 0.983 1.000 1.000 0.481 0.894 0.989 1.000 1.000LM test

10 0.225 0.542 0.784 0.986 1.000 0.254 0.550 0.783 0.994 1.00020 0.193 0.368 0.596 0.871 0.999 0.173 0.391 0.591 0.894 1.00030 0.132 0.316 0.467 0.788 0.991 0.147 0.327 0.521 0.845 0.99650 0.149 0.298 0.492 0.761 0.985 0.138 0.316 0.525 0.851 0.997

100 0.189 0.367 0.557 0.848 1.000 0.195 0.403 0.653 0.931 1.000

γ(r)i ∼ U(−0.2, 0.6)

CD test10 0.144 0.243 0.356 0.574 0.821 0.143 0.264 0.360 0.572 0.84520 0.151 0.326 0.448 0.725 0.945 0.180 0.351 0.527 0.745 0.96430 0.178 0.397 0.569 0.821 0.988 0.205 0.431 0.628 0.865 0.99550 0.264 0.511 0.707 0.975 0.999 0.285 0.557 0.765 0.935 0.999

100 0.361 0.693 0.874 0.989 1.000 0.429 0.730 0.907 0.992 1.000LM test

10 0.228 0.581 0.829 0.991 1.000 0.230 0.559 0.838 0.989 1.00020 0.183 0.443 0.675 0.925 1.000 0.209 0.474 0.714 0.954 0.99930 0.216 0.410 0.648 0.914 1.000 0.224 0.464 0.746 0.956 1.00050 0.267 0.498 0.708 0.913 1.000 0.274 0.572 0.820 0.979 1.000

100 0.345 0.685 0.878 0.985 1.000 0.438 0.822 0.964 0.999 1.000The specification of the observed dependent variable is given in (5). Otherwise see footnote of

Table 1.

10

Page 13: Diagnostic Tests of Cross Section Independence for ...ftp.iza.org/dp2756.pdf · Diagnostic Tests of Cross Section Independence for Nonlinear Panel Data Models Cheng Hsiao University

the lobby groups themselves deemed important. We test for cross sectionindependence in the sessions of the 104th Congress for the roll-call votessuggested by the USCC, which has the largest number of votes of the datasets. We exclude members of Congress that do not change their vote morethan three times as the estimation of the regression equation for each indi-vidual separately would otherwise be computationally unstable. This leadsto two data sets with M = 19 each, and N = 139 for the first session andN = 145 for the second session, where M is the number of motions thatare put before Congress and are recorded in Prof. Wawro’s data set—as thetiming of the votes is not obvious we refer to the different motions for whichthe roll-call votes were recorded as m = 1, 2, . . . , M instead of t.

Wawro (2001, p.570) includes a motion-specific intercept to account forthe particular political context around the roll-call votes. We do not includesuch a motion-specific intercept. However, if the political context arounda motion influences the voting behaviour, then omitting a motion specificintercept is tantamount to introducing cross-correlation among the residuals.The CD test can therefore be interpreted as a test for the necessity to includea motion-specific intercept.

We proceed as follows. We estimate the parameters of the probit modelby maximizing the likelihood

Li =M∏

m=1

Φ(βixim)yim(1− Φ(βixim))(1−yim), for i = 1, 2, . . . , N (20)

where yim is a binary indicator for the votes of the member of Congress(“aye” or “nay”), xim contains an intercept, the contributions of the USCC,the contributions of the AFL-CIO, and the unemployment rate of the con-stituency of the member of Congress. Note that this model is more generalthan the random effects model estimated by Warwo (2001) as we also allowthe slope parameters to vary between individuals.

Using the parameter vector βi, we calculate the conditional generalizedresidual as given in equation (16) and the unconditional residual of equa-tion (12). From these we obtain the pairwise correlation coefficient. Theaverage correlation coefficient for the conditional residuals are 0.283 for thefirst session and 0.310 for the second session. For the unconditional residu-als, they are 0.286 and 0.310.

Using pairwise correlation coefficients we can calculate the CD test statis-tic. However, both panels are unbalanced as some observations are missingand, therefore, the statistic has to be adjusted to

CD =

√2

N(N − 1)

N−1∑

i=1

N∑

j=i+1

√Mij ρij

, (21)

where Mij is the number of motions where observations on votes are availablefor both i and j.

11

Page 14: Diagnostic Tests of Cross Section Independence for ...ftp.iza.org/dp2756.pdf · Diagnostic Tests of Cross Section Independence for Nonlinear Panel Data Models Cheng Hsiao University

Table 3: CD test for roll-call votes in the 104th Congress

ugit Bootstrap u∗it Bootstrap

5% crit. val. 5% crit. val.

All motions1st session 151.488 [−1.670 2.545] 151.470 [−1.677 2.539]2nd session 169.300 [−1.655 2.392] 169.310 [−1.658 2.393]

Subset of motions1st session 104.488 [−1.727 2.092] 104.496 [−1.726 2.092]2nd session 118.742 [−1.733 2.078] 118.839 [−1.726 2.078]The results for the subset of motions only use motions with less than 90% una-

nimity, which excludes two motions of each session of Congress. The bootstrap

critical values were computed using 1000 iterations. The first number gives the

2.5% lower critical value and the second number the 2.5% upper critical value.

While the Monte Carlo results suggest that the CD test has the correctsize for all combinations of N and T , it might be worthwhile to double checkthat the results for possible departures from the asymptotic test results.Hence, we also calculate critical values of the CD test using a bootstrapprocedure, the details of which are given in Appendix C.

The upper half of Table 3 reports the results for the CD test for the entiresample. The test statistics are very large and clearly reject the null of crosssection independence. The values in brackets are the 5% critical bootstrapvalues. The bootstrap test results are generally in line with asymptotic testresults, and confirm the existence of statistically significant evidence of crosssection error correlations in Warwo’s application.

In order to address the question of whether our test results are driven bya few motions with near unanimity of the votes, we eliminated the motionswhere more than 90% of the votes are in agreement. This reduces the numberof motions being considered, M, from 19 to 17 for each of the two sessions.We apply the CD tests to this subset and report the results in the lowerhalf of Table 3. While the test statistics are reduced in size, they remainstatistically highly significant. The CD test therefore still rejects the nullhypothesis of cross section error independence in this empirical application.

6 Conclusion

In this paper, we have generalized Pesaran’s (2004) CD test for cross sectionindependence to nonlinear models. Our Monte Carlo studies show that thereare substantial size distortions of the Lagrangian multiplier type tests. Onthe other hand, CD tests perform well even in small N and T cases. The

12

Page 15: Diagnostic Tests of Cross Section Independence for ...ftp.iza.org/dp2756.pdf · Diagnostic Tests of Cross Section Independence for Nonlinear Panel Data Models Cheng Hsiao University

empirical size of the CD test is close to the nominal size. The test also hasgood power, in particular when N is large, even when T is relatively small.

The CD test is simple to implement. As is well known in panel dataliterature when T is small and N is large, the presence of individual-specificeffects introduces the classical incidental parameter problems (Neyman andScott 1948). The estimation of structural parameters are often entangledwith the estimation of incidental parameters. To obtain a consistent estima-tor of structural parameters, one often has to impose stringent conditionson the data and the estimation becomes complicated (see e.g. Hsiao 2003).The problem can only become more unwieldy if there exist cross section de-pendence. A nice feature of Pesaran CD test is that one can estimate modelparameters under cross section independence and the presence of individual-specific effects (possibly correlated with the regressors) does not affect theperformance of the test because each cross sectional unit parameter is esti-mated using that unit’s time series observation alone.

In cases, such as the application in this paper, where cross section errorindependence is rejected, one may wish to investigate the nature of thedependence, possibly along the lines of Ng (2006). Also the estimation ofthe structural parameters in the model will need to take the cross sectiondependence into account. While these two topics are beyond the scope ofthe current paper and are left for future research, this paper proposes asimple yet powerful test for the detection of cross section error dependence,which is the starting point for any such endeavor.

13

Page 16: Diagnostic Tests of Cross Section Independence for ...ftp.iza.org/dp2756.pdf · Diagnostic Tests of Cross Section Independence for Nonlinear Panel Data Models Cheng Hsiao University

Appendix A: Derivations of the residuals

The unconditional residual for the probit model

uit = yit − E(yit)= yit − E(yit|yit = 1)Pr(yit = 1)− E(yit|yit = 0)Pr(yit = 0)= yit − Φ(β′ixit),

where for notational convenience the fact that the moments are conditionalon xit and the parameters is not stated explicitly. The variance is

Var(uit) = E(y2

it

)− Φ(β′ixit)2

= E(y2it|y = 1)Pr(yit = 1) + E(y2

it|y = 0)Pr(yit = 0)− Φ(β′ixit)2

= Φ(β′ixit)[1− Φ(β′ixit)

].

The generalized residual for the probit model

ugit = E(uit|yit)

= E(uit|yit = 1)yit + E(uit|yit = 0)(1− yit)= E(uit|uit > −β′ixit) yit + E(uit|uit ≤ −β′ixit) (1− yit)

=φ(β′ixit)Φ(β′ixit)

yit +φ(β′ixit)[

1− Φ(β′ixit)](1− yit)

=φ(β′ixit)

Φ(β′ixit)[1− Φ(β′ixit)

] [yit − Φ(β′ixit)

].

The variance of the generalized residual is

Var(ugit) =

φ(β′ixit)2

Φ(β′ixit)2[1− Φ(β′ixit)

]2 E[(yit − Φ(β′ixit))2]

=φ(β′ixit)2

Φ(β′ixit)[1− Φ(β′ixit)

] .

The unconditional residual for the Tobit model

uit = yit − E(yit)= yit − E(yit|yit > 1)Pr(yit > 1)− E(yit|yit = 0)Pr(yit = 0)= yit − E(β′ixit + uit|uit > −β′ixit)Φ

(β′ixit/σi

)

= yit −(β′ixit + σiλit

(β′ixit/σi

),

where λit = φ(β′ixit/σi)/Φ(β′ixit/σi) is the inverse Mills ratio with argument

14

Page 17: Diagnostic Tests of Cross Section Independence for ...ftp.iza.org/dp2756.pdf · Diagnostic Tests of Cross Section Independence for Nonlinear Panel Data Models Cheng Hsiao University

−β′ixit/σi. The variance is

Var(uit) = E(y2

it

)− [(β′ixit + σiλit

(β′ixit/σi

)]2

= E(y2it|uit > −β′ixit)Pr(yit > 0)− [(

β′ixit + σiλit

(β′ixit/σi

)]2

= σ2i

E((α′ixit + vit)2|vit > −α′ixit)Φ

(α′ixit

)

− [(α′ixit + λit

(α′ixit

)]2

= σ2i

[(α′ixit)2 + α′ixitλit + 1

(α′ixit

)(22)

− [(α′ixit + λit

(α′ixit

)]2

,

where αit = βit/σi, vit = uit/σi ∼ N(0, 1), and we used the fact that

E(v2it|vit > −α′ixit) = Var(vit|vit > −α′ixit) + E(vit|vit > −α′ixit)2

= [1− λit(λit + α′ixit)] + λ2it

= 1− λitα′ixit.

Substituting αit into (22) gives the variance in (13).

The generalized residual for the Tobit model

ugit = E(uit|yit)

= E(uit|yit = 1)I(yit) + E(uit|yit = 0) [1− I(yit)]= (yit − β′ixit)I(yit) + E(uit|uit < −β′ixit) [1− I(yit)]

= (yit − β′ixit)I(yit)− σiφ(β′ixit/σi)

Φ(−β′ixit/σi)[1− I(yit)] .

For the variance we have,

Var(ugit) = E(u2

it|uit > −β′ixit)Φ(β′ixit/σi)

+σ2i

φ(β′ixit/σi)2

Φ(−β′ixit/σi)2[1− Φ(β′ixit/σi)]

= σ2i

[(1− λitβ

′ixit/σi)Φ(β′ixit/σi) +

φ(β′ixit/σi)2

Φ(−β′ixit/σi)

].

Appendix B: Limiting distribution of CD test fornonlinear models

In this appendix we show that the limiting distribution of Pesaran (2004)CD test holds for nonlinear panel data models. We consider a nonlinearmodel of the form

yit = f(xit, θi) + uit,

where θi is a p × 1 vector of unknown parameters for cross section unit i.We denote the true value of θi by θi0, and make the following assumptions.

15

Page 18: Diagnostic Tests of Cross Section Independence for ...ftp.iza.org/dp2756.pdf · Diagnostic Tests of Cross Section Independence for Nonlinear Panel Data Models Cheng Hsiao University

A1: For each i, the disturbances, uit, are serially independent with zeromeans and variances, σ2

i , such that 0 < σ2i < ∞.

A2: Under the null hypothesis defined by H0 : uit = σiεit, with εit ∼iid(0, 1) for all i and t, the disturbances, εit, are symmetrically dis-tributed around 0.

A3: The k × 1 explanatory variables, xit, are strictly exogenous such thatE(uit|xi) = 0 for all i and t, where xi = (x′i1, . . . ,x

′iT )′, such that

1T

∑Tt=1 uit

∂fjt

∂θj0

p→ 0, ∀ i, j, and t.

A4: Let Θi be an open neighborhood of θi and fit = f(xit, θi), fit is con-tinuous in θi ∈ Θi uniformly in t.

A5: ∂fit∂θi

exists and is continuous on Θi and 1T

∑Tt=1

∂fit∂θi

∂fit∂θ′i

p→ Ωii and1T

∑Tt=1

∂fjt

∂θj

∂fit∂θ′i

p→ Ωij , where Ωii and Ωij are finite, non-stochasticmatrices, and convergence is uniformly for all θi ∈ Θi.

A6: ∂2fit∂θi∂θ′i

is continuous in θi ∈ Θi uniformly in t, and 1T

∑Tt=1

∂2fit∂θi∂θ′i

converges to a finite nonsingular matrix.

A7:√

T (θi − θi0)a∼ N(0,Σ), where Σ is a positive definite matrix.

Let Li denote the log-likelihood function of the ith cross section unitwith the joint pdf `i = `(ui1, . . . , uiT ) =

∏Tt=1 `(uit), and denote by θi the

maximum likelihood estimator of θi,

∂Li

∂θi

∣∣∣∣θi

= 0.

Then as T −→∞, θi is consistent and asymptotically normally distributedwith

θi − θi0 = −(

∂2Li

∂θi∂θ′i

∣∣∣∣θi0

)−1 (∂Li

∂θi

∣∣∣∣θi0

)+ Op

(1T

).

The estimated residuals, uit,

uit = yit − f(xit, θi)

= yit − f(xit, θi0)− ∂fit∂θ′i

∣∣∣∣θi0

(θi − θi0) + Op

(1T

).

16

Page 19: Diagnostic Tests of Cross Section Independence for ...ftp.iza.org/dp2756.pdf · Diagnostic Tests of Cross Section Independence for Nonlinear Panel Data Models Cheng Hsiao University

1√T

T∑

t=1

uitujt =1√T

T∑

t=1

uitujt

+1√T

T∑

t=1

(θi − θi0)′

∂fit∂θi

∣∣∣∣θi0

∂fjt∂θ′j

∣∣∣∣∣θj0

(θj − θj0)

− 1√T

T∑

t=1

uit∂fjt∂θ′j

∣∣∣∣∣θj0

(θj − θj0)

− 1√T

T∑

t=1

ujt∂fit∂θ′i

∣∣∣∣θi0

(θi − θi0) + Op

(1T

)

=1√T

T∑

t=1

uitujt

+1√T

√T (θi − θi0)′

1

T

T∑

t=1

∂fit∂θi

∣∣∣∣θi0

∂fjt∂θ′j

∣∣∣∣∣θj0

T (θj − θj0)

− 1

T

T∑

t=1

uit∂fjt∂θ′j

∣∣∣∣∣θj0

T (θj − θj0)

−(

1T

T∑

t=1

ujt∂fit∂θ′i

∣∣∣∣θi0

)√T (θi − θi0) + Op

(1T

)

Hence, using assumptions A3, A5, and A6 it follows that

1√T

T∑

t=1

uitujt =1√T

T∑

t=1

uitujt + Op

(1T

).

Therefore, following the same argument of Pesaran (2004), we can showthat the limiting distribution of the CD test continues to hold in the case ofnonlinear panel data models as well.

Appendix C: Bootstrap procedure

A bootstrap approximation might be used to improve the finite sample ap-proximation of the distribution of the CD test. The bootstrap procedure wesuggest has previously been employed in different contexts in the literature.Hardle, Mammen and Proenca (2001) use the bootstrap approximation toimprove the size of the Horowitz-Hardle test for the specification of the linkfunction, g(·) in equation (2). Dikta, Kvesic and Schmidt (2006) call theprocedure a “model based resampling scheme” and use it to test for thefunctional form of the underlying regression model.

For the test at hand the bootstrap procedure works as follows.

17

Page 20: Diagnostic Tests of Cross Section Independence for ...ftp.iza.org/dp2756.pdf · Diagnostic Tests of Cross Section Independence for Nonlinear Panel Data Models Cheng Hsiao University

1. Using the observed data yit and xit estimate the parameters for themodel and obtain θi for each i = 1, 2, . . . , N .

2. Sample εit ∼ iid F(0, σ2i ) for i = 1, 2, . . . N and t = 1, 2, . . . T , where

F(·) is the distribution of the error term implied by the maintainedmodel.

3. Construct yit using the model f(y∗it,xit, θi

)= εit, and yit = g(y∗it) .

4. Using yit and xit estimate the parameters for the model and obtain ˆθi

for each i = 1, 2, . . . , N . Construct the CD test statistic using xit andˆθi.

5. Repeat step 2–4 B times.

6. The B samples of the test statistic are then used to calculate thecritical values against which the test statistic obtained from the datais evaluated. The critical values are the, say, the 2.5% lowest and the2.5% highest values in the sample of the B bootstrap test statistics.

Given that nonlinear models are typically estimated via maximum like-lihood, this bootstrap procedure entails considerable computational costs.Hardle, Mammen and Proenca (2001) suggest to set the starting values in

the estimation of ˆθi to θi and use only one iteration to obtain the estimates.

In the application in Section 5, however, we let the maximization algorithmrun to convergence.

References

Breusch, T. S. and Adrian R. Pagan (1980) ‘The Lagrange multiplier testand its application to model specifications in Econometrics.’ Review ofEconomic Studies 47, 239–253

Chamberlain, Gary (1980) ‘Analysis of covariance with qualitative data.’Review of Economic Studies 47, 225–238

Chesher, Andrew, and Margaret Irish (1987) ‘Numerical and graphical resid-ual analysis in the grouped and censored normal linear model.’ Journalof Econometrics 34, 33–61

Dikta, Gerhard, Marsel Kvesic, and Christian Schmidt (2006) ‘Bootstrapapproximation in model checks with binary data.’ Journal of the Ameri-can Statistical Association 101, 521–530

Frees, Edward W. (1995) ‘Assessing cross sectional correlation in panel data.’Journal of Econometrics 69, 393–414

Gourieroux, Christian, Alain Monfort, and Alain Trognon (1985) ‘A generalapproach to serial correlation.’ Econometric Theory 1, 315–340

18

Page 21: Diagnostic Tests of Cross Section Independence for ...ftp.iza.org/dp2756.pdf · Diagnostic Tests of Cross Section Independence for Nonlinear Panel Data Models Cheng Hsiao University

Gourieroux, Christian, Alain Monfort, Eric Renault, and Alain Trognon(1987) ‘Generalised residuals.’ Journal of Econometrics 34, 5–32

Hardle, Wolfgang, Enno Mammen, and Isabel Proenca (2001) ‘A bootstraptest for single index models.’ Statistics 35, 427–452

Hsiao, Cheng (2003) Analysis of Panel Data, 2nd ed., Cambridge: Cam-bridge University Press

Kelejian, Harry H. and Ingmar R. Prucha (1999) ‘A generalized momentsestimator for the autoregressive parameter in a spatial model.’ Interna-tional Economic Review, 40, 509–533

Kelejian, Harry H. and Ingmar R. Prucha (2001) ‘On the asymptotic distri-bution of the Moran I test statistic with applications.’ Journal of Econo-metrics 104, 219–257

Lee, Lung-Fei (2002) ‘Consistency and efficiency of least squares estimationfor mixed regressive, spatial autoregressive models.’ Econometric Theory18, 252–277

Moran, P. A. P. (1948) ‘The interpretation of statistical maps.’ Biometrica35, 255–260

Neyman, J. and Elizabeth R. Scott (1948) ‘Consistent estimates based onpartially consistent observations.’ Econometrica

Ng, Serena (2006) ‘Testing cross section correlation in panel data usingspacing.’ Journal of Business and Economic Statistics 24, 12–23

Pesaran, M. Hashem (2004) ‘General diagnostic tests for cross section de-pendence in panels.’ Cambridge Working Paper in Economics 0435

Pesaran, M. Hashem, Aman Ullah and Takashi Yamagata (2006) ‘A biasadjusted LM test of error cross section independence.’Cambridge WorkingPaper in Economics 0641

Ullah, Aman (2004) Finite Sample Econometrics, New York: Oxford Uni-versity Press

Wawro, Gregory (2001) ‘A panel probit analysis of campaign contributionsand roll-call votes.’ American Journal of Political Science 45, 563–579

19