1\name{kullnagar.stat} 2 3\alias{kullnagar.stat} 4\alias{kullnagar.stat.poisson} 5\alias{kullnagar.stat.bern} 6 7 8\title{Kulldorff and Nagarwalla's Statistic for Spatial Clustering.} 9 10\description{ 11Compute Kulldorff and Nagarwalla's spatial statistic for cluster detection 12around a single region, which is supposed to be the first row of the 13dataframe. The other regions are supposed to be sorted by distance to 14the centre in the data frame. 15 16Two possible function are provided: \emph{kullnagar.stat.poisson}, for th 17Poisson case, and \emph{kullnagar.stat.bern}, for the Bernouilli case. 18 19See \emph{kullnagar} manual page for details. 20} 21 22 23\usage{ 24kullnagar.stat(data, fractpop, use.poisson=TRUE, log.v=FALSE) 25} 26 27 28\arguments{ 29\item{data}{A dataframe with the data as explained in \emph{DCluster}.} 30\item{fractpop}{Maximum fraction of the total population used when 31creating the balls.} 32\item{use.poisson}{Use the statistic for Poisson (default) or Bernouilli case.} 33\item{log.v}{Whether the logarithm of the statistic is returned or not.} 34} 35 36\value{ 37Returns a vector of two elements: the value of the statistic and the 38size (in number of regions) of the cluster. 39} 40 41 42\seealso{ 43DCluster, kullnagar, kullnagar.stat, kullnagar.boot, kullnagar.pboot 44} 45 46 47\examples{ 48library(spdep) 49 50data(nc.sids) 51 52sids<-data.frame(Observed=nc.sids$SID74) 53sids<-cbind(sids, Expected=nc.sids$BIR74*sum(nc.sids$SID74)/sum(nc.sids$BIR74)) 54sids<-cbind(sids, Population=nc.sids$BIR74, x=nc.sids$x, y=nc.sids$y) 55 56 57dist<-(sids$x-sids$x[1])^2+(sids$y-sids$y[1])^2 58index<-order(dist) 59#Compute the statistic around the first county 60kullnagar.stat(sids[index,], fractpop=.5) 61} 62 63 64\references{ 65Kulldorff, Martin and Nagarwalla, Neville (1995). Spatial Disease Clusters: Detection and Inference. Statistics in Medicine 14, 799-810. 66} 67 68\keyword{spatial} 69