Compute Geary's C
geary.RdA simple function to compute Geary's C, called by geary.test and geary.mc;
$$C = \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-x_j)^2}{\sum_{i=1}^{n}(x_i - \bar{x})^2}
$$
geary.intern is an internal function used to vary the similarity
criterion.
Usage
geary(x, listw, n, n1, S0, zero.policy=attr(listw, "zero.policy"), scale=TRUE)
<!-- %geary.intern(x, listw, n, zero.policy, type="geary") -->Arguments
- x
a numeric vector the same length as the neighbours list in listw
- listw
a
listwobject created for example bynb2listw- n
number of zones
- n1
n - 1
- S0
global sum of weights
- zero.policy
default
attr(listw, "zero.policy")as set whenlistwwas created, if attribute not set, use global option value; if TRUE assign zero to the lagged value of zones without neighbours, if FALSE assign NA
Author
Roger Bivand Roger.Bivand@nhh.no