besagnewell.stat: Besag and Newell's Statistic for Spatial Clustering

View source: R/besagnewell.stat.R

besagnewell.statR Documentation

Besag and Newell's Statistic for Spatial Clustering

Description

besagnewell.stat computes the statistic around a single location. Data passed must be sorted according to distance to central region, which is supposed to be the first row in the dataframe. Notice that the size of the cluster is k+1.

Usage

besagnewell.stat(data, k)

Arguments

data

A dataframe with the data, as explained in DCluster.

k

Cluster size.

Value

A vector of two elements: the value of the statistic and the size of the cluster (which is equal to the value of the statistic).

References

Besag, J. and Newell, J.(1991). The detection of clusters in rare diseases. Journal of the Royal Statistical Society A 154, 143-155.

See Also

DCluster, besagnewell, besagnewell.boot, besagnewell.pboot

Examples

library(spdep)

data(nc.sids)

sids<-data.frame(Observed=nc.sids$SID74)
sids<-cbind(sids, Expected=nc.sids$BIR74*sum(nc.sids$SID74)/sum(nc.sids$BIR74))
sids<-cbind(sids, x=nc.sids$x, y=nc.sids$y)

besagnewell.stat(sids, k=20)

DCluster documentation built on May 29, 2024, 3:41 a.m.