z-values \((\sum_j w_{ij} x_j - W_i \bar x) / (s \sqrt{(n S_{1i} -
W_i^2)/(n-1)})\) for Gi* (self-weights on the diagonal of W; population
variance over all units) and, excluding unit i, with
\(((n-1) S_{1i} - W_i^2)/(n-2)\) for Gi; exactly spdep::localG
(include.self for Gi*).
Usage
LocalGetisOrd(y, W, star = TRUE)
Arguments
- y
Values.
- W
Spatial weights matrix.
- star
Gi* (default) or Gi.
Value
List with z, p_values, statistic (largest
absolute z), star.
References
Getis, A. and Ord, J. K. (1992). The analysis of spatial
association by use of distance statistics. Geographical Analysis 24,
189-206.
Ord, J. K. and Getis, A. (1995). Local spatial autocorrelation
statistics: distributional issues and an application. Geographical
Analysis 27, 286-306.
Examples
W <- matrix(c(1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1), 4)
LocalGetisOrd(c(1, 2, 4, 8), W)$z
#> [1] -1.453631 -1.585258 1.025755 1.453631