bn.zones: Determine case windows (circles)

Description Usage Arguments Details Value Author(s) References Examples

View source: R/bn.zones.R

Description

bn.zones determines the case windows (circles) for the Besag-Newell method.

Usage

1
2
3
bn.zones(d, cases, cstar)

casewin(d, cases, cstar)

Arguments

d

An n\times n square distance matrix containing the intercentroid distance between the n region centroids.

cases

A vector of length n containing the observed number of cases for the n region centroids.

cstar

A non-negative integer indicating the minimum number of cases to include in each window.

Details

Using the distances provided in d, for each observation, the nearest neighbors are included in increasingly larger windows until at least cstar cases are included in the window. Each row of d is matched with the same position in cases.

Value

Returns the indices of the regions in each case window as a list. For each element of the list, the indices are ordered from nearest to farthest from each centroid (and include the starting region).

Author(s)

Joshua French

References

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

Examples

1
2
3
4
data(nydf)
coords = as.matrix(nydf[,c("longitude", "latitude")])
d = sp::spDists(coords, longlat = FALSE)
cwins = bn.zones(d, cases = nydf$cases, cstar = 6)

smerc documentation built on Oct. 1, 2021, 5:07 p.m.