I wrote a script that produces three raster objects and computes their local and global values for Moran's I. The rasters exhibit regular, clustered and randomly distributed data. I would have expected the values for Moran's I to approximate -1, 1, and 0 for the three scenarios. However this is not the case for the regular data. Moran's I comes out at around 0 instead of -1, both locally and globally and I don't understand why.
To form this into a question: What do I have to change about the regular grid so it results in a Moran's I approaching -1?
Here's the script that I used to compute and plot the rasters and statistics (cell neighbourhood definition is queen's case):
library (raster) library (rasterVis) n <- 11 r_regular <- raster (nrows=n, ncols=n, xmn=0, xmx=1, ymn = 0, ymx = 1) values (r_regular) <- 0 values (r_regular) [seq (1, n^2, by = 2)] <- 1 m_regular <- MoranLocal (r_regular) mg_reg <- Moran (r_regular) r_clust <- r_regular values (r_clust) <- 0 values (r_clust) [seq (1, (n^2) / 2)] <- 1 m_clust <- MoranLocal (r_clust) mg_clust <- Moran (r_clust) r_rand <- r_regular values (r_rand) <- 0 values (r_rand) [sample.int (n^2, n^2 / 2)] <- 1 m_rand <- MoranLocal (r_rand) mg_rand <- Moran (r_rand) ms <- stack (r_regular, r_clust, r_rand, m_regular, m_clust, m_rand) nms <- c ("Regular data", "Clustered data", "Random data", paste0 ("Regular - Global I: ", mg_reg), paste0 ("Clustered - Global I: ", mg_clust), paste0 ("Random: Global I: ", mg_rand) ) levelplot (ms, names = nms)