\(c_i = \sum_j w_{ij} (z_i - z_j)^2\) with z the standardised x
(Anselin 1995), as spdep::localC. With several variables (x a
matrix, one variable per column) this is the multivariate local Geary of
Anselin (2019), \(c_i = (1/k) \sum_v \sum_j w_{ij} (z_{iv} - z_{jv})^2\),
as spdep::localC on a list of variables.
Usage
Localgeary(x, W, scale = TRUE)
Arguments
- x
Values at the n locations: a vector, or an n x k matrix.
- W
Spatial weights matrix.
- scale
Standardise each variable (sample standard deviation) first.
Value
List with local, global_c, z (a matrix when
k > 1), n, n_variables, method.
References
Anselin, L. (1995). Local indicators of spatial association
Anselin, L. (2019). A local indicator of multivariate spatial
association: extending Geary's c. Geographical Analysis 51, 133-150.
Examples
W <- matrix(0, 4, 4); W[cbind(1:3, 2:4)] <- 1; W <- W + t(W)
Localgeary(c(1, 2, 4, 8), W)$local
#> [1] 0.1043478 0.5217391 2.0869565 1.6695652
Localgeary(cbind(c(1, 2, 4, 8), c(3, 1, 2, 5)), W)$local
#> [1] 0.7378882 1.1180124 2.7577640 2.3776398