[R-sig-Geo] How to test spatial dependence in errorsarlm
Javier García
javier.garcia at ehu.eus
Mon Aug 14 04:18:29 CEST 2017
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:
> Hello everybody:
>
>
>
> I have estimated a spatial error model and now I would like to test
> whether that model has really ?deleted? the spatial dependence. For
> the spatial lag model and for the Durbin model the function lagsarlm
> gives the LM test for residual autocorrelation test value, but the
function errorsarlm does not.
> Does anyone know how to do it in R?
>
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
>
>
> Thanks a lot in advance.
>
>
>
> Javi
>
>
>
>
>
>
> JAVIER GARCÍA
>
>
>
> Departamento de Economía Aplicada III (Econometría y Estadística)
>
> Facultad de Economía y Empresa (Sección Sarriko)
> Avda. Lehendakari Aguirre 83
>
> 48015 BILBAO
> T.: +34 601 7126 F.: +34 601 3754
> <http://www.ehu.es/> www.ehu.es
>
>
http://www.unibertsitate-hedakuntza.ehu.es/p268-content/es/contenidos/inform
>
acion/manual_id_corp/es_manual/images/firma_email_upv_euskampus_bilingue.gif
>
>
>
>
>
>
--
Roger Bivand
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; e-mail: Roger.Bivand at nhh.no
Editor-in-Chief of The R Journal, https://journal.r-project.org/index.html
http://orcid.org/0000-0003-2392-6140
https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en
More information about the R-sig-Geo
mailing list