[GIS] Interpreting Moran’s I results

autocorrelationrspatial statistics

I have a sample of data taken from regions of a country! i want to test if there are any spatial autocorrelation on my data using Moran Indice test.
the null hypothesis: is that there is no spatial autocorrelation
here a sample of my data:

sample data for my variable with locations coordinates

i used this steps to calculate it on r:

 library(RODBC)
 setwd('e:/r/moran')
 channel <- odbcConnectExcel('moran.xls')
 data <- sqlFetch(channel, 'wilaya')
 inf.dists <- as.matrix(dist(cbind(lon=data$Lon, lat=data$Lat)))
 inf.dists.inv <- 1/inf.dists
 diag(inf.dists.inv) <- 0
 library(ape)
 Moran.I(data$year2009, inf.dists.inv)

and i got these results:

$observed
 -0.02229578

$expected
-0.02702703

$sd
 0.03455708

$p.value
 0.8911011

the $observed ~= $expected and they are negative! does that mean there is a little dispersion! but we cannot reject the null hypothesis, so there is no spatial autocoorelation between the regions!

the problem is that i'm not sure about my interpretation ?
and i want to know if the method i used for calculating the weight matrix for moran.I function is right?

Best Answer

The expected value of Moran's I is -1/(N-1), which for your sample of 38 cases equals -1/(38-1) = -0.02702703. This is what the software spit out, so that is a good start! So this means that there is really no evidence of negative auto-correlation here, as with random data you would expect it to be a negative value more often than positive.

You interpret the hypothesis test the same way you do any others. That is, you fail to reject the null hypothesis that there is no spatial auto-correlation in the values of year2009 for this sample.

Your spatial weights matrix code looks fine to me to estimate an inverse distance matrix. The biggest thing to look out for when using inverse distances are very short distances, which can make the weights explode. Spatial weights are often arbitrary though, so it is often domain knowledge that helps you choose whether to use inverse distance, or contiguity, or nearest neighbor, etc. type of a spatial weights matrix. So it appears the code to estimate the inverse distance weighted matrix is fine, but I can't say if it is the correct type of spatial weights matrix to use for your situation.