Spatial autocorrelation
autocor.RdCompute Moran's I or Geary's C measures of global spatial autocorrelation in a RasterLayer, or compute the the local Moran or Geary index (Anselin, 1995).
Arguments
- x
RasterLayer
- w
Spatial weights defined by or a rectangular matrix with odd length (3, 5, ...) sides (as in
focal)
Details
The default setting uses a 3x3 neighborhood to compute "Queen's case" indices. You can use a filter (weights matrix) to do other things, such as "Rook's case", or different lags.
See also
The spdep package for additional and more general approaches for computing indices of spatial autocorrelation