Skip to content
Prev 1706 / 29559 Next

about "moran's I test"?

On Wed, 7 Feb 2007, Zhang Jian wrote:

            
Please state clearly what the points are - are they point entities, ot 
points representing areal entities? Your choice of measures of contiguity, 
which are essential for the use of Moran's I, will depend on this choice. 
In addition, the points seem to be along a narrow band (river, road?).

My advice on R-help, given your phrasing, was that the correlog function 
in Ottar Bj?rnstad's off-CRAN ncf package looks appropriate:

t1 <- read.table("zj1.txt", header=TRUE)
# to read your data as given in your mail (very few observations indeed)
str(t1)
install.packages("ncf",contriburl="http://asi23.ent.psu.edu/onb1/R/src")
# this for Linux/Mac, Windows is
# install.packages("ncf",contriburl="http://asi23.ent.psu.edu/onb1/R/windows")
library(ncf)
summary(dist(as.matrix(t1[,1:2])))
# to find appropriate distance increments
res <- correlog(t1$x, t1$y, t1$dbh, increment=25)
str(res)
plot(res)

However, this is largely without meaning unless you have some motivated 
understanding of how or why the observations are showing similar values in 
space. The correlog() function takes the whole data range, which is most 
likely totally inappropriate if you know that influence drops off quickly. 
In any case, without taking background variables into account, you may 
"find" autocorrelation when in fact there are spatially patterned missing 
variables.

Hope this helps,

Roger