Is wikipedia wrong...or I don't understand it?
Wikipedia: The white and black squares ("chess pattern") are perfectly dispersed so Moran's I would be −1. If the white squares were stacked to one half of the board and the black squares to the other, Moran's I would be close to +1. A random arrangement of square colors would give Moran's I a value that is close to 0.
# Example data: x_coor<-rep(c(1:8), each=8) y_coor<-rep(c(1:8), length=64) my.values<-rep(c(1,0,1,0,1,0,1,0,0,1,0,1,0,1,0,1), length=64) rbPal <- colorRampPalette(c("darkorchid","darkorange")) my.Col <- rbPal(10)[as.numeric(cut(my.values,breaks = 10))] # plot the point pattern... plot(y_coor,x_coor,col = my.Col, pch=20, cex=8, xlim=c(0,9),ylim=c(0,9))
So as you can see points are perfectly dispersed
# Distance matrix my.dists <- as.matrix(dist(cbind(x_coor,y_coor))) # ...inversed distance matrix my.dists.inv <- 1/my.dists # diagonals are "0" diag(my.dists.inv) <- 0
Moran's I computation library(ape)
Moran.I(my.values, my.dists.inv) $observed  -0.07775248 $expected  -0.01587302 $sd  0.01499786 $p.value  3.693094e-05
Why I get observed = -0.07775248 instead of "-1".