# Testing panel data regression models with spatial error correlation

**ABSTRACT** This paper derives several lagrange multiplier (LM) tests for the panel data regression model with spatial error correlation. These tests draw upon two strands of earlier work. The first is the LM tests for the spatial error correlation model discussed in Anselin (Spatial Econometrics: Methods and Models, Kluwer Academic Publishers, Dordrecht; Rao's score test in spatial econometrics, J. Statist. Plann. Inference 97 (2001) 113) and Anselin et al. (Regional Sci. Urban Econom. 26 (1996) 77), and the second is the LM tests for the error component panel data model discussed in Breusch and Pagan (Rev. Econom. Stud. 47(1980) 239) and Baltagi et al. (J. Econometrics 54 (1992) 95). The idea is to allow for both spatial error correlation as well as random region effects in the panel data regression model and to test for their joint significance. Additionally, this paper derives conditional LM tests, which test for random regional effects given the presence of spatial error correlation. Also, spatial error correlation given the presence of random regional effects. These conditional LM tests are an alternative to the one-directional LM tests that test for random regional effects ignoring the presence of spatial error correlation or the one-directional LM tests for spatial error correlation ignoring the presence of random regional effects. We argue that these joint and conditional LM tests guard against possible misspecification. Extensive Monte Carlo experiments are conducted to study the performance of these LM tests as well as the corresponding likelihood ratio tests.

**0**Bookmarks

**·**

**171**Views

- [Show abstract] [Hide abstract]

**ABSTRACT:**This paper considers a panel regression model with ill-posed data and proposes the generalized maximum entropy(GME) estimator of the unknown parameters. These are natural extensions from the biometries, statistics and econometrics literature. The performance of this estimator is investigated by using of Monte Carlo experiments. The results indicate that the GME method performs the best in estimating the unknown parameters.Korean Journal of Applied Statistics. 01/2006; 19(3). - SourceAvailable from: scirp.org[Show abstract] [Hide abstract]

**ABSTRACT:**This paper extends and generalizes the works of [1,2] to allow for cross-sectional dependence in the context of a two-way error components model and consequently develops LM test. The cross-sectional dependence follows the first order spatial autoregressive error (SAE) process and is imposed on the remainder disturbances. It is important to note that this paper does not consider alternative forms of spatial lag dependence other than SAE. It also does not allow for endogeneity of the regressors and requires the normality assumption to derive the LM test. - SourceAvailable from: Yang Bai
##### Article: PANEL DATA PARTIALLY LINEAR VARYING-COEFFICIENT MODEL WITH ERRORS CORRELATED IN SPACE AND TIME

[Show abstract] [Hide abstract]

**ABSTRACT:**In this paper, we consider a panel data varying-coefficient partially linear model errors correlated in space and time. A serially correlated error structure is adopted for the correlation in time, and we propose an estimating procedure for the autoregressive coefficients in our set-up by combining a polynomial spline series approximation with least squares. The resulted estimators are shown to enjoy asymptotic properties. We construct a weighted semiparametric least squares estimator (WSLSE) and a weighted polynomial spline series estimator (WPSSE) for the parametric and nonparametric components of the mean model, respectively. The WSLSE is shown to be asymptotically normal and more efficient than the unweighted one, and the WPSSE is shown to achieve the optimal nonparametric convergence rate. Some simulation studies are reported to illustrate the finite sample performance of the proposed procedure. An application to Indonesian rice farming data is given.Statistica Sinica 01/2015; 35(1):275-294. · 1.23 Impact Factor

Page 1

Testing Panel Data Regression Models with Spatial Error

Correlation*

by

Badi H. Baltagi

Department of Economics, Texas A&M University,

College Station, Texas 77843-4228, USA

(979) 845-7380

badi@econ.tamu.edu

Seuck Heun Song

and

Won Koh

Department of Statistics, Korea University,

Sungbuk-Ku, Seoul, 136-701, Korea

ssong@mail.korea.ac.kr

wonkoh@kustat.korea.ac.kr

December 2001

Keywords: Panel data; Spatial error correlation, Lagrange Multiplier tests, Likelihood Ratio tests.

JEL classi…cation: C23, C12

ABSTRACT

This paper derives several Lagrange Multiplier tests for the panel data regression model wih spatial

error correlation. These tests draw upon two strands of earlier work. The …rst is the LM tests for the

spatial error correlation model discussed in Anselin (1988, 1999) and Anselin, Bera, Florax and Yoon

(1996), and the second is the LM tests for the error component panel data model discussed in Breusch

and Pagan (1980) and Baltagi, Chang and Li (1992). The idea is to allow for both spatial error

correlation as well as random region e¤ects in the panel data regression model and to test for their

joint signi…cance. Additionally, this paper derives conditional LM tests, which test for random regional

e¤ects given the presence of spatial error correlation. Also, spatial error correlation given the presence

of random regional e¤ects. These conditional LM tests are an alternative to the one directional LM

tests that test for random regional e¤ects ignoring the presence of spatial error correlation or the one

directional LM tests for spatial error correlation ignoring the presence of random regional e¤ects. We

argue that these joint and conditional LM tests guard against possible misspeci…cation. Extensive

Monte Carlo experiments are conducted to study the performance of these LM tests as well as the

corresponding Likelihood Ratio tests.

*We would like to thank the associate editor and two referees for helpful comments. An earlier version of this

paper was given at the North American Summer Meeting of the Econometric Society held at the University

of Maryland, June, 2001. Baltagi would like to thank the Bush School Program in the Economics of Public

Policy for its …nancial support.

Page 2

1INTRODUCTION

Spatial dependence models deal with spatial interaction (spatial autocorrelation) and spatial

structure (spatial heterogeneity) primarily in cross-section data, see Anselin (1988, 1999).

Spatial dependence models use a metric of economic distance, see Anselin (1988) and Conley

(1999) to mention a few. This measure of economic distance provides cross-sectional data with

a structure similar to that provided by the time index in time series. There is an extensive

literature estimating these spatial models using maximum likelihood methods, see Anselin

(1988). More recently, generalized method of moments have been proposed by Kelejian and

Prucha (1999) and Conley (1999). Testing for spatial dependence is also extensively studied

by Anselin (1988, 1999), Anselin and Bera (1998), Anselin, Bera, Florax and Yoon (1996) to

mention a few.

With the increasing availability of micro as well as macro level panel data, spatial panel data

models studied in Anselin (1988) are becoming increasingly attractive in empirical economic

research. See Case (1991), Kelejian and Robinson (1992), Case, Hines and Rosen (1993),

Holtz-Eakin (1994), Driscoll and Kraay (1998), Baltagi and Li (1999) and Bell and Bockstael

(2000) for a few applications. Convergence in growth models that use a pooled set of countries

over time could have spatial correlation as well as heterogeneity across countries to contend

with, see Delong and Summers (1991) and Islam (1995) to mention a few studies. County

level data over time, whether it is expenditures on police, or measuring air pollution levels can

be treated with these models. Also, state level expenditures over time on welfare bene…ts,

mass transit, etc. Household level survey data from villages observed over time to study

nutrition, female labor participation rates, or the e¤ects of education on wages could exhibit

spatial correlation as well as heterogeneity across households and this can be modeled with

a spatial error component model.

Estimation and testing using panel data models have also been extensively studied, see Hsiao

(1986) and Baltagi (2001), but these models ignore the spatial correlation. Heterogeneity

across the cross-sectional units is usually modeled with an error component model. A La-

grange multiplier test for random e¤ects was derived by Breusch and Pagan (1980), and an

extensive Monte Carlo on testing in this error component model was performed by Baltagi,

Chang and Li (1992). This paper extends the Breusch and Pagan LM test to the spatial

error component model. First, a joint LM test is derived which simultaneously tests for the

existence of spatial error correlation as well as random region e¤ects. This LM test is based

on the estimation of the model under the null hypothesis and its computation is simple requir-

ing only least squares residuals. This test is important, because ignoring spatial correlation

and heterogeneity due to the random region e¤ects will result in ine¢cient estimates and

1

Page 3

misleading inference. Next, two conditional LM tests are derived. One for the existence of

spatial error correlation assuming the presence of random region e¤ects, and the other for the

existence of random region e¤ects assuming the presence of spatial error correlation. These

tests guard against misleading inference caused by (i) one directional LM tests that ignore

the presence of random region e¤ects when testing for spatial error correlation, or (ii) one

directional LM tests that ignore the presence of spatial correlation when testing for random

region e¤ects.

Section 2 revisits the spatial error component model considered in Anselin (1988) and provides

the joint and conditional LM tests proposed in this paper. Only the …nal LM test statistics

are given in the paper. Their derivations are relegated to the Appendices. Section 3 compares

the performance of these LM tests as well as the corresponding likelihood ratio LR tests using

Monte Carlo experiments. Section 4 gives a summary and conclusion.

2THE MODEL AND TEST STATISTICS

Consider the following panel data regression model, see Baltagi (2001):

yti= X0

ti¯ + uti; i = 1;::;N;t = 1;¢¢¢ ;T;(2.1)

where ytiis the observation on the ith region for the tth time period, Xtidenotes the kx1

vector of observations on the non-stochastic regressors and utiis the regression disturbance.

In vector form, the disturbance vector of (2.1) is assumed to have random region e¤ects as

well as spatially autocorrelated residual disturbances, see Anselin (1988):

ut= ¹ + ²t;(2.2)

with

²t= ¸W²t+ ºt;(2.3)

where u0t= (ut1;::: ;utN), ²0t= (²t1;::: ;²tN) and ¹0= (¹1;¢¢¢ ;¹N) denote the vector of

random region e¤ects which are assumed to be IIN(0;¾2

¹): ¸ is the scalar spatial autoregres-

sive coe¢cient with j ¸ j< 1: W is a known N £ N spatial weight matrix whose diagonal

elements are zero. W also satis…es the condition that (IN¡¸W) is nonsingular for all j ¸ j< 1.

º0t= (ºt1;¢¢¢ ;ºtN); where ºtiis i:i:d: over i and t and is assumed to be N(0;¾2

process is also independent of the process f¹ig. One can rewrite (2.3) as

º): The fºtig

²t= (IN¡ ¸W)¡1ºt= B¡1ºt;(2.4)

2

Page 4

where B = IN¡ ¸W and INis an identity matrix of dimension N. The model (2.1) can be

rewritten in matrix notation as

y = X¯ + u;(2.5)

where y is now of dimension NT £ 1, X is NT £ k, ¯ is k £ 1 and u is NT £ 1: The

observations are ordered with t being the slow running index and i the fast running index,

i.e., y0= (y11;::: ;y1N;::: ;yT1;::: ;yTN): X is assumed to be of full column rank and its

elements are assumed to be asymptotically bounded in absolute value. Equation (2.2) can

be written in vector form as:

u = (¶T-IN)¹ + (IT-B¡1)º;(2.6)

where º0= (º01;¢¢¢ ;º0

dimension T and -denotes the Kronecker product. Under these assumptions, the variance-

covariance matrix for u can be written as

T), ¶T is a vector of ones of dimension T, IT is an identity matrix of

-u= ¾2

¹(JT-IN) + ¾2

º(IT-(B0B)¡1);(2.7)

where JTis a matrix of ones of dimension T. This variance-covariance matrix can be rewritten

as:

-u= ¾2

º

h¹JT-(TÁIN+ (B0B)¡1) + ET-(B0B)¡1i

¹=¾2

= ¾2

º§u;(2.8)

where Á = ¾2

(B0B)¡1i

§¡1

º,¹JT = JT=T; ET = IT¡¹JT and §u=

: Using results in Wansbeek and Kapteyn (1983), §¡1

h¹JT-(TÁIN+ (B0B)¡1) + ET-

u

is given by

u =¹JT-(TÁIN+ (B0B)¡1)¡1+ ET-B0B:(2.9)

Also, j§uj = jTÁIN+ (B0B)¡1j ¢ j(B0B)¡1jT¡1: Under the assumption of normality, the log-

likelihood function for this model was derived by Anselin (1988, p.154) as

L = ¡NT

= ¡NT

2

ln2¼¾2

º¡1

º¡1

2lnj§uj ¡

2ln[jTÁIN+ (B0B)¡1j] +(T ¡ 1)

1

2¾2

º

u0§¡1

uu

2

1

ln2¼¾2

2

lnjB0Bj

¡

2¾2

º

u0§¡1

uu;(2.10)

with u = y ¡ X¯. Anselin (1988, p.154) derived the LM test for ¸ = 0 in this model. Here,

we extend Anselin’s work by deriving the joint test for spatial error correlation as well as

random region e¤ects.

The hypotheses under consideration in this paper are the following:

3

Page 5

(a) Ha

0: ¸ = ¾2

¹= 0, and the alternative Ha

1is that at least one component is not zero.

(b) Hb

0: ¾2

Hb

1is that ¾2

¹= 0 (assuming no spatial correlation, i.e., ¸ = 0), and the one-sided alternative

¹> 0 (assuming ¸ = 0).

(c) Hc

0: ¸ = 0 (assuming no random e¤ects, i.e., ¾2

Hc

1: ¸ 6= 0 (assuming ¾2

(d) Hd

0: ¸ = 0 (assuming the possible existence of random e¤ects, i.e., ¾2

two-sided alternative is Hd

1: ¸ 6= 0 (assuming ¾2

(e) He

0: ¾2

or di¤erent from zero), and the one-sided alternative is He

¹= 0), and the two-sided alternative is

¹= 0).

¹¸ 0), and the

¹¸ 0).

¹= 0 (assuming the possible existence of spatial correlation, i.e., ¸ may be zero

1: ¾2

¹> 0 (assuming that ¸

may be zero or di¤erent from zero).

In the next sections, we derive the corresponding LM tests for these hypotheses and we

compare their performance with the corresponding LR tests using Monte Carlo experiments.

2.1Joint LM Test for Ha

0: ¸ = ¾2

¹= 0

The joint LM test statistic for testing Ha

0: ¸ = ¾2

¹= 0 vs Ha

1is given by

LMJ=

NT

2(T ¡ 1)G2+N2T

~ u0(JT- IN)~ u

~ u0~ u

b

H2; (2.11)

where G =

¡ 1, H =

~ u0(IT- W)~ u

~ u0~ u

, b = tr(W + W0)2=2 = tr(W2+ W0W) and ~ u

denotes the OLS residuals. The derivation of this LM test statistic is given in Appendix A.1.

It is important to note that the large sample distribution of the LM test statistics derived

in this paper are not formally established, but are likely to hold under similar sets of low

level assumptions developed in Kelejian and Prucha (2001) for the Moran I test statistic

and its close cousins the LM tests for spatial correlation. See also Pinkse (1998, 1999) for

general conditions under which Moran ‡avoured tests for spatial correlation have a limiting

normal distribution in the presence of nuisance parameters in six frequently encountered

spatial models. Section 2.4 shows that the one-sided version of this joint LM test should be

used because variance components cannot be negative

2.2 Marginal LM Test for Hb

0: ¾2

¹= 0 (assuming ¸ = 0)

Note that the …rst term in (2.11), call it LMG=

for testing Hb

0: ¾2

NT

2(T¡1)G2; is the basis for the LM test statistic

¹= 0 assuming there are no spatial error dependence e¤ects, i.e., assuming

4

Page 6

that ¸ = 0, see Breusch and Pagan (1980). This LM statistic should be asymptotically

distributed as Â2

1under Hb

0as N ! 1; for a given T. But this LM test has the problem

that the alternative hypothesis is assumed to be two-sided when we know that the variance

component cannot be negative. Honda (1985) suggested a uniformly most powerful test for

Hb

0based upon the square root of the G2term, i.e.,

s

LM1=

NT

2(T ¡ 1)G:(2.12)

This should be asymptotically distributed as N(0,1) under Hb

0as N ! 1; for T …xed.

Moulton and Randolph(1989) showed that the asymptotic N(0,1) approximation for this

one sided LM test can be poor even in large samples. This occurs when the number of

regressors is large or the intra-class correlation of some of the regressors is high.They

suggest an alternative standardized LM (SLM) test statistic whose asymptotic critical values

are generally closer to the exact critical values than those of the LM test. This SLM test

statistic centers and scales the one sided LM statistic so that its mean is zero and its variance

is one:

SLM1=LM1¡ E(LM1)

pvar(LM1)

where d1 =

~ u0~ u

normality assumption and results on moments of quadratic forms in regression residuals (see

=d1¡ E(d1)

pvar(d1)

;(2.13)

~ u0D1~ u

and D1 = (JT-IN) with ~ u denoting the OLS residuals. Using the

e.g. Evans and King, 1985), we get

E(d1) = tr(D1M)=s;(2.14)

where s = NT ¡ k and M = INT¡ X(X0X)¡1X0. Also.

var(d1) = 2fs tr(D1M)2¡ [tr(D1M)]2g=s2(s + 2): (2.15)

Under Hb

0; SLM1should be asymptotically distributed as N(0,1).

2.3 Marginal LM Test for Hc

0: ¸ = 0 (assuming ¾2

¹= 0)

Similarly, the second term in (2.11), call it LMH =

statistic for testing Hc

0: ¸ = 0 assuming there are no random regional e¤ects, i.e., assuming

that ¾2

¹= 0, see Anselin (1988). This LM statistic should be asymptotically distributed as

Â2

1under Hc

r

b

N2T

bH2; is the basis for the LM test

0. Alternatively, this can be obtained as

LM2=

N2T

H: (2.16)

5

Page 7

This LM2 test statistic should be asymptotically distributed as N(0;1) under Hc

0. The

corresponding standardized LM (SLM) test statistic is given by

SLM2=LM2¡ E(LM2)

pvar(LM2)

where d2=~ u0D2~ u

~ u0~ u

uted as N(0;1). SLM2should have asymptotic critical values that are generally closer to the

=d2¡ E(d2)

pvar(d2)

;(2.17)

and D2= (IT-W). Under Hc

0; SLM2should be asymptotically distrib-

corresponding exact critical values than those of the unstandardized LM2test statistic.

2.4One-Sided Joint LM Test for Ha

0: ¸ = ¾2

¹= 0

Following Honda (1985) for the two-way error component model, a handy one-sided test

statistic for Ha

0: ¸ = ¾2

¹= 0 is given by

LMH= (LM1+ LM2)=p2;(2.18)

which is asymptotically distributed N(0;1) under Ha

0.

Note that LM1in (2.12) can be negative for a speci…c application, especially when the true

variance component ¾2

¹is small and close to zero. Similarly, LM2in (2.16) can be negative

especially when the true ¸ is small and close to zero. Following Gourieroux, Holly and

Monfort (1982), here after GHM, we propose the following test for the joint null hypothesis

Ha

0:

Â2

m=

8

>

>

>

>

>

>

>

>

>

>

>

>

>

>

<

:

LM2

1+ LM2

2

if LM1 > 0; LM2 > 0

LM2

1

if LM1 > 0; LM2 · 0

if LM1 · 0; LM2 > 0

if LM1 · 0; LM2 · 0 ;

LM2

2

0

(2.19)

Under the null hypothesis Ha

0, Â2

mhas a mixed Â2- distribution:

Â2

m» (1

4)Â2(0) + (1

2)Â2(1) + (1

4)Â2(2); (2.20)

where Â2(0) equals zero with probability one. The weights (1

4);(1

2) and (1

4) follow from the

fact that LM1 and LM2 are asymptotically independent of each other and the results in

Gourieroux, Holly and Monfort (1982). The critical values for the mixed Â2

mare 7:289, 4:321

and 2:952 for ® = 0:01, 0:05 and 0:1, respectively.

6

Page 8

2.5LR Test for Ha

0: ¸ = ¾2

¹= 0

We also compute the Likelihood ratio (LR) test for Ha

0: ¸ = ¾2

¹= 0. Estimation of the

unrestricted log-likelihood function is obtained using the method of scoring. The details of

the estimation procedure are available upon request from the authors. Let b ¾2

then the unrestricted maximum log-likelihood estimator function is given by

º,bÁ,b¸ andb¯

denote the unrestricted maximum likelihood estimators and letb B = IN¡b¸W and b u = y¡X0b¯,

LU= ¡NT

2

ln2¼^ ¾2

º¡1

2ln[jTbÁIN+ (b B0b B)¡1j] + (T ¡ 1)lnjb Bj ¡

1

2b ¾2

º

^ u0b§¡1

u^ u;(2.21)

see Anselin (1988), whereb§ is obtained from (2.8) withb B replacing B andbÁ replacing Á: But

and the restricted maximum likelihood estimator of ¯ is~¯OLS, so that ~ u = y ¡ X0~¯OLS

are the OLS residuals and ~ ¾2

º= ~ u0~ u=NT. Therefore, the restricted maximum log-likelihood

function under Ha

0is given by

under the null hypothesis Ha

0, the variance-covariance matrix reduces to -¤

u= -u= ¾2

ºITN

LR= ¡NT

2

ln2¼~ ¾2

º¡

1

2~ ¾2

º

~ u0~ u: (2.22)

Hence, the likelihood ratio test statistic for Ha

0: ¸ = ¾2

¹= 0 is given by

LR¤

J= 2(LU¡ LR);(2.23)

and this should be asymptotically distributed as a mixture of Â2given in (2.20) under the

null hypothesis.

2.6Conditional LM Test for Hd

0: ¸ = 0 (assuming ¾2

¹¸ 0)

When one uses LM2; given by (2.16), to test Hc

random region e¤ects do not exist. This may lead to incorrect decisions especially when ¾2

0: ¸ = 0; one implicitly assumes that the

¹

is large. To overcome this problem, this section derives a conditional LM test for spatially

uncorrelated disturbances assuming the possible existence of random regional e¤ects. The

null hypothesis for this model is Hd

0: ¸ = 0 (assuming ¾2

the variance-covariance matrix reduces to -0= ¾2

of the one-way error component model, see Baltagi(1995), with -¡1

(¾2

º)¡1(ET-IN), where ¾2

to those for the joint LM-test, see Appendix A.1, we obtain the following LM test for Hd

¹¸ 0). Under the null hyphothesis,

¹JT-IN+ ¾2

= (¾2

ºINT. It is the familiar form

1)¡1(¹JT-IN) +

0

1= T¾2

¹+ ¾2

º; and ET = IT¡¹JT. Using derivations analogous

0vs

Hd

1,

7

Page 9

LM¸=

^D(¸)2

[(T ¡ 1) +^ ¾4

º

1]b

^ ¾4

,(2.24)

where

^D(¸) =1

2^ u0[^ ¾2

º

^ ¾4

1

(¹JT-(W0+ W)) +1

^ ¾2

º

(ET-(W0+ W))]^ u:

Here, ^ ¾2

º= ^ u0(ET-IN)^ u=N(T ¡ 1) and ^ ¾2

estimates of ¾2

ºand ¾2

null hypothesis Hd

0. See Appendix A.2 for more details.

1= ^ u0(¹ JT-IN)^ u=N are the maximum likelihood

0, and ^ u denotes the maximum likelihood residuals under the

1under Hd

Therefore, the one-sided test for zero spatial error dependence (assuming ¾2

¹¸ 0) against an

alternative, say of ¸ > 0 is obtained from

LM¤

¸=

^D(¸)

r

[(T ¡ 1) +^ ¾4

º

1]b

^ ¾4

;(2.25)

and this test statistic should be asymptotically distributed as N(0;1) under Hd

0for N ! 1

and T …xed.

We can also get the LR test for Hd

0, using the scoring method. Details are available upon

request from the authors. Under the null hypothesis, the LR test statistic will have the same

asymptotic distribution as its LM counterpart.

2.7Conditional LM Test for He

0: ¾2

¹= 0 (assuming ¸ may or may not be

= 0)

Similarly, if one uses LM1; given by (2.12), to test Hb

0: ¾2

¹= 0; one is implicitly assuming

that no spatial error correlation exists. This may lead to incorrect decisions especially when

¸ is signi…cantly di¤erent from zero. To overcome this problem, this section derives a condi-

tional LM test for no random regional e¤ects assuming the possible existence of spatial error

correlation. The null hypothesis for this model is He

0: ¾2

¹= 0 (assuming ¸ may or may not

be = 0).

This LM test statistic is derived in Appendix A.3 and is given by

LM¹=^D0

¹

^J¡1

µ

^D¹;(2.26)

where

^D¹= ¡T

2b ¾2

º

tr(b B0b B) +

1

2b ¾4

º

b u0[JT-(b B0b B)2]b u;(2.27)

8

Page 10

and

b Jµ=

2

4

66

TN

2b ¾2

º

NT

2b ¾2

ºtr[(W0b B +b B0W) + (b B0b B)¡1]

T

2b ¾4

T2

2b ¾4

ºtr[b B0b B]

ºtr[(b B0b B)2]

T

2tr£¡(W0b B +b B0W) + (b B0b B)¡1¢2¤

T

2b ¾2

ºtr[W0b B +b B0W]

3

5;

77

(2.28)

=

T

2^ ¾4

º

2

4

N

ºg

h

^ ¾2

^ ¾4

^ ¾2

ºg

ºc

ºd

h

ºd

Te

^ ¾2

^ ¾2

3

5: (2.29)

where g = tr[(W0b B +b B0W)(b B0b B)¡1], h = tr[b B0b B], c = tr

·³

(W0b B +b B0W)(b B0b B)¡1´2¸

, d =

tr[W0b B +b B0W] and e = tr[(b B0b B)2]. Therefore,

LM¹

³

wherebD¹andb Jµare evaluated at the maximum likelihood estimates under the null hypoth-

Therefore, the one-sided version of this LM test is given by

q

TN^ ¾4

= (^D¹)2³2^ ¾4

N^ ¾4

º

T

´³

TN^ ¾4

ºg2´

ºec ¡ N^ ¾4

ºd2¡ T^ ¾4

ºg2e + 2^ ¾4

ºghd ¡ ^ ¾4

ºh2c

´¡1

ºc ¡ ^ ¾4

: (2.30)

esis He

0. However, LM¹ignores the fact that the variance component cannot be negative.

LM¤

¹=

^D¹

(2^ ¾4

º=T)(N^ ¾4

ºc ¡ ^ ¾4

ºg2e + 2^ ¾4

ºg2)

q

ºec ¡ N^ ¾4

ºd2¡ T^ ¾4

ºghd ¡ ^ ¾4

ºh2c

(2.31)

and this should be asymptotically distributed as N(0;1) under He

0as N ! 1 for T …xed.

3MONTE CARLO RESULTS

The experimental design for the Monte Carlo simulations is based on the format extensively

used in earlier studies in the spatial regression model by Anselin and Rey (1991) and Anselin

and Florax (1995) and in the panel data model by Nerlove (1971).

The model is set as follows :

yit= ® + x0

it¯ + uit;i = 1;¢¢¢N; t = 1;¢¢¢ ;T;(3.1)

where ® = 5 and ¯ = 0:5. xitis generated by a similar method to that of Nerlove (1971). In

fact, xit= 0:1t+0:5xi;t¡1+zit, where zitis uniformly distributed over the interval [¡0:5;0:5].

The initial values xi0are chosen as (5 + 10zi0). For the disturbances, uit= ¹i+ "it, "it=

¸PN

9

j=1wij"it+ ºit with ¹i» IIN(0;¾2

¹) and ºit» IIN(0;¾2

º): The matrix W is either a

Page 11

rook or a queen type weight matrix, and the rows of this matrix are standardized so that they

sum to one.1We …x ¾2

¹+¾2

º= 20 and let ½ = ¾2

¹=(¾2

¹+¾2

º) vary over the set (0; 0:2; 0:5; 0:8).

The spatial autocorrelation factor ¸ is varied over a positive range from 0 to 0:9 by increments

of 0:1. Two values for N = 25 and 49, and two values for T = 3 and 7 are chosen. In total,

this amounts to 320 experiments.2For each experiment, the joint, conditional and marginal

LM and LR tests are computed and 2000 replications are performed. In a …rst draft of this

paper we reported the two-sided LM and LR test results to show how misleading the results

of these tests can be. These results are available upon request from the authors. In this

version, we focus on the one-sided version of these tests except for testing Hb

0: ¾2

¹= 0 where

we thought a warning should be given to applied econometricans using packages that still

report two-sided versions of this test.

3.1Joint Tests for Ha

0: ¸ = ¾2

¹= 0

Table 1 gives the frequency of rejections at the 5% level for the handy one-sided Honda-type

LM test statistic LMHgiven in (2.18), the GHM test statistic given in (2.19) and LR¤

Jgiven

in (2.23). The results are reported for N = 25;49 and T = 3;7 for both the Queen and Rook

weight matrices based on 2000 replications. Table 1 shows that at the 5% level, the size of

the joint LR test (LR¤

J) is not signi…cantly di¤erent from 0:05 for all values of N and T and

choice of the weight matrix W. The same is true for LMHand GHM except for N = 25 and

T = 3 where they are undersized. The power of all three tests is reasonably high as long as

¸ > 0:3 or ½ > 0:2. In fact, for ½ ¸ 0:5 this power is almost one in all cases. For a …xed ¸ or

½, this power improves as N or T increase.

1The weight matrix with …rst-order contiguity according to the rook criterion has the cells immediately

above, below, to the right, and to the left, for a total of four neighboring cells. The weight matrix with …rst

order contiguity according to the queen criterion is eight cells immediately surrounding the central cell, see

Anselin and Rey (1991).

2The Monte Carlo experiments were also run for negative ¸ ranging between -0.1 and -0.9. The results

were similar and are not reproduced here to save space.

10

Page 12

Table 1

Joint Tests for Ha

0; ¸ = ¾2

¹= 0

Frequency of Rejections in 2000 Replications

Weight Matrix is ROOK

½ = 0:0

GHM

½ = 0:2

GHM

½ = 0:5

GHM

N, T

¸ LMH

LR¤

J

LMH

LR¤

J

LMH

LR¤

J

25, 30.0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

0.021

0.073

0.154

0.277

0.469

0.634

0.832

0.950

0.987

1.000

0.022

0.074

0.198

0.414

0.688

0.876

0.967

0.999

1.000

1.000

0.048

0.089

0.219

0.435

0.728

0.900

0.976

1.000

1.000

1.000

0.241

0.359

0.474

0.605

0.727

0.845

0.934

0.973

0.995

1.000

0.351

0.386

0.432

0.566

0.711

0.844

0.953

0.984

0.999

1.000

0.379

0.405

0.473

0.633

0.788

0.909

0.978

0.996

1.000

1.000

0.825

0.875

0.920

0.944

0.963

0.983

0.989

0.997

0.999

1.000

0.961

0.967

0.969

0.970

0.976

0.980

0.988

0.996

0.997

1.000

0.963

0.970

0.973

0.980

0.989

0.996

0.998

0.999

1.000

1.000

25, 7 0.0

0.1

0.2

0.3

0.4

0.5

0.6

0.038

0.115

0.299

0.611

0.866

0.975

0.999

0.039

0.144

0.450

0.827

0.983

0.999

1.000

0.061

0.151

0.463

0.836

0.984

0.999

1.000

0.805

0.916

0.962

0.986

0.997

1.000

1.000

0.895

0.940

0.949

0.984

0.997

1.000

1.000

0.890

0.916

0.947

0.986

0.997

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

49, 30.0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.035

0.120

0.289

0.513

0.782

0.920

0.993

0.999

0.041

0.133

0.384

0.724

0.948

0.992

1.000

1.000

0.062

0.135

0.403

0.738

0.956

0.992

1.000

1.000

0.440

0.613

0.786

0.902

0.965

0.989

1.000

1.000

0.608

0.638

0.750

0.860

0.946

0.994

0.999

1.000

0.613

0.633

0.767

0.895

0.969

0.997

1.000

1.000

0.979

0.996

0.999

1.000

1.000

1.000

1.000

1.000

0.999

1.000

1.000

1.000

1.000

1.000

1.000

1.000

0.999

1.000

1.000

1.000

1.000

1.000

1.000

1.000

49, 70.0

0.1

0.2

0.3

0.4

0.5

0.033

0.188

0.563

0.895

0.993

1.000

0.040

0.259

0.779

0.984

1.000

1.000

0.050

0.263

0.775

0.986

1.000

1.000

0.977

0.994

0.999

1.000

1.000

1.000

0.996

0.997

0.999

1.000

1.000

1.000

0.994

0.996

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

11

Page 13

Table 1 (continued)

Joint Tests for Ha

0; ¸ = ¾2

¹= 0

Frequency of Rejections in 2000 Replications

Weight Matrix is QUEEN

½ = 0:0

GHM

½ = 0:2

GHM

½ = 0:5

GHM

N, T

¸ LMH

LR¤

J

LMH

LR¤

J

LMH

LR¤

J

25, 3 0.0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

0.020

0.059

0.112

0.229

0.379

0.576

0.771

0.916

0.972

0.999

0.029

0.067

0.151

0.299

0.536

0.748

0.895

0.975

0.997

1.000

0.064

0.066

0.140

0.282

0.514

0.743

0.891

0.974

0.997

1.000

0.216

0.301

0.375

0.510

0.638

0.786

0.903

0.970

0.992

1.000

0.344

0.369

0.402

0.505

0.608

0.764

0.899

0.973

0.992

1.000

0.372

0.380

0.411

0.519

0.650

0.806

0.923

0.980

0.996

1.000

0.822

0.864

0.902

0.932

0.954

0.970

0.985

0.997

0.999

1.000

0.955

0.962

0.967

0.977

0.973

0.983

0.990

0.993

0.999

1.000

0.958

0.967

0.968

0.981

0.984

0.992

0.995

1.000

0.999

1.000

25, 70.0

0.1

0.2

0.3

0.4

0.5

0.6

0.040

0.109

0.226

0.493

0.772

0.937

0.997

0.042

0.131

0.337

0.679

0.893

0.987

0.999

0.056

0.117

0.317

0.646

0.883

0.987

0.999

0.782

0.870

0.937

0.964

0.995

0.999

1.000

0.893

0.920

0.936

0.956

0.990

0.999

1.000

0.876

0.904

0.932

0.951

0.989

0.999

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

49, 3 0.0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.029

0.094

0.212

0.392

0.641

0.862

0.968

1.000

0.032

0.108

0.259

0.546

0.797

0.959

0.991

1.000

0.057

0.100

0.232

0.517

0.782

0.953

0.993

1.000

0.406

0.552

0.719

0.811

0.915

0.972

0.993

1.000

0.6070

0.6380

0.7140

0.7860

0.8890

0.9650

0.9940

0.9990

0.622

0.636

0.716

0.804

0.901

0.973

0.995

1.000

0.990

0.992

0.998

0.999

0.999

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

49, 7 0.0

0.1

0.2

0.3

0.4

0.5

0.6

0.052

0.156

0.419

0.775

0.961

0.992

1.000

0.056

0.167

0.566

0.908

0.995

1.000

1.000

0.056

0.153

0.536

0.899

0.994

1.000

1.000

0.961

0.989

0.998

1.000

1.000

1.000

1.000

0.994

0.993

0.998

1.000

1.000

1.000

1.000

0.995

0.995

0.996

0.999

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

1.000

12

Page 14

3.2Marginal and Conditional Tests for ¸ = 0

Figure 1 plots the frequency of rejections in 2000 replications for testing ¸ = 0, i.e., zero

spatial error correlation. Figure 1 reports these frequencies for various values of N = 25;49

and T = 3;7, for both Rook and Queen weight matrices. Marginal tests for Hc

0: ¸ = 0

(assuming ¾2

¹= 0) as well as conditional tests for Hd

for various values of ¸. As clear from the graphs, marginal tests can have misleading size

0: ¸ = 0 (assuming ¾2

¹¸ 0) are plotted

when ½ is large (0:5 or 0:8). Marginal tests also have lower power than conditional tests for

½ > 0:2 and 0:2 · ¸ · 0:8. This is true whether we use LM or LR type tests. This di¤erence

in power is quite substantial for example when ½ = 0:8 and ¸ = 0:6. This phenomena persists

even when we increase N or T. However, it is important to note that marginal tests still

detect that something is wrong when ½ is large.

3.3Marginal and Conditional Tests for ¾2

¹= 0

Table 2 gives the frequency of rejections in 2000 replications for the marginal LR and LM

tests for Hb

0: ¾2

¹= 0 (assuming ¸ = 0). The results are reported only when ¾2

N = 25;49 and T = 3;7 for both the Queen and Rook weight matrices. Table 2 shows

¹= 0 for

that at the 5% level, the size of the two-sided LM test (LMG) for Hb

0(compared to its one

sided counterpart LM1) could be missleading, especially when ¸ is large. For example, for

the Queen weight matrix when N = 49; T = 7 and ¸ = 0:9, the frequency of rejection for

LMGis 50:4% whereas the corresponding one-sided LM (LM1) has a size of 7:6%: The two-

sided likelihood ratio (LRG) test for Hb

0performs better than its two-sided LM counterpart

(LMG). However, in most experiments, LRGunderestimates its size and is outperformed by

its one-sided LR alternative (LR1).

Table 2 also gives the frequency of rejections in 2000 replications for the conditional LR

and LM tests (LR¤

Section 2.2. The results are reported only when ¾2

¹and LM¤

¹) for He

0: ¾2

¹= 0 (assuming ¸ 6= 0). These were derived in

¹= 0 for N = 25;49 and T = 3;7 for

both the Queen and Rook weight matrices. For most experiments, the conditional LM and

LR tests have size not signi…cantly di¤erent from 5%. For cases where ¸ is large, conditional

tests have better size than marginal tests. For example, when the weight matrix is Queen,

N = 49;T = 3 and ¸ = 0:9, the frequency of rejections at the 5% signi…cance level, when the

null is true, is 11:4% and 12% for LM1and LR1compared to 4:9% and 4:3% for LM¤

LR¤

¹.

¹and

13

Page 15

Figure 1A

Tests for λ = 0

Frequency of Rejections in 2000 Replications

Marginal Tests and Conditional Tests

N=25, T=3

Weight is Rook ρ = 0.0

1

2

3

1

3

1

1

1

1

1

1

1

2

3

4

1

2

3

4

2

4

2

3

2

3

2

3

2

3

2

3

4

2

3

4

4

4

4

4

4

lambda

Power

0.0

0.2

0.4

0.6

0.8

1.0

00.1 0.20.30.40.5 0.60.7 0.80.9

1

2

3

4

conditional-LM

conditional-LR

marginal-LM

marginal-LR

Weight is Queen ρ = 0.0

1

2

3

1

2

3

4

1

1

1

1

1

1

1

4

1

2

3

4

2

3

4

2

3

4

2

3

4

2

3

4

2

3

4

2

3

2

3

4

4

lambda

Power

0.0

0.2

0.4

0.6

0.8

1.0

00.10.20.30.40.5 0.60.70.8 0.9

1

2

3

4

conditional-LM

conditional-LR

marginal-LM

marginal-LR

Weight is Rook ρ = 0.2

1

2

1

2

3

4

1

3

1

3

1

3

1

3

1

3

4

1

2

3

4

1

2

3

4

1

2

3

4

2

4

2

2

2

2

3

4

4

4

4

lambda

Power

0.0

0.2

0.4

0.6

0.8

1.0

00.10.20.3 0.40.50.60.70.8 0.9

Weight is Queen ρ = 0.2

1

2

1

2

3

1

2

3

4

1

3

4

1

3

4

1

3

4

1

3

4

1

3

4

1

2

3

4

1

2

3

4

2

2

2

2

2

3

4

4

lambda

Power

0.0

0.2

0.4

0.6

0.8

1.0

00.10.20.3 0.40.50.60.70.80.9

Weight is Rook ρ = 0.5

1

2

1

2

1

3

1

1

1

1

1

2

1

2

3

4

1

2

3

4

2

4

2

2

2

2

3

3

3

3

3

3

3

4

4

4

4

4

4

4

lambda

Power

0.0

0.2

0.4

0.6

0.8

1.0

00.10.20.30.40.50.60.70.80.9

Weight is Queen ρ = 0.5

1

2

1

2

1

2

3

1

2

1

2

1

2

1

2

1

2

1

2

1

2

3

4

33

3

4

3

4

3

4

3

4

3

4

3

4

4

4

4

lambda

Power

0.0

0.2

0.4

0.6

0.8

1.0

00.10.20.30.40.50.60.70.80.9

Weight is Rook ρ = 0.8

1

2

1

1

1

1

1

1

1

2

1

2

1

2

2

2

3

2

2

2

2

3

3

3

3

3

3

3

3

3

4

4

4

4

4

4

4

4

4

4

lambda

Power

0.0

0.2

0.4

0.6

0.8

1.0

00.10.20.30.40.50.60.70.80.9

Weight is Queen ρ = 0.8

1

2

1

2

1

2

1

2

4

1

2

1

2

1

2

1

2

1

2

1

2

3

3

3

3

3

3

3

3

4

3

4

3

4

4

4

4

4

4

4

lambda

Power

0.0

0.2

0.4

0.6

0.8

1.0

00.10.20.30.40.50.60.70.80.9

1