Geary's (1954) contiguity ratio of values on units with spatial weights
w: C = (n - 1) sum w_ij (x_i - x_j)^2 / (2 S0 sum (x_i - xbar)^2), 1
under no autocorrelation, below 1 when neighbours are alike. Its variance
is given under normality and under randomisation (Cliff and Ord 1981),
with z statistics (1 - C) / sd and their upper normal tails, and, with
nsim > 0, a permutation p-value against positive autocorrelation.
That C has expectation 1 under randomisation is proved in Lean: see
proof("gearc").
Arguments
- x
The values: finite numbers, one per unit.
- w
The weights:
spwt()'s list, or an spdeplistwobject, for as many units asx.- nsim
The number of permutations: a whole number from 0.
- seed
NULLto draw the simulations' seed from R's generator (soset.seed()fixes them), or one whole number from 0.
Value
A named numeric vector: c, vn and vr (its variance under
normality and randomisation), zn, zr, pn, pr, pperm
((1 + #{C* <= C}) / (nsim + 1), NaN without permutations) and s0
(the sum of the weights).
References
Geary, R. C. (1954). The contiguity ratio and statistical mapping. The Incorporated Statistician, 5(3), 115-145. doi:10.2307/2986645
Cliff, A. D. and Ord, J. K. (1981). Spatial Processes: Models and Applications. Pion, London.