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:
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
$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?