[R-sig-Geo] LM test for spatial dependence with panel data

Roger Bivand Roger.Bivand at nhh.no
Sat Feb 13 15:19:05 CET 2016

On Mon, 8 Feb 2016, Tobias Rüttenauer wrote:

> Dear list members,
> I'm currently estimating a fixed effects panel model and I want to control
> for spatial dependence. Thus, I also estimated two spatial fe-models, one
> with a spatial error term and one with a spatial error term and spatial lag
> variable. Both lambda and rho are highly significant and the independent
> variables of the models differ considerably.
> However, I would like to control the model specifications with a Lagrange
> Multiplier test. More precisely, I would like to test for spatial lag
> dependence (while allowing possible spatial error dependence) and for
> spatial error dependence (while allowing possible spatial lag dependence)
> like described by Anselin/ Bera/ Florax/ Yoon (1996), which is possible for
> cross-sectional data using lm.LMtests (spdep). Is there a possibility to
> estimate a similar test for panel data? If I'm not mistaking, the
> splm-implemented tests do not account for spatial lag dependence?

You may be able to test the pooled model only using lm() on the data and 
taking a Kronecker product of your spatial weights by a time-dimensioned 
identity matrix, and using the function for cross-sectional models, but I 
guess that this is not what you want. You'd need to identify an 
appropriate test in the literature, and see whether it can be implemented 
(and whether then it actually works). In many cases, significant lag and 
error processes together are related to missing variables, and to spatial 
processes not matching the spatial units - aggregates - you are using.

Hope this helps,


> Thank you very much in advance for your help!
> Best,
> Tobi
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Roger Bivand
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; fax +47 55 95 91 00
e-mail: Roger.Bivand at nhh.no

More information about the R-sig-Geo mailing list