[R-sig-Geo] lm.morantest

Anita Morales anita.morales at gmail.com
Mon Aug 22 17:13:11 CEST 2016


Dear all,

I'm relative new to the list, being this my first question. I have a
problem when trying to estimate a Moran test for residuals in the second
level when there are missing areas. My dataset contains information on
individual nested in cities, the shapefile contains information of the 342
cities, while my dataset contains individuals that belong to 288 cities.

I've used multilevel models to estimate area level variation and now I want
to test the autocorrelation for the residuals in the second level (cities).
I'm using "lm.morantest"; however, I'm getting an error about "areas with
no neighbours" (I already checked that and I'm quite sure that all my areas
are connected). I think the problem may be caused by the missing data
(residuals) for some areas. Since the listw object created, based on the
shape file, contains neighbourhood weights for 342 cities, while from the
estimated multilevel model, I've got residuals data for only 288 cities.

Could you please advise me as to how to test for autocorrelation in the
residuals when there are missing data?
--
Ana

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list