bn.test | R Documentation |
bn.test
implements the Besag-Newell test of Besag
and Newell (1991) for finding disease clusters.
bn.test( coords, cases, pop, cstar, ex = sum(cases)/sum(pop) * pop, alpha = 0.1, longlat = FALSE, modified = FALSE )
coords |
An n \times 2 matrix of centroid coordinates for the regions in the form (x, y) or (longitude, latitude) is using great circle distance. |
cases |
The number of cases observed in each region. |
pop |
The population size associated with each region. |
cstar |
A non-negative integer indicating the minimum number of cases to include in each window. |
ex |
The expected number of cases for each region. The default is calculated under the constant risk hypothesis. |
alpha |
The significance level to determine whether a cluster is signficant. Default is 0.10. |
longlat |
The default is |
modified |
A logical value indicating whether a
modified version of the test should be performed. The
original paper recommends computing the p-value for
each cluster as |
Returns a smerc_cluster
object.
Joshua French
Besag, J. and Newell, J. (1991). The detection of clusters in rare diseases, Journal of the Royal Statistical Society, Series A, 154, 327-333.
print.smerc_cluster
,
summary.smerc_cluster
,
plot.smerc_cluster
,
scan.test
data(nydf) data(nyw) coords <- with(nydf, cbind(x, y)) out <- bn.test( coords = coords, cases = nydf$cases, pop = nydf$pop, cstar = 6, alpha = 0.1 ) plot(out) data(nypoly) library(sp) plot(nypoly, col = color.clusters(out))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.