local_c {sfdep}R Documentation

Compute Local Geary statistic

Description

The Local Geary is a local adaptation of Geary's C statistic of spatial autocorrelation. The Local Geary uses squared differences to measure dissimilarity unlike the Local Moran. Low values of the Local Geary indicate positive spatial autocorrelation and large refers to negative spatial autocorrelation. Inference for the Local Geary is based on a permutation approach which compares the observed value to the reference distribution under spatial randomness. The Local Geary creates a pseudo p-value. This is not an analytical p-value and is based on the number of permutations and as such should be used with care.

Usage

local_c(x, nb, wt, ...)

local_c_perm(x, nb, wt, nsim = 499, alternative = "two.sided", ...)

Arguments

x

a numeric vector, or list of numeric vectors of equal length.

nb

a neighbor list

wt

a weights list

...

other arguments passed to spdep::localC_perm(), e.g. zero.policy = TRUE to allow for zones without neighbors.

nsim

The number of simulations used to generate reference distribution.

alternative

A character defining the alternative hypothesis. Must be one of "two.sided", "less" or "greater".

Details

Overview

The Local Geary can be extended to a multivariate context. When x is a numeric vector, the univariate Local Geary will be calculated. To calculate the multivariate Local Moran provide either a list or a matrix. When x is a list, each element must be a numeric vector of the same length and of the same length as the neighbours in listw. In the case that x is a matrix the number of rows must be the same as the length of the neighbours in listw.

While not required in the univariate context, the standardized Local Geary is calculated. The multivariate Local Geary is always standardized.

The univariate Local Geary is calculated as c_i = \sum_j w_{ij}(x_i - x_j)^2 and the multivariate Local Geary is calculated as c_{k,i} = \sum_{v=1}^{k} c_{v,i} as described in Anselin (2019).

Implementation

These functions are based on the implementations of the local Geary statistic in the development version of spdep. They are based on spdep::localC and spdep::localC_perm.

spdep::localC_perm and thus local_c_perm utilize a conditional permutation approach to approximate a reference distribution where each observation i is held fixed, randomly samples neighbors, and calculated the local C statistic for that tuple (ci). This is repeated nsim times. From the simulations 3 different types of p-values are calculated—all of which have their potential flaws. So be extra judicious with using p-values to make conclusions.

Value

a data.frame with columns

Author(s)

Josiah Parry, josiah.parry@gmail.com

References

Anselin, L. (1995), Local Indicators of Spatial Association—LISA. Geographical Analysis, 27: 93-115. doi:10.1111/j.1538-4632.1995.tb00338.x

Anselin, L. (2019), A Local Indicator of Multivariate Spatial Association: Extending Geary's c. Geogr Anal, 51: 133-150. doi:10.1111/gean.12164

Examples


local_c_perm(guerry_nb$crime_pers, guerry_nb$nb, guerry_nb$wt)


[Package sfdep version 0.2.4 Index]