File: geary.Rd

package info (click to toggle)
r-cran-spdep 1.1-5%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 3,012 kB
  • sloc: ansic: 1,489; sh: 16; makefile: 2
file content (46 lines) | stat: -rw-r--r-- 1,473 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
% Copyright 2001 by Roger S. Bivand
\name{geary}
\alias{geary}
%\alias{geary.intern}
\title{Compute Geary's C}
\description{
  A simple function to compute Geary's C, called by \code{geary.test} and \code{geary.mc};
\deqn{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}
}
\code{geary.intern} is an internal function used to vary the similarity
criterion.
}
\usage{
geary(x, listw, n, n1, S0, zero.policy=NULL)
%geary.intern(x, listw, n, zero.policy, type="geary")
}

\arguments{
  \item{x}{a numeric vector the same length as the neighbours list in listw}
  \item{listw}{a \code{listw} object created for example by \code{nb2listw}}
  \item{n}{number of zones}
  \item{n1}{n - 1}
  \item{S0}{global sum of weights}
  \item{zero.policy}{default NULL, use global option value; if TRUE assign zero to the lagged value of zones without neighbours, if FALSE assign NA}
%  \item{type}{"geary" or "sokal" criteria for similarity}
}

\value{
a list with
  \item{C}{Geary's C}
  \item{K}{sample kurtosis of x}
}
\references{Cliff, A. D., Ord, J. K. 1981 Spatial processes, Pion, p. 17.}
\author{Roger Bivand \email{Roger.Bivand@nhh.no}}

\seealso{\code{\link{geary.test}}, \code{\link{geary.mc}}, 
\code{\link{sp.mantel.mc}}}

\examples{
data(oldcol)
col.W <- nb2listw(COL.nb, style="W")
str(geary(COL.OLD$CRIME, col.W, length(COL.nb), length(COL.nb)-1,
 Szero(col.W)))
}
\keyword{spatial}