geary.bi {bispdep}R Documentation

Compute Bivariate Geary's Cxy

Description

A simple function to compute Bivariate Geary's Cxy;

C_{xy} = \frac{(n-1)}{2\sum_{i=1}^{n}\sum_{j=1}^{n}w_{ij}} \frac{\sum_{i=1}^{n}\sum_{j=1}^{n}w_{ij}(x_i-y_j)^2}{\sum_{i=1}^{n}(x_i - \bar{x})^2}

Usage

geary.bi(varX, varY, listw, zero.policy=NULL, adjust.n = TRUE,
         alternative = "greater")

Arguments

varX

a numeric vector the same length as the neighbours list in listw with the values of the variable x

varY

a numeric vector the same length as the neighbours list in listw with the values of the variable y

listw

a listw object created for example by nb2listw

zero.policy

default NULL, use global option value; if TRUE assign zero to the lagged value of zones without neighbours, if FALSE assign NA

adjust.n

default TRUE, if FALSE the number of observations is not adjusted for no-neighbour observations, if TRUE, the number of observations is adjusted

alternative

a character string specifying the alternative hypothesis, must be one of greater (default), less or two.sided.

Value

a list with

C

Bivariate Geary's C

Kx

sample kurtosis of x

Ky

sample kurtosis of y

References

Wartenberg, Daniel. 2010. Multivariate Spatial Correlation: A Method for Exploratory Geographical Analysis. Geographical Analysis. 17. 263 - 283. 10.1111/j.1538-4632.1985.tb00849.x.

See Also

gearybi.test

Examples

library(spdep)
data(oldcol)
col.W <- nb2listw(COL.nb, style="W")
geary.bi(COL.OLD$CRIME, COL.OLD$INC, col.W, zero.policy = TRUE)

[Package bispdep version 1.0-0 Index]