I have to compute the local moran test statistics for a set of spatial data. I am using the R function localmoran from the spdep package. For some of my geographical units the variance of the local moran test statistics is NEGATIVE. This impedes me to plot e.g. LISA maps, for it makes it impossible to compute the significance of the local moran test for each unit.
Note that for the majority of the units the computation works fine! So I wouldn't ascribe the error to the function, the weights matrix is also correct, can it just be that some of the data is not compatible to the localmoran function??
Any idea how can this be possible?
Thanks!