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 |
varY |
a numeric vector the same length as the neighbours list in listw with the values of the variable |
listw |
a |
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 |
Ky |
sample kurtosis of |
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
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)