Skip to content
Prev 28331 / 29559 Next

Moran's I with Objects of Different Length

On Tue, 11 Aug 2020, Chanda Chiseni wrote:

            
It usually indicates muddled thinking. You have more than?one observation 
at the same point, which could be an unintended duplicate (copy of the 
same observation), or it could indicate that any spatial process has 
multiple values at that point. In geostatistics, one would jitter the 
points to introduce distance. In your case, this probably isn't households 
living at one address point. All the observations at the same point will 
get the same sets of neighbours. If there are many co-located 
observations, k in k-nearest may be too small to include them all.
So you've an error anyway.
Testing residuals using moran.test() is usually wrong, as the expectation 
and variance of the statistic are based on a null model (intercept only), 
not a model with covariates.

What are length(residuals.glm(svyprobitest)) and length(knear2.nb)? Did 
glm drop observations with missing values? If so, you should subset both 
the data submitted to glm() and the neighbour object so that they match.

Hope this helps,

Roger