scieee AI-readable full text Open interactive document viewer

Testing in a random effects panel data model with spatially correlated error components and spatially lagged dependent variables

He, Ming,Lin, Kuan-Pin

Abstract

EconStor is a publication server for scholarly economic literature, provided as a non-commercial public service by the ZBW.

Full text

He, Ming; Lin, Kuan-Pin Article Testing in a random effects panel data model with spatially correlated error components and spatially lagged dependent variables Econometrics Provided in Cooperation with: MDPI – Multidisciplinary Digital Publishing Institute, Basel Suggested Citation: He, Ming; Lin, Kuan-Pin (2015) : Testing in a random effects panel data model with spatially correlated error components and spatially lagged dependent variables, Econometrics, ISSN 2225-1146, MDPI, Basel, Vol. 3, Iss. 4, pp. 761-796, https://doi.org/10.3390/econometrics3040761 This Version is available at: https://hdl.handle.net/10419/171856 Standard-Nutzungsbedingungen: Die Dokumente auf EconStor dürfen zu eigenen wissenschaftlichen Zwecken und zum Privatgebrauch gespeichert und kopiert werden. Sie dürfen die Dokumente nicht für öffentliche oder kommerzielle Zwecke vervielfältigen, öffentlich ausstellen, öffentlich zugänglich machen, vertreiben oder anderweitig nutzen. Sofern die Verfasser die Dokumente unter Open-Content-Lizenzen (insbesondere CC-Lizenzen) zur Verfügung gestellt haben sollten, gelten abweichend von diesen Nutzungsbedingungen die in der dort genannten Lizenz gewährten Nutzungsrechte. Terms of use: Documents in EconStor may be saved and copied for your personal and scholarly purposes. You are not to copy documents for public or commercial purposes, to exhibit the documents publicly, to make them publicly available on the internet, or to distribute or otherwise use the documents in public. If the documents have been made available under an Open Content Licence (especially Creative Commons Licences), you may exercise further usage rights as specified in the indicated licence. http://creativecommons.org/licenses/by/4.0/ Econometrics 2015,3, 761-796; doi:10.3390/econometrics3040761 OPEN ACCESS econometrics ISSN 2225-1146 www.mdpi.com/journal/econometrics Article Testing in a Random Effects Panel Data Model with Spatially Correlated Error Components and Spatially Lagged Dependent Variables Ming He 1,* and Kuan-Pin Lin 2 1Department of Economics, University of Washington, Seattle, WA 98195, USA 2Department of Economics, Portland State University, Portland, OR 97201, USA; E-Mail: [email protected] *Author to whom correspondence should be addressed; E-Mail: [email protected]; Tel.: +1-503-863-9798. Academic Editor: Kerry Patterson Received: 6 August 2015 / Accepted: 26 October 2015 / Published: 9 November 2015 Abstract: We propose a random effects panel data model with both spatially correlated error components and spatially lagged dependent variables. We focus on diagnostic testing procedures and derive Lagrange multiplier (LM) test statistics for a variety of hypotheses within this model. We first construct the joint LM test for both the individual random effects and the two spatial effects (spatial error correlation and spatial lag dependence). We then provide LM tests for the individual random effects and for the two spatial effects separately. In addition, in order to guard against local model misspecification, we derive locally adjusted (robust) LM tests based on the Bera and Yoon principle (Bera and Yoon, 1993). We conduct a small Monte Carlo simulation to show the good finite sample performances of these LM test statistics and revisit the cigarette demand example in Baltagi and Levin (1992) to illustrate our testing procedures. Keywords: individual random effects; spatial error correlation; spatial lag dependence; lagrange multiplier (LM) test; (robust) LM test JEL classifications: C12; C21; C23 Econometrics 2015,3762 1. Introduction Spatial econometric models have been extensively used to study regional effects and interdependence between different spatial units. Most of the widely used spatial models are variants of the benchmark models developed in Cliff and Ord (1973, 1981) [1,2] and Anselin (1988a) [3]. Based on the form of spatially correlated error components and/or spatially lagged dependent variables, these models better fit the real world data generating process by explicitly considering the spatial interdependence. Hypothesis testing for spatial dependence has been developed rapidly in the recent literature. For standard LM tests of spatial dependence in cross section models, see Anselin (1988a, b) [3,4], Anselin and Bera (1998) [5], and Anselin (2001) [6]. For standard LM tests of spatial dependence in panel data models, Baltagi et al., (2003) [7] provide tests for random effects and/or spatial error correlation. Baltagi and Liu (2008) [8] provide tests for random effects and/or spatial lag dependence. Debarsy and Ertur (2010) [9] derive tests in the spatial panel data model with individual fixed effects based on Lee and Yu (2010) [10]. Qu and Lee (2012) [11] consider tests in spatial models with limited dependent variables. Baltagi et al., (2013) [12] extend the model in Kapoor et al., (2007) [13] by allowing for different spatial correlation parameters in the individual random effects and in the disturbances, and they derive the corresponding LM tests. Further, standardized versions of the LM tests are discussed in Yang (2010) [14], Baltagi and Yang (2013a) [15] to remedy distributional misspecifications in finite sample and sensitivity to spatial layout. Born and Breitung (2011) [16], Baltagi and Yang (2013b) [17] discuss versions of LM tests that are robust against unknown heteroskedasticity. Recently, Yang (2015) [18] provides residual-based bootstrap procedure to obtain improved approximations to the finite sample critical values of the LM test statistics in spatial econometric models. However, to the best of our knowledge, there are no test statistics treating the individual random effects, the spatial error correlation, and the spatial lag dependence simultaneously. We contribute to the literature by constructing various LM test statistics in such a general framework, or the so-called spatial autoregressive model with autoregressive disturbances (SARAR). Our results are useful for applied researchers to implement and perform model diagnostic testing in the SARAR framework. In particular, we first derive the joint LM test for the individual random effects and the two spatial effects. We next derive LM tests for the individual random effects. Finally, we derive LM tests for the two spatial effects. In addition, we provide robust LM tests in some cases as needed in order to guard against local misspecification. We emphasize some key features of the robust LM test in the following. Bera and Yoon (1993) [19] argue that the LM test with specific values of the nuisance parameters (marginal LM test) might suffer from local misspecification in the nuisance parameters. They propose robust LM test to guard against such local misspecification, see also Anselin et al., (1996) [20], Bera et al., (2001, 2009, 2010) [21–23], and He and Lin (2013) [24]. Here, we emphasize two advantages of the robust LM test. First, the asymptotic size of marginal LM test will be distorted under local misspecification in the nuisance parameters since it follows a non-central χ2distribution. On the other hand, robust LM test follows a χ2distribution under such misspecification, thus it can provide valid asymptotic size as long as the misspecification is local. Second, while LM test without specifying values of the nuisance parameters (conditional LM test) does not suffer from such size distortion, it generally needs the maximum likelihood estimator (MLE), which could be costly in computation. In contrast, the Econometrics 2015,3763 robust LM test only requires restricted estimator under the relevant joint null hypothesis, which is simply the ordinary least square (OLS) estimator in most cases. Therefore, the robust LM test can provide result as good as the conditional LM test at a lower computational cost, provided that the deviation of nuisance parameters is local. However, there is one potential loss in using the robust LM test. If the values of nuisance parameters are correctly specified, the robust LM test is in general less powerful than the marginal LM test. Also, when the nuisance parameters deviate far away from the pre-specified values, the robust LM test is generally invalid. In sum, the standard LM tests (marginal and conditional LM tests) and the robust LM tests complement each other, and they should be used together for inference purposes. In this paper, we maintain the assumption of random effects model, while an alternative specification is the fixed effects model with spatial dependence as in Lee and Yu (2010) [10], Debarsy and Ertur (2010) [9], and He and Lin (2013) [24]. On the one hand, the random effects specification is a parsimonious way to allow for individual effects in different spatial units and it will be particularly useful for testing and selection in microeconometric applications when the number of units is very large. On the other hand, the fixed effects specification, which allows for correlation between the individual effects and the covariates, is more suited for many macro studies when the number of units is not very large (see Elhorst (2014) [25] for more discussion on comparison of the random effects model and the fixed effects model). The rest of the paper is organized as follows. Model specification is discussed in Section 2. The LM test statistics are presented In Section 3. In Section 4, we report the Monte Carlo simulation results to show their satisfactory finite sample size and power performances. In Section 5, we provide an empirical example to illustrate our testing procedures. Section 6 concludes with suggestions for future research. All mathematical derivations are relegated to the Appendices. 2. The Model Suppose that the data is generated according to the following spatial panel data model, for t= 1,2,···, T, (yt=λWyt+Xtβ+t, t=ρMt+µ+vt.(2.1) In the above specification, yt= (yt1, yt2,···, ytN )0is an N×1vector of dependent variable for period t. It is spatially interdependent, as reflected by the spatial lag dependence coefficient λ.Xtis an N×(K+1) matrix of non-stochastic regressors for period t, with the first column to be ones, and β= (β0, β1,···, βK)0 is the corresponding (K+1)×1slope parameter vector. t= (t1, t2,···, tN )0is an N×1vector of the regression error term for period t. The error vector is also spatially correlated, as reflected by the spatial error correlation coefficient ρ.µ= (µ1, µ2,· · ·, µN)0is an N×1vector representing the individual random effects. The random effects terms {µi}, i = 1,···, N are i.i.d. across i, with zero mean, variance σ2 µand E|µi|4+c1<∞for some c1>0.vt= (vt1, vt2,···, vtN )0is an N×1vector of innovation terms. The innovation terms {vti}, t = 1,···, T, i = 1,···, N are i.i.d. across iand t, with zero mean, variance σ2 vand E|vti|4+c2<∞for some c2>0(see Lee and Yu (2012) [26] for other regularity and identification conditions as needed for asymptotic theory). Wand Mare nonstochastic spatial weights Econometrics 2015,3764 matrices of size N×N. Typically, they are specified by the first-order rook contiguity criterion and are row-standardized so that each row sums up to one. By stacking across t, the model can be written as (y=λ(IT⊗W)y+Xβ +, =ρ(IT⊗M)+ιT⊗µ+v, (2.2) where y= (y0 1, y0 2,···, y0 T)0, X = (X0 1, X0 2,···, X0 T)0,  = (0 1, 0 2,···, 0 T)0, and v= (v0 1, v0 2,···, v0 T)0. ιTis a T×1vector of ones, Idenotes the identity matrix with its dimension in the subscript, and ⊗denotes the kronecker product. Let A= [IT⊗(IN−ρM)], and B= [IT⊗(IN−λW)]. The error component is expressed as =A−1(ιT⊗µ+v), with E[]=0, Var[]=Ω=A−1Ω(A−1)0, where Ω=[JT⊗(σ2 µIN) + IT⊗(σ2 vIN)]. Using the results in Magnus (1982) [27], we get Ω−1= (Tσ2 µ+σ2 v)−1¯ JT⊗IN+ (σ2 v)−1ET⊗IN, and |Ω|= (Tσ2 µ+σ2 v)N(σ2 v)N(T−1), where ¯ JT=JT/T, JT=ιTι0 T,ET=IT−¯ JT. Notice that y=B−1Xβ +B−1, with E[y] = B−1Xβ and Var[y]=Ωy= B−1A−1Ω(A−1)0(B−1)0. We have Ω−1 y=B0A0Ω−1AB, and |Ωy|=|B|−2|A|−2(Tσ2 µ+σ2 v)N(σ2 v)N(T−1). Let δ= (β0, ρ, λ, σ2 µ, σ2 v)0and =By −Xβ, the log-likelihood function of the random vector yas if it is normally distributed is L(δ) = −NT 2ln(2π)−N 2ln Tσ2 µ+σ2 v−N(T−1) 2ln σ2 v+ln|A|+ln|B| − 1 20A0Ω−1A (2.3) 3. LM and Robust LM Test Statistics In this section, we provide explicit formulae for the LM test statistics. We first present the joint LM test for both the individual random effects and the spatial effects. We then provide LM test statistics for the individual random effects. Lastly, we present LM test statistics for the spatial effects, namely, the spatial error correlation and/or the spatial lag dependence.1In addition, we provide formulae for robust LM tests when necessary. Before presenting the LM test statistics, we introduce the following notations for easy reference. Let R1=M(IN−ρM)−1,R2=W(IN−ρM)−1,R3=W(IN−λW)−1, and R4= (IN−ρM0)(IN−ρM). Let bzρ=b0b A0b Ω−1(IT⊗M)b,bzλ=b0b A0b Ω−1b A(IT⊗W)y, and bzσ2 µ= [b0b A0(¯ JT⊗IN)b Ab]/bσ2 v−N, where b=b By −Xb β,b A,b B,b Ω,b β, and bσ2 vare restricted MLEs of A,B,Ω,β, and σ2 vunder the null hypotheses, respectively. Next, define bν=by0(IT⊗W0)b A0b Ω−1b A(IT⊗W)by,bτ=T2(b1b3−b2 2) + Tb1bω, where bω=by0(IT⊗W0)b A0[b Ω−1−b Ω−1b AX(X0b A0b Ω−1b AX)−1X0b A0b Ω−1]b A(IT⊗W)by,by=b B−1Xb β, b1=tr(M0M+MM), b2=tr(M0W+MW), b3=tr(W0W+WW), and tr(·)is the trace operator. Finally, let b ξ=NT b ϑ2+Nbω−2Tb ϑ2 3 Tb1(NT b ϑ2+Nbω−2Tb ϑ2 3)−N(Tb ϑ1)2,b ζ=Nb θ1−2b θ2 3 (Nb θ1−2b θ2 3)(Tb θ4+bω)−NT b θ2 2 1Notice that there are four cases for which we do not present the LM tests formulae, since these four cases are not particularly interesting. The null hypotheses for the four cases are: σ2 µ=ρ= 0 (λ= 0),σ2 µ=ρ= 0 (λ6= 0), σ2 µ=λ= 0 (ρ= 0) and σ2 µ=λ= 0 (ρ6= 0). The LM tests formulae for these four cases are not presented in the paper, but they are available upon request from the authors. Econometrics 2015,3765 where b ϑ1=tr[(M+M0)b R3],b ϑ2=tr(b R3b R3+b R3b R0 3),b ϑ3=tr(b R3),b θ1=tr b R1b R1+b R1b R0 1, b θ2=tr hWb R1+b R2b R0 1(IN−bρM)i,b θ3=tr(b R1),b θ4=tr(WW) + tr b R2b R0 2b R4, and b R1,b R2,b R3,b R4are restricted MLEs of R1, R2, R3, R4, respectively. 3.1. Jointly Testing for Random Effects and Spatial Effects Now we are ready to present the test statistics. We first construct the joint LM test statistic for the individual random effects and the spatial effects, namely, the spatial error correlation and the spatial lag dependence. The joint hypothesis is Ha 0:σ2 µ=ρ=λ= 0 vs. Ha 1: at least one of σ2 µ, ρ and λis not zero. Thus we are testing the classical pooled panel data model against the full specification in (2.1), the LM test in this case is given by LMa=Tb3+bωa bτabz2 ρ,a +Tb1 bτabz2 λ,a −2Tb2 bτabzρ,abzλ,a +T 2N(T−1)bz2 σ2 µ,a,(3.1) where bωa= [by0 a(IT⊗W0)(INT −X(X0X)−1X0)(IT⊗W)bya]/bσ2 v,a,bσ2 v,a = (b0 aba)/(NT),ba=y−bya, bya=Xb βa,bτa=T2(b1b3−b2 2) + Tb1bωa,bzρ,a = [b0 a(IT⊗M)ba]/bσ2 v,a,bzλ,a = [b0 a(IT⊗W)y]/bσ2 v,a, bzµ,a = [b0 a(¯ JT⊗IN)ba]/bσ2 v,a −N, and b βais the OLS estimator of β. Under Ha 0,LMais asymptotically distributed as χ2 3, where χ2 ddenotes the χ2distribution with degree of freedom d. The test statistic LMais useful in practice, and it is simple to compute since only the OLS estimator is required. Researchers should first use this joint LM test to determine if there is individual random effects and/or spatial effects in the general specification (2.1). If the joint null hypothesis cannot be rejected, then it is reasonable to just adopt the classical pooled panel data model. Otherwise either the individual random effects, or the spatial error correlation, or the spatial lag dependence need to be considered. As in Baltagi et al., (2003) [7], we do not provide formal proofs for the asymptotic null distributions of the LM test statistics in this paper, but these distributions are likely to hold by using the Central Limit Theorems (CLTs) in Kelejian and Prucha (2001, 2010) [28,29] under similar sets of low level assumptions in their papers. 3.2. Testing for Random Effects In this section, we focus on testing for the individual random effects in various spatial panel data models. We provide formulae for the standard LM tests as well as formulae for the robust LM tests when necessary. The first hypothesis we consider is Hb 0:σ2 µ= 0 (ρ=λ= 0) vs. Hb 1:σ2 µ>0 (ρ=λ= 0). The null model is the classical pooled panel data model, and the alternative model is the random effects panel data model without spatial effects. The LM test denoted as LMb, is available in Baltagi et al., (2003) [7]. Moreover, it can be shown that the robust LM test is the same as LMbin this case. We thus omit these formulae for the sake of compactness. The second hypothesis is Hc 0:σ2 µ= 0 (ρ6= 0, λ = 0) vs. Hc 1:σ2 µ>0 (ρ6= 0, λ = 0).2Under the null hypothesis, it is the pooled panel data model with spatial error correlation. Under the alternative 2By ρ6= 0, we mean that ρis allowed to be nonzero, and the notation “6=” has similar meaning in the rest of this paper. Econometrics 2015,3766 hypothesis, it is the random effects panel data model with spatial error correlation. The LM test statistic in this case is given by LMc=T 2N(T−1)bz2 σ2 µ,c,(3.2) where bzσ2 µ,c is bzσ2 µevaluated at the restricted MLE under Hc 0.3Under Hc 0,LMcis asymptotically distributed as χ2 1. Further, it can be easily shown that the robust LM test in this case is the same as LMc. Thus LMcitself is robust against local deviation of λfrom 0, and this will be confirmed by the simulation results. The third hypothesis is Hd 0:σ2 µ= 0 (ρ= 0, λ 6= 0) vs. Hd 1:σ2 µ>0 (ρ= 0, λ 6= 0). Under the null hypothesis, it is the pooled panel data model with spatial lag dependence. Under the alternative hypothesis, it is the random effects panel data model with spatial lag dependence. The LM test statistic, denoted as LMd, is available in Baltagi and Liu (2008) [8]. Moreover, it can be shown that the robust LM test in this case is the same as LMd. We thus omit these formulae here. The last hypothesis concerning testing for the individual random effects is He 0:σ2 µ= 0 (ρ6= 0, λ6= 0) vs. He 1:σ2 µ>0 (ρ6= 0, λ 6= 0). Under the null hypothesis, it is the pooled panel data model with both spatial error correlation and spatial lag dependence. Under the alternative hypothesis, it is the full model in (2.1). The LM test statistic is given by LMe=T 2N(T−1)bz2 σ2 µ,e.(3.3) Under He 0,LMeis asymptotically distributed as χ2 1.LMetests for the individual random effects in the most general spatial model, and it is particularly useful when the researcher does not have any prior knowledge about whether the spatial error correlation and/or spatial lag dependence exist or not. In practice, the above four LM tests for the individual random effects correspond to different prior information on the nuisance parameters, and they need to be analyzed together to lead to the most appropriate model. Notice that the LM tests in Section 3.2 are all designed for two-sided alternative hypothesis, while the parameter involved in the hypotheses, σ2 µ, is by definition nonnegative. While our LM tests have good power against the one-sided alternative (see the simulation results), we point out that power of these tests can be further improved by following the ideas in Honda (1985, 1991) [30,31]. 3.3. Testing for Spatial Effects In this section, we focus on testing for the spatial effects. We provide formulae for the standard LM tests as well as formulae for the robust LM tests when necessary. 3In order to save space and avoid notational complication, we do not present the formulae of quantities involved in the LM test statistics case by case. The subscripts of these quantities indicate these quantities evaluated at the restricted MLE for each case. If the restricted MLE is just the OLS estimator, we use subscript “a” to indicate this, which is in line with the fact that only OLS estimation is needed in LMa. Econometrics 2015,3767 3.3.1. Joint Tests for Spatial Effects In practice, researcher may be interested in jointly testing for the spatial error correlation and the spatial lag dependence. The first joint hypothesis is Hf 0:ρ=λ= 0 (σ2 µ= 0) vs. Hf 1: at least one of ρand λis not zero (σ2 µ= 0). Under the null hypothesis, it is the classical pooled panel data model. Under the alternative hypothesis, it is the pooled panel data model with at least one type of the spatial effects. The LM test statistic in this case is given by LMf=Tb3+bωa bτabz2 ρ,a +Tb1 bτabz2 λ,a −2Tb2 bτabzρ,abzλ,a,(3.4) where all quantities involved are defined Section 3.1 since only the OLS estimator is needed in this case. The test LMfis a useful extension of the result in Anselin et al., (1996) [20] to the panel data case. Interestingly, LMfis the sum of the first three terms of LMa. Under Hf 0,LMfis asymptotically distributed as χ2 2. It can be easily shown that the robust LM test in this case is the same as LMf. The second joint hypothesis is Hg 0:ρ=λ= 0 (σ2 µ≥0) vs. Hg 1: at least one of ρand λis not zero (σ2 µ≥0). Under the null hypothesis, it is the random effects panel data model without any spatial effects. Under the alternative hypothesis, it is the random effects panel data model with at least one type of spatial effects. The LM test statistic in this case is given by LMg=Tb3+bωg bτgbz2 ρ,g +Tb1 bτgbz2 λ,g −2Tb2 bτgbzρ,g bzλ,g.(3.5) Under Hg 0,LMgis asymptotically distributed as χ2 2. Notice that both LMfand LMgare useful for jointly testing the spatial error correlation and spatial lag dependence. However, LMfassumes that it is pooled panel data model, while LMgallows for the individual random effects. Since LMfis the same as its robust version, then it can guard against local deviation of σ2 µfrom zero. However, LMgwill work well even when σ2 µdeviates far away from zero. 3.3.2. Testing for Spatial Error Correlation In this section, we focus on testing for spatial error correlation. The first hypothesis we consider is Hh 0:ρ= 0 (σ2 µ=λ= 0) vs. Hh 1:ρ6= 0 (σ2 µ=λ= 0). Under the null hypothesis, it is the classical pooled panel data model. Under the alternative hypothesis, it is the pooled panel data model with spatial error correlation. The LM and robust LM (denoted as LM∗) test statistics are given by LMh=1 Tb1bz2 ρ,a, LM∗ h=Tb3+bωa bτabzρ,a −Tb2 Tb3+bωabzλ,a2 ,(3.6) where all quantities involved are defined in Section 3.1 since only the OLS estimator is needed in this case. Notice that although the formula of LMhis available in Baltagi et al., (2003) [7], we provide it here for comparison purposes as it is different from the robust test LM∗ h, which has not been considered previously in the literature. Under Hh 0, if the nuisance parameters λand σ2 µdo not deviate from 0, both LMhand LM∗ hare asymptotically distributed as χ2 1. However, when ρ= 0, but either λor σ2 µ deviates locally from 0, the distribution of LMhbecomes non-centralized, tending to over reject the null hypothesis. On the other hand, LM∗ his still asymptotically distributed as χ2 1, thus it does not suffer from size distortion as LMh. Econometrics 2015,3768 The second hypothesis is Hi 0:ρ= 0 (σ2 µ= 0, λ 6= 0) vs. Hi 1:ρ6= 0 (σ2 µ= 0, λ 6= 0). Under the null hypothesis, it is the pooled panel data model with spatial lag dependence. Under the alternative hypothesis, it is the pooled panel data model with both spatial error correlation and spatial lag dependence. The LM test statistic is given by LMi=b ξibz2 ρ,i.(3.7) LMiis a useful extension of the results in Anselin et al., (1996) [20] to the panel data case. Under Hi 0, LMiis asymptotically distributed as χ2 1. Moreover, it can be easily shown that the robust LM test in this case is the same as LMi. Thus LMiitself is robust against local deviation of σ2 µfrom 0, and this will be confirmed by the simulation results. The third hypothesis is Hj 0:ρ= 0 (σ2 µ≥0, λ = 0) vs. Hj 1:ρ6= 0 (σ2 µ≥0, λ = 0). Under the null hypothesis, it is the random effects panel data model without spatial effects. Under the alternative hypothesis, it is the random effects panel data model with spatial error correlation. The LM and robust LM test statistics in this case are given by LMj=1 Tb1bz2 ρ,j, LM∗ j=Tb3+bωj bτjbzρ,j −Tb2 Tb3+bωjbzλ,j2 .(3.8) When ρ= 0, and if the nuisance parameter λdoes not deviate from 0, both LMjand LM∗ jare asymptotically distributed as χ2 1. However, when ρ= 0, but λdeviates locally from 0, the distribution of LMjbecomes non-centralized, tending to over reject the null hypothesis. On the other hand, LM∗ jis still asymptotically distributed as χ2 1in this case, thus it does not suffer from size distortion as LMj. The last hypothesis for spatial error correlation is Hk 0:ρ= 0 (σ2 µ≥0, λ 6= 0) vs. Hk 1:ρ6= 0 (σ2 µ≥0, λ 6= 0). Under the null hypothesis, it is the random effects panel data model with spatial lag dependence. Under the alternative hypothesis, it is the random effects panel data model with both spatial error correlation and spatial lag dependence. The LM test statistic in this case is given by LMk=b ξkbz2 ρ,k.(3.9) Under Hk 0,LMkis asymptotically distributed as χ2 1. In practice, to test for the spatial error correlation, the above test statistics correspond to different prior information on the nuisance parameters, and they need to be analyzed together to lead to the most appropriate model. 3.3.3. Testing for Spatial Lag Dependence In this section, we focus on testing for the spatial lag dependence. The first hypothesis we consider is Hl 0:λ= 0 (σ2 µ=ρ= 0) vs. Hl 1:λ6= 0 (σ2 µ=ρ= 0). Under the null hypothesis, it is the classical pooled panel data model. Under the alternative hypothesis, it is the pooled panel data model with spatial lag dependence. The LM and robust LM test statistic in this case are given by LMl=1 Tb3+bωabz2 λ,a, LM∗ l=Tb1 bτabzλ,a −b2 b1bzρ,a2 ,(3.10) where all the related quantities are defined in Section 3.1 since only the OLS estimator is needed in this case. The formulae for LMland LM∗ lare useful extensions of the results in Anselin et al., (1996) [20] Econometrics 2015,3775 and follow a similar discussion. In sum, the test statistics LMh,LM∗ h,LMi,LMj,LM∗ j, and LMkare all useful for detecting the spatial error correlation, but they are suited for different assumptions about the nuisance parameters. In practice, researchers are suggested to analyze them together to draw correct inference on ρ. Table 5. FoR of LM Tests for the Spatial Error Correlation, Sample Size: (49,7). ρ=−0.8−0.6−0.4−0.20 0.2 0.4 0.6 0.8 LMhσ2 µ= 0 λ=−0.41.000 1.000 1.000 1.000 0.738 0.023 0.671 1.000 1.000 −0.21.000 1.000 1.000 0.986 0.305 0.193 0.975 1.000 1.000 0.01.000 1.000 1.000 0.856 0.048 0.754 1.000 1.000 1.000 0.21.000 1.000 0.996 0.340 0.452 0.993 1.000 1.000 1.000 0.41.000 1.000 0.753 0.210 0.965 1.000 1.000 1.000 1.000 LMhσ2 µ= 0.2λ=−0.41.000 1.000 1.000 0.998 0.747 0.037 0.620 1.000 1.000 −0.21.000 1.000 1.000 0.984 0.324 0.189 0.971 1.000 1.000 0.01.000 1.000 0.999 0.822 0.065 0.743 1.000 1.000 1.000 0.21.000 1.000 0.992 0.372 0.416 0.989 1.000 1.000 1.000 0.41.000 1.000 0.756 0.206 0.954 1.000 1.000 1.000 1.000 LM∗ hσ2 µ= 0 λ=−0.41.000 1.000 0.976 0.485 0.071 0.539 0.961 1.000 0.999 −0.21.000 1.000 0.990 0.562 0.056 0.482 0.941 1.000 0.999 0.01.000 1.000 0.995 0.626 0.039 0.431 0.952 0.999 0.989 0.21.000 1.000 0.997 0.639 0.052 0.460 0.969 1.000 0.961 0.41.000 1.000 0.996 0.524 0.046 0.597 0.980 1.000 0.880 σ2 µ= 0.2λ=−0.41.000 1.000 0.975 0.495 0.081 0.535 0.937 1.000 0.999 −0.21.000 1.000 0.987 0.553 0.080 0.465 0.923 1.000 0.999 0.01.000 1.000 0.988 0.607 0.075 0.432 0.926 0.998 0.991 0.21.000 1.000 0.990 0.648 0.056 0.461 0.943 0.999 0.957 0.41.000 1.000 0.994 0.533 0.054 0.510 0.967 0.999 0.869 LMiσ2 µ= 0 λ=−0.41.000 1.000 0.999 0.665 0.050 0.479 0.957 0.998 1.000 −0.21.000 1.000 0.999 0.641 0.046 0.469 0.940 0.999 1.000 0.01.000 1.000 0.997 0.646 0.040 0.448 0.951 1.000 1.000 0.21.000 1.000 0.997 0.646 0.060 0.457 0.961 0.999 1.000 0.41.000 1.000 0.996 0.639 0.046 0.497 0.966 1.000 1.000 σ2 µ= 0.2λ=−0.41.000 1.000 0.995 0.651 0.058 0.458 0.939 0.999 1.000 −0.21.000 1.000 0.995 0.619 0.080 0.455 0.927 0.998 1.000 0.01.000 1.000 0.991 0.619 0.072 0.454 0.920 0.997 1.000 0.21.000 1.000 0.992 0.662 0.069 0.463 0.939 1.000 1.000 0.41.000 1.000 0.995 0.610 0.063 0.487 0.951 1.000 1.000 LMjσ2 µ= 0.5λ=−0.41.000 1.000 1.000 1.000 0.747 0.036 0.657 1.000 1.000 −0.21.000 1.000 1.000 0.987 0.301 0.192 0.975 1.000 1.000 0.01.000 1.000 1.000 0.835 0.045 0.771 1.000 1.000 1.000 0.21.000 1.000 0.991 0.353 0.427 0.993 1.000 1.000 1.000 0.41.000 1.000 0.758 0.194 0.957 1.000 1.000 1.000 1.000 LM∗ jσ2 µ= 0.5λ=−0.41.000 1.000 0.979 0.480 0.064 0.522 0.945 1.000 0.998 −0.21.000 1.000 0.990 0.551 0.060 0.460 0.934 1.000 0.998 0.01.000 1.000 0.993 0.602 0.040 0.412 0.943 0.999 0.985 0.21.000 1.000 0.993 0.617 0.035 0.429 0.954 1.000 0.944 0.41.000 1.000 0.991 0.508 0.042 0.550 0.972 0.999 0.852 LMkσ2 µ= 0.5λ=−0.41.000 1.000 0.997 0.660 0.049 0.417 0.933 0.999 1.000 −0.21.000 1.000 0.998 0.607 0.049 0.422 0.936 0.996 1.000 0.01.000 1.000 0.992 0.627 0.058 0.433 0.952 0.999 1.000 0.21.000 1.000 0.996 0.602 0.054 0.427 0.952 1.000 1.000 0.41.000 1.000 0.995 0.630 0.038 0.480 0.948 1.000 1.000 Econometrics 2015,3776 Table 6. FoR of LM Tests for the Spatial Error Correlation, Sample Size: (100,10). ρ=−0.8−0.6−0.4−0.20 0.2 0.4 0.6 0.8 LMhσ2 µ= 0 λ=−0.41.000 1.000 1.000 1.000 0.989 0.016 0.996 1.000 1.000 −0.21.000 1.000 1.000 1.000 0.654 0.573 1.000 1.000 1.000 0.01.000 1.000 1.000 0.999 0.048 0.994 1.000 1.000 1.000 0.21.000 1.000 1.000 0.628 0.819 1.000 1.000 1.000 1.000 0.41.000 1.000 0.984 0.369 1.000 1.000 1.000 1.000 1.000 LMhσ2 µ= 0.2λ=−0.41.000 1.000 1.000 1.000 0.983 0.030 0.993 1.000 1.000 −0.21.000 1.000 1.000 1.000 0.654 0.548 1.000 1.000 1.000 0.01.000 1.000 1.000 0.999 0.086 0.993 1.000 1.000 1.000 0.21.000 1.000 1.000 0.633 0.781 1.000 1.000 1.000 1.000 0.41.000 1.000 0.976 0.344 1.000 1.000 1.000 1.000 1.000 LM∗ hσ2 µ= 0 λ=−0.41.000 1.000 1.000 0.852 0.076 0.938 1.000 1.000 1.000 −0.21.000 1.000 1.000 0.934 0.061 0.899 1.000 1.000 1.000 0.01.000 1.000 1.000 0.952 0.051 0.899 1.000 1.000 1.000 0.21.000 1.000 1.000 0.950 0.036 0.930 1.000 1.000 1.000 0.41.000 1.000 1.000 0.901 0.067 0.977 1.000 1.000 1.000 0.2λ=−0.41.000 1.000 1.000 0.826 0.103 0.914 1.000 1.000 1.000 −0.21.000 1.000 1.000 0.917 0.086 0.870 1.000 1.000 1.000 0.01.000 1.000 1.000 0.948 0.079 0.864 1.000 1.000 1.000 0.21.000 1.000 1.000 0.921 0.052 0.890 1.000 1.000 1.000 0.41.000 1.000 1.000 0.896 0.070 0.961 1.000 1.000 1.000 LMiσ2 µ= 0 λ=−0.41.000 1.000 1.000 0.961 0.046 0.910 1.000 1.000 1.000 −0.21.000 1.000 1.000 0.958 0.047 0.896 1.000 1.000 1.000 0.01.000 1.000 1.000 0.954 0.048 0.892 1.000 1.000 1.000 0.21.000 1.000 1.000 0.948 0.047 0.902 1.000 1.000 1.000 0.41.000 1.000 1.000 0.950 0.048 0.913 1.000 1.000 1.000 0.2−0.41.000 1.000 1.000 0.955 0.064 0.876 1.000 1.000 1.000 −0.21.000 1.000 1.000 0.948 0.064 0.865 1.000 1.000 1.000 0.01.000 1.000 1.000 0.933 0.066 0.864 1.000 1.000 1.000 0.21.000 1.000 1.000 0.934 0.061 0.870 1.000 1.000 1.000 0.41.000 1.000 1.000 0.942 0.056 0.885 1.000 1.000 1.000 LMjσ2 µ= 0.5λ=−0.41.000 1.000 1.000 1.000 0.990 0.018 0.998 1.000 1.000 −0.21.000 1.000 1.000 1.000 0.658 0.577 1.000 1.000 1.000 0.01.000 1.000 1.000 0.999 0.049 0.996 1.000 1.000 1.000 0.21.000 1.000 1.000 0.642 0.810 1.000 1.000 1.000 1.000 0.41.000 1.000 0.983 0.351 1.000 1.000 1.000 1.000 1.000 LM∗ jσ2 µ= 0.5λ=−0.41.000 1.000 1.000 0.853 0.086 0.932 1.000 1.000 1.000 −0.21.000 1.000 1.000 0.933 0.060 0.893 1.000 1.000 1.000 0.01.000 1.000 1.000 0.949 0.049 0.884 1.000 1.000 1.000 0.21.000 1.000 1.000 0.940 0.035 0.921 1.000 1.000 1.000 0.41.000 1.000 1.000 0.903 0.058 0.974 1.000 1.000 1.000 LMkσ2 µ= 0.5λ=−0.41.000 1.000 1.000 0.958 0.055 0.899 1.000 1.000 1.000 −0.21.000 1.000 1.000 0.949 0.048 0.888 1.000 1.000 1.000 0.01.000 1.000 1.000 0.947 0.050 0.884 1.000 1.000 1.000 0.21.000 1.000 1.000 0.949 0.046 0.897 1.000 1.000 1.000 0.41.000 1.000 1.000 0.953 0.046 0.911 1.000 1.000 1.000 Finally, the performances of the test statistics for spatial lag dependence are summarized in Tables 7 and 8. We focus on the (49,7) sample for discussion. For LMl, the empirical size is 0.044, and it is very powerful in detecting the spatial lag dependence given that σ2 µ=ρ= 0. For example, FoR of LMlis 0.987 when λ=−0.4. However, as discussed in Section 3.3.3, LMlis not robust against local misspecification, and this is confirmed by the simulation results. Given λ= 0, when σ2 µand ρdeviate locally from 0, the large FoRs of LMlare undesirable. For example, when λ= 0 but σ2 µ=ρ= 0.2, Econometrics 2015,3777 FoR of LMlis 0.526. This size distortion is to some extent avoided by LM∗ l. When λ= 0 and σ2 µtakes values 0,0.2and ρ∈[−0.2,0.2], FoRs of LM∗ lare in the range of [0.035,0.088]. However, LM∗ lshould be used with caution in this case, since the range of ρin which LM∗ lprovides valid size is narrow, and this becomes even worse for the (100,10) sample. On the other hand, the robust LM test is supposed to be less powerful than the corresponding LM test when the nuisance parameters are correctly specified. When σ2 µ=ρ= 0,LM∗ lis less powerful than LMl. For example, when λ=−0.4, FoR of LMlis 0.987, while that of LM∗ lis 0.809. Next, LMmtests for the spatial lag dependence in a pooled panel data model with spatial error correlation. The empirical sizes of LMmvary in [0.037,0.055]. As λdeviates from 0, FoR increases. Moreover, as discussed in Section 3.3.3, the robust LM test in this case is the same as LMm, implying that LMmitself is robust against local deviation of σ2 µfrom 0. This is confirmed in the simulation results. When σ2 µ= 0.2, λ = 0, the FoRs of LMmvary in [0.060,0.74]. Next, we discuss LMnand LM∗ n.LMntests for the spatial lag dependence in a random effects panel data model without spatial error correlation. We only present the representative result when σ2 µ= 0.5, results in other cases are very similar. The empirical size of LMnis 0.035, and the FoR increases as λdeviates away from 0. For example, FoR is 0.981 when λ=−0.4. However, LMnsuffers from size distortion when the nuisance parameter ρdeviates away from 0. For example, when λ= 0, ρ =−0.2, the FoR of LMnis 0.476, which is undesirably high. For the same case, FoR of LM∗ nis 0.063. However, as LM∗ l,LM∗ n should also be used with caution, since the range of ρin which LM∗ nprovides valid size is narrow, and it becomes even worse for the (100,10) sample. On the other hand, LM∗ nis less powerful than LMn when ρ= 0. For example, when ρ= 0, λ =−0.4, FoR of LM∗ nis 0.778, while that of LMnis 0.981. Lastly, we discuss the performance of LMo.LMotests for the spatial lag dependence in a random effects panel data model with spatial error correlation. The empirical sizes of LMovary in [0.063,0.079]. As expected, when λmoves away from 0, FoR increases, suggesting its good power performance. For all of the above tests, their performances for the (100,10) sample follows a similar discussion. In sum, the test statistics LMl,LM∗ l,LMm,LMn,LM∗ n, and LMoare all useful for detecting the spatial lag dependence, but they are suited for different assumptions about the nuisance parameters. In practice, researchers are suggested to analyze them together to draw correct inference on λ. Table 7. FoR of LM Tests for the Spatial Lag Dependence, Sample Size: (49,7). λ=−0.8−0.6−0.4−0.20 0.2 0.4 0.6 0.8 LMlσ2 µ= 0 ρ=−0.41.000 1.000 1.000 1.000 0.965 0.221 0.405 1.000 1.000 −0.21.000 1.000 1.000 0.982 0.446 0.063 0.938 1.000 1.000 0.01.000 1.000 0.987 0.591 0.044 0.693 0.998 1.000 1.000 0.21.000 0.984 0.631 0.067 0.576 0.988 1.000 1.000 1.000 0.40.979 0.510 0.061 0.593 0.992 1.000 1.000 1.000 1.000 σ2 µ= 0.2ρ=−0.41.000 1.000 1.000 1.000 0.964 0.285 0.305 0.999 1.000 −0.21.000 1.000 1.000 0.968 0.505 0.071 0.892 1.000 1.000 0.01.000 1.000 0.985 0.620 0.051 0.637 0.998 1.000 1.000 0.21.000 0.987 0.637 0.094 0.526 0.981 1.000 1.000 1.000 0.40.963 0.502 0.081 0.599 0.981 1.000 1.000 1.000 1.000 Econometrics 2015,3778 Table 7. Cont. λ=−0.8−0.6−0.4−0.20 0.2 0.4 0.6 0.8 LM∗ lσ2 µ= 0 ρ=−0.40.626 0.318 0.128 0.121 0.337 0.801 0.995 1.000 1.000 −0.20.968 0.855 0.547 0.163 0.054 0.497 0.983 1.000 1.000 0.00.999 0.974 0.809 0.338 0.035 0.459 0.978 1.000 1.000 0.20.999 0.991 0.858 0.305 0.066 0.649 0.993 1.000 1.000 0.41.000 0.976 0.651 0.121 0.323 0.922 1.000 1.000 1.000 σ2 µ= 0.2ρ=−0.40.582 0.318 0.157 0.153 0.353 0.753 0.992 1.000 1.000 −0.20.961 0.812 0.510 0.181 0.088 0.450 0.964 1.000 1.000 0.00.998 0.963 0.773 0.366 0.063 0.421 0.963 1.000 1.000 0.20.999 0.985 0.824 0.324 0.082 0.614 0.991 1.000 1.000 0.41.000 0.952 0.641 0.145 0.309 0.904 1.000 1.000 1.000 LMmσ2 µ= 0 ρ=−0.41.000 1.000 0.958 0.490 0.050 0.484 0.981 1.000 1.000 −0.21.000 0.998 0.941 0.444 0.037 0.422 0.966 1.000 0.973 0.01.000 0.998 0.900 0.406 0.055 0.371 0.909 0.997 0.757 0.21.000 0.988 0.862 0.360 0.049 0.285 0.769 0.923 0.556 0.40.998 0.971 0.756 0.263 0.046 0.233 0.575 0.766 0.366 σ2 µ= 0.2ρ=−0.41.000 1.000 0.978 0.543 0.067 0.493 0.990 1.000 1.000 −0.21.000 0.999 0.929 0.478 0.074 0.446 0.964 1.000 0.962 0.01.000 0.998 0.924 0.478 0.060 0.367 0.934 0.998 0.701 0.21.000 0.996 0.869 0.338 0.067 0.299 0.818 0.946 0.462 0.40.999 0.977 0.750 0.294 0.068 0.225 0.591 0.772 0.531 LMnσ2 µ= 0.5ρ=−0.41.000 1.000 1.000 1.000 0.970 0.269 0.291 0.999 1.000 −0.21.000 1.000 1.000 0.979 0.476 0.063 0.917 1.000 1.000 0.01.000 1.000 0.981 0.591 0.035 0.676 1.000 1.000 1.000 0.21.000 0.984 0.612 0.067 0.557 0.989 1.000 1.000 1.000 0.40.965 0.461 0.080 0.629 0.986 1.000 1.000 1.000 1.000 LM∗ nσ2 µ= 0.5ρ=−0.40.577 0.285 0.130 0.137 0.353 0.779 0.991 1.000 1.000 −0.20.966 0.823 0.515 0.153 0.063 0.453 0.972 1.000 1.000 0.00.999 0.971 0.778 0.328 0.051 0.421 0.973 1.000 1.000 0.20.999 0.983 0.830 0.287 0.072 0.642 0.996 1.000 1.000 0.41.000 0.952 0.623 0.103 0.326 0.928 1.000 1.000 1.000 LMoσ2 µ= 0.5ρ=−0.41.000 1.000 0.961 0.504 0.064 0.532 0.992 1.000 0.998 −0.21.000 0.999 0.933 0.477 0.070 0.484 0.982 1.000 0.964 0.01.000 0.997 0.899 0.442 0.078 0.438 0.935 0.996 0.644 0.21.000 0.999 0.918 0.475 0.079 0.347 0.818 0.892 0.371 0.41.000 0.995 0.855 0.381 0.063 0.205 0.460 0.522 0.275 Table 8. FoR of LM Tests for the Spatial Lag Dependence, Sample Size: (100,10). λ=−0.8−0.6−0.4−0.20 0.2 0.4 0.6 0.8 LMlσ2 µ= 0 ρ=−0.41.000 1.000 1.000 1.000 1.000 0.608 0.699 1.000 1.000 −0.21.000 1.000 1.000 1.000 0.853 0.108 1.000 1.000 1.000 0.01.000 1.000 1.000 0.953 0.056 0.975 1.000 1.000 1.000 0.21.000 1.000 0.939 0.068 0.922 1.000 1.000 1.000 1.000 0.41.000 0.825 0.102 0.978 1.000 1.000 1.000 1.000 1.000 σ2 µ= 0.2ρ=−0.41.000 1.000 1.000 1.000 1.000 0.660 0.581 1.000 1.000 −0.21.000 1.000 1.000 1.000 0.861 0.105 1.000 1.000 1.000 0.01.000 1.000 1.000 0.929 0.082 0.959 1.000 1.000 1.000 0.21.000 1.000 0.930 0.087 0.889 1.000 1.000 1.000 1.000 0.41.000 0.787 0.148 0.961 1.000 1.000 1.000 1.000 1.000 Econometrics 2015,3779 Table 8. Cont. λ=−0.8−0.6−0.4−0.20 0.2 0.4 0.6 0.8 LM∗ lσ2 µ= 0 ρ=−0.40.955 0.579 0.152 0.198 0.731 0.995 1.000 1.000 1.000 −0.21.000 0.997 0.908 0.316 0.101 0.893 1.000 1.000 1.000 0.01.000 1.000 0.993 0.723 0.058 0.844 1.000 1.000 1.000 0.21.000 1.000 0.997 0.642 0.111 0.959 1.000 1.000 1.000 0.41.000 1.000 0.946 0.128 0.704 1.000 1.000 1.000 1.000 σ2 µ= 0.2ρ=−0.40.927 0.542 0.175 0.238 0.715 0.988 1.000 1.000 1.000 −0.21.000 0.989 0.860 0.327 0.137 0.849 1.000 1.000 1.000 0.01.000 1.000 0.994 0.684 0.093 0.798 1.000 1.000 1.000 0.21.000 1.000 0.992 0.612 0.131 0.948 1.000 1.000 1.000 0.41.000 1.000 0.921 0.153 0.679 1.000 1.000 1.000 1.000 LMmσ2 µ= 0 ρ=−0.41.000 1.000 1.000 0.897 0.052 0.904 1.000 1.000 1.000 −0.21.000 1.000 1.000 0.864 0.054 0.860 1.000 1.000 1.000 0.01.000 1.000 1.000 0.794 0.053 0.794 1.000 1.000 0.995 0.21.000 1.000 0.997 0.712 0.055 0.679 0.994 1.000 0.883 0.41.000 1.000 0.987 0.588 0.045 0.522 0.957 0.993 0.624 σ2 µ= 0.2ρ=−0.41.000 1.000 1.000 0.870 0.068 0.858 1.000 1.000 1.000 −0.21.000 1.000 1.000 0.810 0.075 0.800 1.000 1.000 1.000 0.01.000 1.000 1.000 0.795 0.075 0.732 0.999 1.000 0.989 0.21.000 1.000 0.993 0.679 0.070 0.630 0.993 1.000 0.888 0.41.000 1.000 0.989 0.592 0.073 0.491 0.951 0.993 1.000 LMnσ2 µ= 0.5ρ=−0.41.000 1.000 1.000 1.000 1.000 0.648 0.634 1.000 1.000 −0.21.000 1.000 1.000 1.000 0.868 0.086 1.000 1.000 1.000 0.01.000 1.000 1.000 0.941 0.053 0.975 1.000 1.000 1.000 0.21.000 1.000 0.930 0.056 0.930 1.000 1.000 1.000 1.000 0.41.000 0.795 0.124 0.980 1.000 1.000 1.000 1.000 1.000 LM∗ nσ2 µ= 0.5ρ=−0.40.941 0.531 0.132 0.227 0.726 0.995 1.000 1.000 1.000 −0.21.000 0.995 0.884 0.305 0.105 0.874 1.000 1.000 1.000 0.01.000 1.000 0.995 0.702 0.055 0.813 1.000 1.000 1.000 0.21.000 1.000 0.999 0.624 0.100 0.961 1.000 1.000 1.000 0.41.000 1.000 0.940 0.137 0.731 1.000 1.000 1.000 1.000 LMoσ2 µ= 0.5ρ=−0.41.000 1.000 1.000 0.884 0.062 0.992 1.000 1.000 1.000 −0.21.000 1.000 1.000 0.858 0.076 0.880 1.000 1.000 1.000 0.01.000 1.000 1.000 0.830 0.084 0.812 1.000 1.000 0.979 0.21.000 1.000 1.000 0.759 0.076 0.696 0.994 1.000 0.761 0.41.000 1.000 0.994 0.647 0.070 0.497 0.925 0.966 0.746 5. Empirical Illustration In this section, we revisit the empirical example in Baltagi and Levin (1992) [32]. For the purpose of illustrating usefulness of the test statistics in our framework, we estimate a static demand model for cigarettes as in Elhorst (2014) [25]. The data is obtained from the Wiley website, it is a panel data of 45 U.S. states and Washington D.C. over the period of 1963–1992.4We estimate the regression equation (ln Ct=λW ln Ct+β0+β1ln Pt+β2ln Yt+t, t=ρMt+µ+vt, for t= 1,···, T. In the above specification, Ctis the vector of average cigarettes consumption (in packs) per capita (14 years and older) for all the states in a given year t.Ptis the corresponding price (per pack) 4The data for Colorado, Oregon and Pennsylvania are not available. Econometrics 2015,3780 vector in year t, with β1capturing the price effect on the demand for cigarettes. Ytis the vector of per capita disposable income in year t, with β2capturing the income effect on the demand for cigarettes. In the regression analysis, in addition to the standard price and income effects, we are particularly interested in whether and how the consumption of cigarettes in one state is related to those of its neighboring states. This is reflected by the spatial lag dependence structure (or the corresponding parameter λ). Further, we use the error component structure to allow for individual random effects and spatial correlation in the error term. For the spatial weights matrices, we choose two specifications and try different combinations of them. One is the standard row-normalized first-order rook contiguity matrix. The other one is the row-standardized border length weights matrix as suggested in Debarsy et al., (2012) [33].5 Since we are particularly interested in whether the consumptions of cigarettes are spatial correlated and how they are correlated, we plot the average consumption of cigarettes (in packs) per capita over the 30 years for all the states in Figure 1. On the one hand, we see that the cigarette consumptions in some states are negatively correlated with those of its neighboring states. For example, Utah, which has a high percentage of Mormon population,6has the lowest consumption of cigarettes, with the average consumption to be 67.9 packs per capita per year. In sharp contrast, the consumption of cigarettes in Nevada is nearly 2.6 times of that of Utah, and this could be attributed to the fact that Nevada is a highly tourist state with many casinos. The cigarette consumption in Utah is negatively correlated with those of its neighboring states. This similar pattern also hold for Nevada, New Mexico, Kentucky, and New Hampshire. On the other hand, we see that the consumptions of cigarettes among many other states tend to be similar and thus positively correlated, examples include Iowa, Wisconsin, Pennsylvania, Alabama, Georgia, and so on. The overall spatial dependence is not clear and we will use the formal regression analysis to assess it below. Figure 1. Average Consumption of Cigarettes (in packs) per Capita per Year by States, 1963–1992. 5The data for border length is obtained from Holmes [34]. 6According to the 2010 United States Census, the Mormons represent 62.1% of Utah’s total population. Econometrics 2015,3781 Before the regression analysis, we first perform the diagnostic procedures and the results are summarized in Table 9. The first row in Table 9 shows that the joint null hypothesis Ha 0is strongly rejected, thus the classical pooled panel data model not appropriate for this data set, and the OLS estimator is biased. The next four rows show that the random effects model is strongly favored against the pooled panel data model, regardless of the assumptions imposed on the spatial parameters. Next, when we test for the spatial error effect and the spatial lag effect jointly, the values of LMfand LMg show that the null hypothesis ρ=λ= 0 is rejected no matter we assume σ2 µ= 0 or allow for the case σ2 µ>0. This points us to a random effects model with at least one type of spatial effects. In the next six rows, we focus on testing for the spatial error correlation. Although these test statistics unanimously reject the null hypothesis ρ= 0 in favor of a model with spatial error correlation, we point out that the appropriate statistics should be LMj,LM∗ j, and LMkgiven the presence of random effects but not spatial lag dependence yet at this stage. Finally, we test for the spatial lag dependence, the results in the last six rows suggest rejecting the null hypothesis of no spatial lag dependence, although there is a small value of LM∗ l. Given that the random effects and the spatial error correlation are present by results above, we point out that the appropriate statistics should be LM∗ l,LM∗ n, and LMo. From the estimation results in Table 10, the estimated ρis between 0.353 and 0.622 and thus it is not proper to consider such value of ρas local deviation from 0. As a result, the robust LM tests do not apply. We are left with LMo, and it points to the presence of spatial lag dependence. In the following, we first estimate the random effects model with spatial error correlation using two types of spatial weights matrices, then we add in the spatially lagged dependent variable as suggested by our test statistics. The estimation results are summarized in Table 10. The first column provides the OLS benchmark estimation result for comparison purpose. Although it is biased, all the parameter estimates have expected signs. Price has a negative effect on the consumption of cigarettes per capita, and the disposable income per capita has a positive effect on the consumption of cigarettes per capita, which are consistent with the standard consumption theory. In Columns 2 and 4, we include the spatial error correlation for the two different spatial weights matrices. Compared to the OLS estimates, the price and income elasticity all become smaller in magnitude but have the same signs. The estimated spatial error correlation are positive as 0.353 and 0.364, which do not differ much for the two different spatial weights matrices. In Columns 3, 5, 6, and 7, we estimate the full model with different combinations of the weights matrices. The estimates for the spatial lag dependence is negative and statistically significant, which is consistent with our diagnostic testing results. We thus conclude that the full model is the more appropriate specification, and overall we find that the negative correlation dominates in the spatial dependence among cigarette consumptions. Econometrics 2015,3782 Table 9. LM Testing Statistics. W= Rook W= Border W=Rook W= Border M= Rook M= Border M= Border M=Rook Joint Test LMa12559 ∗∗∗ 12542 ∗∗∗ 12532 ∗∗∗ 12555 ∗∗∗ Testing for Random Effects LMb12471 ∗∗∗ 12471 ∗∗∗ 12471 ∗∗∗ 12471 ∗∗∗ LMc12207 ∗∗∗ 12260 ∗∗∗ 12260 ∗∗∗ 12207 ∗∗∗ LMd12471 ∗∗∗ 12530 ∗∗∗ 12471 ∗∗∗ 12530 ∗∗∗ LMe1354.7∗∗∗ 1662.7∗∗∗ 1573.1∗∗∗ 1457.8∗∗∗ Testing for Spatial Effects Spatial Error and Lag LMf88.13 ∗∗∗ 70.78 ∗∗∗ 60.82 ∗∗∗ 83.76 ∗∗∗ LMg172.81 ∗∗∗ 188.36 ∗∗∗ 174.62 ∗∗∗ 143.68 ∗∗∗ Spatial Error LMh76.35 ∗∗∗ 60.72 ∗∗∗ 60.72 ∗∗∗ 76.35 ∗∗∗ LM∗ h51.78 ∗∗∗ 42.07 ∗∗∗ 24.47 ∗∗∗ 55.05 ∗∗∗ LMi32.39 ∗∗∗ 23.68 ∗∗∗ 10.33 ∗∗∗ 38.02 ∗∗∗ LMj138.96 ∗∗∗ 156.08 ∗∗∗ 156.08 ∗∗∗ 138.96 ∗∗∗ LM∗ j126.82 ∗∗∗ 126.41 ∗∗∗ 128.63 ∗∗∗ 81.72 ∗∗∗ LMk94.01 ∗∗∗ 112.90 ∗∗∗ 99.03 ∗∗∗ 58.83 ∗∗∗ Spatial Lag LMl36.35 ∗∗∗ 28.71 ∗∗∗ 36.35 ∗∗∗ 28.71 ∗∗∗ LM∗ l11.77 ∗∗∗ 10.06 ∗∗∗ 0.10 7.41 ∗∗∗ LMm1147.00 ∗∗∗ 1385.40 ∗∗∗ 1028.20 ∗∗∗ 580.53 ∗∗∗ LMn45.99 ∗∗∗ 61.95 ∗∗∗ 45.99 ∗∗∗ 61.95 ∗∗∗ LM∗ n33.85 ∗∗∗ 32.28 ∗∗∗ 18.53 ∗∗∗ 4.72 ∗∗∗ LMo133.96 ∗∗∗ 283.36 ∗∗∗ 108.62 ∗∗∗ 80.05 ∗∗∗ ∗p < 0.1;∗∗ p < 0.05;∗∗∗ p < 0.01. Table 10. Estimation of the Cigarette Demand Function. Model OLS MLE MLE MLE MLE MLE MLE (W=M= Rook) (W=M= Border)(W = Rook) (W= Border) (M= Border) (M= Rook) b β02.825 ∗∗∗ 2.918 ∗∗∗ 4.267 ∗∗∗ 2.949 ∗∗∗ 3.737 ∗∗∗ 4.634 ∗∗∗ 3.227 ∗∗∗ (0.098) (0.086) (0.241) (0.087) (0.196) (0.261) (0.169) b β1−0.773 ∗∗∗ −0.739 ∗∗∗ −0.867 ∗∗∗ −0.729 ∗∗∗ −0.821 ∗∗∗ −0.851 ∗∗∗ −0.788 ∗∗∗ (0.026) (0.021) (0.026) (0.021) (0.027) (0.025) (0.030) b β20.586 ∗∗∗ 0.559 ∗∗∗ 0.645 ∗∗∗ 0.551 ∗∗∗ 0.616 ∗∗∗ 0.628 ∗∗∗ 0.595 ∗∗∗ (0.022) (0.018) (0.022) (0.018) (0.022) (0.022) (0.024) b λ−0.329 ∗∗∗ −0.204 ∗∗∗ −0.388 ∗∗∗ −0.088 ∗∗ (0.044) (0.039) (0.044) (0.038) bρ0.353 ∗∗∗ 0.586 ∗∗∗ 0.364 ∗∗∗ 0.510 ∗∗∗ 0.622 ∗∗∗ 0.419 ∗∗∗ (0.030) (0.034) (0.028) (0.034) (0.032) (0.039) bσ2 µ0.152 ∗∗∗ 0.140 ∗∗∗ 0.154 ∗∗∗ 0.145 ∗∗∗ 0.140 ∗∗∗ 0.149 ∗∗∗ (0.015) (0.014) (0.016) (0.015) (0.014) (0.015) bσ2 v0.075 ∗∗∗ 0.069 ∗∗∗ 0.073 ∗∗∗ 0.071 ∗∗∗ 0.067 ∗∗∗ 0.074 ∗∗∗ (0.001) (0.002) (0.001) (0.002) (0.002) (0.001) log-likelihood 450.94 1489.2 1514.7 1502.4 1514.6 1537.9 1491.7 ∗p < 0.1;∗∗ p < 0.05;∗∗∗ p < 0.01. Econometrics 2015,3783 6. Conclusions In this paper, we propose a panel data random effects models with both spatially correlated error components and spatially lagged dependent variables. We consider diagnostic testing within such a framework. We first derive the joint LM test for the individual random effects, the spatial error correlation and the spatial lag dependence. In practice, applied researchers should first consider this joint test. If the joint null hypothesis cannot be rejected, it is reasonable to adopt the classical pooled panel data model. Otherwise, either the individual random effects, or the spatial error correlation, or the spatial lag dependence must be taken into consideration. Next, we derive a wide range of LM tests for the individual random effects and for the two spatial effects separately. In addition, in order to guard against possible local model misspecification, we apply the Bera and Yoon (1993) [19] principle and construct robust LM tests in some cases. These test statistics complement each other and should be used together in performing diagnostic test to search for the most appropriate model. A small Monte Carlo experiment is carried out and the size and power performances of these test statistics are satisfactory. We further use the cigarette demand data set in Baltagi and Levin (1992) [32] to illustrate our testing procedures. Some future research directions can be considered. First, for the model specification of spatially correlated error components used in this paper, although it allows for both spatial spillovers of permanent and temporary shocks, it does not permit different intensities of these two shocks. It would be of interest to relax this assumption and further generalize our model (see Baltagi et al., 2013 [12]). Second, one can borrow the ideas in Baltagi and Yang (2013a, 2013b) [15,17] to modify our test statistics in order to remedy distributional misspecifications in finite sample, sensitivity to spatial layout, or to be robust against unknown heteroskedasticity. Acknowledgments We thank the Editor-in-Chief, Kerry Patterson, and two anonymous referees for their constructive comments that have greatly improved the article. We also thank Anil Bera and participants at the IVth World Conference of Spatial Econometric Association for helpful discussions. All remaining errors are our own. Author Contributions Kuan-Pin Lin suggested the problem and Ming He solved the problem. Both authors contributed to the final paper. Conflicts of Interest The authors declare no conflict of interest. Econometrics 2015,3784 Appendix In the appendices, we provide detailed derivations of the score vector, information matrix and the LM test statistics in each case. Appendix A In this appendix, we provide formulae of the score vector and the information matrix for our general model specification. Let R1=M(IN−ρM)−1,R2=W(IN−ρM)−1,R3=W(IN−λW)−1and R4= (IN−ρM0)(IN−ρM). The score vector is ∂L(δ) ∂δ =         sβ sρ sλ sσ2 µ sσ2 v         =         X0A0Ω−1A −Ttr(R1) + 0A0Ω−1(IT⊗M) −Ttr(R3) + 0A0Ω−1A(IT⊗W)y −NT 2(T σ2 µ+σ2 v)+T 2(T σ2 µ+σ2 v)20A0(¯ JT⊗IN)A −N 2(T σ2 µ+σ2 v)−N(T−1) 2σ2 v−1 20A0∂Ω−1 ∂σ2 vA         , where =By −Xβ. Let Ibe the information matrix, that is, I=−E[∂2L(δ)/∂δ∂δ0]. Then after some routine calculation, the elements of Iare given by Iββ0=X0A0Ω−1AX, Iβρ = 0,Iβλ =X0A0Ω−1A(IT⊗W)B−1Xβ, Iβσ2 µ= 0 Iβσ2 v= 0, Iρρ =Ttr(R1R1+R1R0 1),Iρλ =Ttr(R3R1) + Ttr[R3(IN−ρM)−1R0 1(IN−ρM)], Iρσ2 µ=T Tσ2 µ+σ2 v tr(R1),Iρσ2 v=1 Tσ2 µ+σ2 v +T−1 σ2 vtr(R1), Iλλ =Ttr(R3R3) + Ttr(R4R3R−1 4R0 3)+(B−1Xβ)0(IT⊗W0)A0Ω−1A(IT⊗W)B−1Xβ, Iλσ2 µ=T Tσ2 µ+σ2 v tr(R3),Iλσ2 v=1 Tσ2 µ+σ2 v +T−1 σ2 vtr(R3), Iσ2 µσ2 µ=NT2 2(Tσ2 µ+σ2 v)2,Iσ2 µσ2 v=NT 2(Tσ2 µ+σ2 v)2,Iσ2 vσ2 v=N 2(Tσ2 µ+σ2 v)2+N(T−1) 2(σ2 v)2. Due to the large number of test statistics in this paper, it turns out to be convenient to introduce some general notations for reference and easy exposition. Let bzρ=b0b A0b Ω−1(IT⊗M)b, bzλ=b0b A0b Ω−1b A(IT⊗W)y, bzσ2 µ=b0b A0(¯ JT⊗IN)b Ab bσ2 v −N, where b=b By −Xb β, and b A, b B, b Ω,b β, bσ2 vare restricted MLEs of A, B, Ω, β, σ2 v, respectively. Next, define bν=by0(IT⊗W0)b A0b Ω−1b A(IT⊗W)by, bτ=T2(b1b3−b2 2) + Tb1bω, bω=by0(IT⊗W0)b A0hb Ω−1−b Ω−1b AX(X0b A0b Ω−1b AX)−1X0b A0b Ω−1ib A(IT⊗W)by, where by=b B−1Xb β,b1=tr(M0M+MM), b2=tr(M0W+MW), b3=tr(W0W+WW). Finally, let b ξ=NT b ϑ2+Nbω−2Tb ϑ2 3 Tb1(NT b ϑ2+Nbω−2Tb ϑ2 3)−N(Tb ϑ1)2,b ζ=Nb θ1−2b θ2 3 (Nb θ1−2b θ2 3)(Tb θ4+bω)−NT b θ2 2 , Econometrics 2015,3791 bk=b Bky−Xb βk,b βk,b Bk,b Ω−1 kare restricted MLEs of β, B, Ω−1under Hk 0, respectively. The information matrix under Hk 0and evaluated at the restricted MLE is Ik=               X0b Ω−1 kX0X0b Ω−1 k(IT⊗W)byk0 0 ·Tb1Tb ϑ1,k 0 0 · · Tb ϑ2,k +bνk Tb ϑ3,k Tbσ2 µ,k +bσ2 v,k T[(T−1)bσ2 µ,k +bσ2 v,k]b ϑ3,k (Tbσ2 µ,k +bσ2 v,k)bσ2 v,k · · · NT2 2(Tbσ2 µ,k +bσ2 v,k)2 NT 2(Tbσ2 µ,k +bσ2 v,k)2 · · · · N 2(Tbσ2 µ,k +bσ2 v,k)2+N(T−1) 2(bσ2 v,k)2               , where byk=b B−1 kXb βk,bνk=by0 k(IT⊗W0)b Ω−1 k(IT⊗W)byk,bσ2 µ,k,bσ2 v,k are restricted MLEs of σ2 µ, σ2 v under Hk 0, and b ϑ1,k,b ϑ2,k,b ϑ3,k are b ϑ1,b ϑ2,b ϑ3evaluated at the restricted MLE under Hk 0, respectively. Straightforward calculation gives Jk=            Tb1Tb ϑ1,k 0 0 ·Tb ϑ2,k +bωk Tb ϑ3,k Tbσ2 µ,k +bσ2 v,k T[(T−1)bσ2 µ,k +bσ2 v,k]b ϑ3,k (Tbσ2 µ,k +bσ2 v,k)bσ2 v,k · · NT2 2(Tbσ2 µ,k +bσ2 v,k)2 NT 2(Tbσ2 µ,k +bσ2 v,k)2 · · · N 2(Tbσ2 µ,k +bσ2 v,k)2+N(T−1) 2(bσ2 v,k)2            , where bωk=by0 k(IT⊗W0)hb Ω−1 k−b Ω−1 kX(X0b Ω−1 kX)−1X0b Ω−1 ki(IT⊗W)byk. Next, we need to calculate the (1,1)th element of (Kk)−1. Straightforward calculation yields Kk= Tb1Tb ϑ1,k ·bκk!, where bκk=Tb ϑ2,k +bωk−T2(T−1)2b ϑ2 3,k bη3,k(bσ2 µ,k)2 (Tbσ2 µ,k +bσ2 v,k)2(bσ2 v,k)2 −2T2(T−1)b ϑ2 3,k(bη2,k +bη3,k)bσ2 µ,k (Tbσ2 µ,k +bσ2 v,k)2bσ2 v,k −T2b ϑ2 3,k(bη1,k + 2bη2,k +bη3,k) (Tbσ2 µ,k +bσ2 v,k)2, and bη1,k bη2,k bη2,k bη3,k !=    NT2 2(Tbσ2 µ,k +bσ2 v,k)2 NT 2(Tbσ2 µ,k +bσ2 v,k)2 NT 2(Tbσ2 µ,k +bσ2 v,k)2 N 2(Tbσ2 µ,k +bσ2 v,k)2+N(T−1) 2(bσ2 v,k)2     −1 =    2(bσ2 v,k)2 NT2(T−1) +2(Tbσ2 µ,k +bσ2 v,k)2 NT2−2(bσ2 v,k)2 NT(T−1) −2(bσ2 v,k)2 NT(T−1) 2(bσ2 v,k)2 N(T−1)    . Econometrics 2015,3792 Then the (1,1)th element of (Kk)−1can be easily calculated as b ξk=bκk Tb1bκk−(Tb ϑ1,k)2=NT b ϑ2,k +Nbωk−2Tb ϑ2 3,k Tb1(NT b ϑ2,k +Nbωk−2Tb ϑ2 3,k)−N(Tb ϑ1,k)2. Finally, the LM test statistic in this case is given by LMk=b ξkbz2 ρ,k. B.10. Derivation of LMl The restricted MLE under Hl 0is essentially the OLS estimator. The score vector under Hl 0and evaluated at the restricted MLE is ∂L(δ) ∂δ |l=0bzλ,a 0. The information matrix under Hl 0and evaluated at the restricted MLE is Il=    X0X bσ2 v,a X0(IT⊗W)bya bσ2 v,a 0 ·Tb3+bνa0 · · NT 2(bσ2 v,a)2,    . Straightforward calculation gives that I∆ λλ,l = 1/(Tb3+bωa), thus the LM test statistic corresponding to Hl 0is given by LMl=1 Tb3+bωabz2 λ,a. To derive LM∗ l, we again make use of the Bera and Yoon (1993) [19] Principle and it can be easily deduced that LM∗ l=LMf−LMh=Tb1 bτabzλ,a −b2 b1bzρ,a2 . B.11. Derivation of LMm The score vector under Hm 0and evaluated at the restricted MLE is ∂L(δ) ∂δ |m=0 0 bzλ,m 0,where bzλ,m =1 bσ2 v,m b0 mb A0 mb Am(IT⊗W)bym, bσ2 v,m =b0 mb A0 mb Ambm/(NT),bm=y−bym,bym=Xb βm, and b βm,b Amare restricted MLEs of β, A under Hm 0, respectively. The information matrix under Hm 0and evaluated at the restricted MLE is Im=       X0 b A0 m b AmX bσ2 v,m 0X0 b A0 m b Am(IT⊗W)bym bσ2 v,m 0 ·Tb θ1,m Tb θ2,m T b θ3,m bσ2 v,m · · Tb θ4,m +bνm0 · · · NT 2(bσ2 v,m)2,        , Econometrics 2015,3793 where bνm=by0 m(IT⊗W0)b A0 mb Am(IT⊗W)bym/bσ2 v,m, and b θ1,m,b θ2,m,b θ3,m,b θ4,m are b θ1,b θ2,b θ3,b θ4evaluated at the restricted MLE under Hm 0, respectively. Let Im= I11,m I12,m I21,m I22,m !,where I11,m =X0b A0 mb AmX bσ2 v,m . After some calculation, we get I22,m − I21,m(I11,m)−1I12,m =    Tb θ1,m Tb θ2,m T b θ3,m bσ2 v,m ·Tb θ4,m +bωm0 · · NT 2(bσ2 v,m)2    , where bωm=by0 m(IT⊗W0)b A0 m[INT −b AmX(X0b A0 mb AmX)−1X0b A0 m]b Am(IT⊗W)bym/bσ2 v,m. Straightforward calculation gives that I∆ λλ,m =b ζm≡Nb θ1,m −2b θ2 3,m (Nb θ1,m −2b θ2 3,m)(Tb θ4,m +bωm)−NT b θ2 2,m . Finally, the LM test statistic in this case is given by LMm=b ζmbz2 λ,m. B.12. Derivation of LMn The score vector under Hn 0and evaluated at the restricted MLE is ∂L(δ) ∂δ |n=0bzλ,n 0 0 ,where bzλ,n =b0 nb Ω−1 n(IT⊗W)y, bn=y−Xb βn, and b βn,b Ω−1 nare the restricted MLEs of β, Ω−1under Hn 0, respectively. The information matrix under Hn 0and evaluated at the restricted MLE is In=      X0b Ω−1 nX X0b Ω−1 n(IT⊗W)byn0 0 ·Tb3+bνn0 0 · · NT 2 2(Tbσ2 µ,n+bσ2 v,n)2 NT 2(Tbσ2 µ,n+bσ2 v,n)2 · · · N 2(Tbσ2 µ,n+bσ2 v,n)2+N(T−1) 2(bσ2 v,n)2      , where byn=Xb βn,bνn=by0 n(IT⊗W0)b Ω−1 n(IT⊗W)byn. The LM test statistic in this case can be easily calculated as LMn=1 Tb3+bωnbz2 λ,n, where bωn=by0 n(IT⊗W0)[b Ω−1 n−b Ω−1 nX(X0b Ω−1 nX)−1X0b Ω−1 n](IT⊗W)byn. To derive LM∗ n, we again make use of the Bera and Yoon (1993) [19] Principle and it can be easily deduced that LM∗ n=LMg−LMj=Tb1 bτnbzλ,n −b2 b1bzρ,n2 . Econometrics 2015,3794 B.13. Derivation of LMo The score vector under Ho 0and evaluated at the restricted MLE is ∂L(δ) ∂δ |o=0bzλ,o 0 0 0 ,where bzλ,o =b0 ob A0 ob Ω−1 ob Ao(IT⊗W)y, bo=y−Xb βo, and b βo,b Ao,b Ω−1 oare restricted MLEs of β, A, Ω−1under Ho 0, respectively. The information matrix under Ho 0and evaluated at the restricted MLE is Io=          X0b A0 ob Ω−1 ob AoX0X0b A0 ob Ω−1 ob Ao(IT⊗W)byo0 0 ·Tb θ1,o Tb θ2,o T b θ3,o Tbσ2 µ,o+bσ2 v,o T[(T−1)bσ2 µ,o+bσ2 v,o] b θ3,o (Tbσ2 µ,o+bσ2 v,o)bσ2 v,o · · Tb θ4,o +bνo0 0 · · · NT 2 2(Tbσ2 µ,o+bσ2 v,o)2 NT 2(Tbσ2 µ,o+bσ2 v,o)2 · · · · N 2(Tbσ2 µ,o+bσ2 v,o)2+N(T−1) 2(bσ2 v,o)2          , where byo=Xb βo,bνo=by0 o(IT⊗W0)b A0 ob Ω−1 ob Ao(IT⊗W)byo,bσ2 µ,o,bσ2 v,o are restricted MLEs of σ2 µ, σ2 v under Ho 0, and b θ1,o,b θ2,o,b θ3,o,b θ4,o are b θ1,b θ2,b θ3,b θ4evaluated at the restricted MLE under Ho 0, respectively. A little calculation gives Jo=           Tb θ1,o Tb θ2,o T b θ3,o Tbσ2 µ,o+bσ2 v,o T[(T−1)bσ2 µ,o+bσ2 v,o] b θ3,o (Tbσ2 µ,o+bσ2 v,o)bσ2 v,o ·Tb θ4,o +bωo0 0 · · NT2 2(Tbσ2 µ,o +bσ2 v,o)2 NT 2(Tbσ2 µ,o +bσ2 v,o)2 · · · N 2(Tbσ2 µ,o +bσ2 v,o)2+N(T−1) 2(bσ2 v,o)2           , where bωo=by0 o(IT⊗W0)b A0 ohb Ω−1 o−b Ω−1 ob AoX(X0b A0 ob Ω−1 ob AoX)−1X0b A0 ob Ω−1 oib Ao(IT⊗W)byo. Next, we need to calculate the (2,2)th element of (Ko)−1. Straightforward calculation yields Ko= Tb θ1,o −(T b θ3,o)2bη1,o (Tbσ2 µ,o+bσ2 v,o)2−2T2[(T−1)bσ2 µ,o+bσ2 v,o] b θ2 3,o bη2,o (Tbσ2 µ,o+bσ2 v,o)2bσ2 v,o −T2[(T−1)bσ2 µ,o+bσ2 v,o] b θ2 3,o bη3,o (Tbσ2 µ,o+bσ2 v,o)2(bσ2 v,o)2Tb θ2,o ·Tb θ4,o +bωo!, where bη1,o bη2,o bη2,o bη3,o !=    2(bσ2 v,o)2 NT2(T−1) +2(Tbσ2 µ,o +bσ2 v,o)2 NT2−2(bσ2 v,o)2 NT(T−1) −2(bσ2 v,o)2 NT(T−1) 2(bσ2 v,o)2 N(T−1)    . Then straightforward calculation gives the (2,2)th element of (Ko)−1as b ζo=NT b θ1,o −2Tb θ2 3,o (NT b θ1,o −2Tb θ2 3,o)(Tb θ4,o +bωo)−N(Tb θ2,o)2. Econometrics 2015,3795 Finally, the LM test statistic in this case is given by LMo=b ζobz2 λ,o. References 1. Cliff, A.; Ord, J. Spatial Autocorrelation; Pion: London, UK, 1973. 2. Cliff, A.; Ord, J. Spatial Processes, Models and Applications; Pion: London, UK, 1981. 3. Anselin, L. Spatial Econometrics: Methods and Models; Kluwer Academic Publishers: Dordrecht, The Netherlands, 1988. 4. Anselin, L. Lagrange Multiplier Test Diagnostics for Spatial Dependence and Spatial Heterogeneity. Geogr. Anal. 1988,20, 1–17. 5. Anselin, L.; Bera, A.K. Spatial Dependence in Linear Regression Models with an Introduction to Spatial Econometrics. In Handbook of Applied Economic Statistics; Ullah, A., Giles, D.E.A., Eds.; Marcel Dekker: New York, NY, USA, 1998. 6. Anselin, L. Rao’s Score Tests in Spatial Econometrics. J. Stat. Plan. Inference 2001,97, 113–139. 7. Baltagi, B.H.; Song, S.; Koh, W. Testing Panel Data Regression Models with Spatial Error Correlation. J. Econom. 2003,117, 123–150. 8. Baltagi, B.H.; Liu, L. Testing for Random Effects and Spatial Lag Dependence in Panel Data Models. Stat. Probab. Lett. 2008,78, 3304–3306. 9. Debarsy, N.; Ertur, C. Testing for Spatial Autocorrelation in a Fixed Effects Panel Data Model. Reg. Sci. Urban Econ. 2010,40, 453–470. 10. Lee, L.F.; Yu, J. Estimation of Spatial Autoregressive Panel Data Models with Fixed Effects. J. Econom. 2010,154, 165–185. 11. Qu, X.; Lee, L.F. LM Tests for Spatial Correlation in Spatial Models with Limited Dependent Variables. Reg. Sci. Urban Econ. 2012,42, 430–445. 12. Baltagi, B.H.; Egger, P.; Pfaffermayr, M. A Generalized Spatial Panel Data Model with Random Effects. Econom. Rev. 2013,32, 650–685. 13. Kapoor, M.; Kelejian, H.H.; Prucha, I.R. Panel Data Models with Spatially Correlated Error Components. J. Econom. 2007,140, 97–130. 14. Yang, Z.L. A Robust LM Test for Spatial Error Components. Reg. Sci. Urban Econ. 2010,40, 299–310. 15. Baltagi, B.H.; Yang, Z.L. Standardized LM Tests for Spatial Error Dependence in Linear or Panel Regressions. Econom. J. 2013,16, 103–134. 16. Born, B.; Breitung, J. Simple Regression-Based Tests for Spatial Dependence. Econom. J. 2011, 14, 330–342. 17. Baltagi, B.H.; Yang, Z.L. Heteroskedasticity and Non-Normality Robust LM Tests for Spatial Dependence. Reg. Sci. Urban Econ. 2013,43, 725–739. 18. Yang, Z.L. LM Tests of Spatial Dependence Based on Bootstrap Critical Values. J. Econom. 2015, 185, 33–59. 19. Bera, A.K.; Yoon, M. Specification Testing with Locally Misspecified Alternatives. Econom. Theory 1993,9, 649–658. Econometrics 2015,3796 20. Anselin, L.; Bera, A.K.; Florax, R.; Yoon, M.J. Simple Diagnostic Tests for Spatial Dependence. Reg. Sci. Urban Econ. 1996,26, 77–104. 21. Bera, A.K.; Sosa-Escudero, W.; Yoon, M. Tests for the Error Component Model in the Presence of Local Misspecification. J. Econom. 2001,101, 1–23. 22. Bera, A.K.; Montes-Rojas, G.; Sosa-Escudero, W. Testing Under Local Misspecification and Artificial Regression. Econ. Lett. 2009,150, 66–68. 23. Bera, A.K.; Montes-Rojas, G.; Sosa-Escudero, W. General Specification Testing with Locally Misspecified Models. Econom. Theory 2010,26, 1838–1845. 24. He, M.; Lin, K.P. Locally Adjusted LM Test for Spatial Dependence in Fixed Effects Panel Data Models. Econ. Lett. 2013,121, 59–63. 25. Elhorst, J.P. Spatial Econometrics from Cross-Sectional Data to Spatial Panels; Springer: New York, NY, USA, 2014. 26. Lee, L.F.; Yu, J. Spatial Panels: Random Components versus Fixed Effects. Int. Econ. Rev. 2012, 53, 1369–1412. 27. Magnus, J.R. Multivariate Error Components Analysis of Linear and Nonlinear Regression Models by Maximum Likelihood. J. Econom. 1982,19, 239–285. 28. Kelejian, H.H.; Prucha, I.R. On the Asymptotic Distribution of the Moran’s I Test Statistic with Applications. J. Econom. 2001,104, 219–257. 29. Kelejian, H.H.; Prucha, I.R. Specification and Estimation of Spatial Autoregressive Models with Autoregressive and Heteroskedastic Disturbances. J. Econom. 2010,157, 53–67. 30. Honda, Y. Testing the Error Components Model with Non-Normal Disturbances. Rev. Econ. Stud. 1985,52, 681–690. 31. Honda, Y. A Standardized Test for the Error Components Model with the Two-Way Layout. Econ. Lett. 1991,37, 125–128. 32. Baltagi, B.H.; Levin, D. Cigarette Taxation: Raising Revenues and Reducing Consumption. Struct. Chang. Econ. Dyn. 1992,3, 321–335. 33. Debarsy, N.; Ertur, C.; LeSage, J. Interpreting Dynamic Space-Time Panel Data Models. Stat. Methodol. 2012,9, 158–171. 34. Holmes, T. The State Border Data Set. Available online: http://www.econ.umn.edu/∼holmes/ data/BorderData.html (accessed on 11 September 2015). c 2015 by the authors; licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution license (http://creativecommons.org/licenses/by/4.0/).