Skip to content
Prev 25880 / 29559 Next

How to test spatial dependence in errorsarlm

So testing for spatial dependence on the residuals by means of the
lm.LMtests (option LMerr, the only that works with residuals) is wrong,
isn't it? I had read in some forum that this was a posible way to test it...

In my case the Moran test and the LM tests (both LMerr and LMlag, and also
their robust versions) are strongly rejected (p-values between 4.307e-06
and 2.2e-16). As the rejection is stronger for the spatial error model, my
suspicion was that this could be the best model to capture the spatial
dependence (in fact the log-likelihood is bigger for the spatial error
model, and the AIC lower). However, how can I know whether the spatial error
model is a good option if I cannot test the absence of spatial dependence in
the residuals? And how can I know, as you suspect, whether I have a
misspecification problem? Moreover, I also estimated the Durbin model, and
in this case the LM test on the residuals suggests no spatial dependence
(for the spatial lag model I get the opposite conclusion), but due to the
nature of my regression I don't think that this model is suitable (the
regressors are characteristics of houses such as size, number of rooms,
etc).

Thanks a lot for your time.
Best
Javi     

-----Mensaje original-----
De: Roger Bivand [mailto:Roger.Bivand at nhh.no] 
Enviado el: domingo, 13 de agosto de 2017 12:45
Para: Javier Garc?a
CC: r-sig-geo at r-project.org
Asunto: Re: [R-sig-Geo] How to test spatial dependence in errorsarlm
On Sun, 13 Aug 2017, Javier Garc?a wrote:

            
function errorsarlm does not.
As you should be aware from the literature, the only LM test that has been
written (the maths) is a test for residual error autocorrelation for spatial
lag models. Doing it in R will not help until someone (you?) does the maths.
Computing a value is easy, but knowing what to infer from it is hard. By
definition, if your model is well-specified, the residual autocorrelation is
fully captured by its coefficient. I suspect that your model suffers from
mis-specification problems.

Roger
http://www.unibertsitate-hedakuntza.ehu.es/p268-content/es/contenidos/inform
acion/manual_id_corp/es_manual/images/firma_email_upv_euskampus_bilingue.gif