gorg
The general G of Getis and Ord
gorg(x, w, nsim = 0, seed = NULL)The global concentration statistic of Getis and Ord (1992) for
non-negative values: G = sum_ij w_ij x_i x_j / sum_{i != j} x_i x_j,
its expectation S0 / (n (n - 1)) and variance under randomisation, the
z statistic, its upper normal tail (high values near high values) and,
with nsim > 0, a permutation p-value. Unlike Moran’s I and Geary’s C it
tells high-value clusters from low-value ones.
Its expectation under randomisation is proved in Lean: see
proof("gorg").
Parameters
Section titled “Parameters”xThe values: finite numbers from 0, at least two positive.
wThe weights:
spwt()’s list, or an spdeplistwobject, for as many units asx.nsimThe number of permutations: a whole number from 0.
seedNULLto draw the simulations’ seed from R’s generator (soset.seed()fixes them), or one whole number from 0.
Returns
Section titled “Returns”A named numeric vector: g, e, v, z, p and pperm
((1 + #{G* >= G}) / (nsim + 1)).
References
Section titled “References”Getis, A. and Ord, J. K. (1992). The analysis of spatial association by use of distance statistics. Geographical Analysis, 24(3), 189-206. doi:10.1111/j.1538-4632.1992.tb00261.x
Examples
Section titled “Examples”set.seed(1)p <- cbind(x = runif(50), y = runif(50))gorg(exp(3 * p[, 1]), spwt(p, type = "band", d = 0.2, style = "raw"))Generated from the R help page: gorg in the R reference.