bn.zones {smerc} | R Documentation |
Determine case windows (circles)
Description
bn.zones
determines the case windows (circles) for
the Besag-Newell method.
Usage
bn.zones(d, cases, cstar)
casewin(d, cases, cstar)
Arguments
d |
An |
cases |
A vector of length |
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
data(nydf)
coords <- as.matrix(nydf[, c("longitude", "latitude")])
d <- gedist(coords, longlat = FALSE)
cwins <- bn.zones(d, cases = nydf$cases, cstar = 6)