Does anyone know how to produce the p-value and z-scores in order to do a significance test in the local Moran's I values obtained by the following code?
The input is a remote sensing image:
The produced by the code raster showing local Moran's I values is this:
library(raster)
library(classInt)
r <- raster('FIL1992_EL.tif')
r <- crop(r, extent(1900000, 2200000, 4500000, 4700000)) # central EL
m <- MoranLocal(r, w=matrix(c(1,1,1,
1,0,1,
1,1,1), 3,3))
zClass <- classIntervals(values(m), n=5, style="kmeans")
plot(m, breaks=zClass$brks, col=colorRampPalette(c("pink", "red4"))(5) )