An index for spatial autocorrelation. Complete spatial randomness (lack of spatial pattern) is indicated by a Geary Ratio (GR) of 1; positive autocorrelation moves the index towards zero, while negative autocorrelation will push the index towards 2.

gr(x, w, digits = 3, na.rm = FALSE, warn = TRUE)

Source

Chun, Yongwan, and Daniel A. Griffith. Spatial Statistics and Geostatistics: Theory and Applications for Geographic Information Science and Technology. Sage, 2013.

Geary, R. C. "The contiguity ratio and statistical mapping." The Incorporated Statistician 5, no. 3 (1954): 115-127_129-146.

Unwin, Antony. "Geary's Contiguity Ratio." The Economic and Social Review 27, no. 2 (1996): 145-159.

Arguments

x

Numeric vector of length n. By default, this will be standardized using the scale function.

w

An n x n spatial connectivity matrix. See shape2mat.

digits

Number of digits to round results to.

na.rm

If na.rm = TRUE, observations with NA values will be dropped from both x and w.

warn

If FALSE, no warning will be printed to inform you when observations with NA values have been dropped, or if any observations without neighbors have been found.

Value

Returns the Geary ratio (a single numeric value).

Details

The Geary Ratio is an index of spatial autocorrelation. The numerator contains a series of sums of squared deviations, which will be smaller when each observation is similar to its neighbors. This term makes the index sensitive to local outliers, which is advantageous for detecting such outliers and for measuring negative autocorrelation. The denominator contains the total sum of squared deviations from the mean value. Hence, under strong positive autocorrelation, the GR approaches zero. Zero spatial autocorrelation is represented by a GR of 1. Negative autocorrelation pushes the GR above 1, towards 2. $$GR = \frac{n-1}{2K} \frac{M}{D}$$ $$M = \sum_i \sum_j w_{i,j} (x_i - x_j)^2 $$ $$D = \sum_i (x_i - \overline{x})^2 $$ Observations with no neighbors are removed before calculating the GR. The alternative is for those observations to contribute zero to the numerator---but zero is not a neutral value, it represents strong positive autocorrelation.

Examples

data(georgia)
x <- log(georgia$income)
w <- shape2mat(georgia, "W")
gr(x, w)