dmst.zones | R Documentation |
dmst.zones
determines the zones for the Dynamic
Minimum Spanning Tree scan test (dmst.test
). The
function returns the zones, as well as the associated
test statistic, cases in each zone, the expected number
of cases in each zone, and the population in each zone.
dmst.zones(
coords,
cases,
pop,
w,
ex = sum(cases)/sum(pop) * pop,
ubpop = 0.5,
ubd = 1,
longlat = FALSE,
cl = NULL,
progress = TRUE
)
coords |
An |
cases |
The number of cases observed in each region. |
pop |
The population size associated with each region. |
w |
A binary spatial adjacency matrix for the regions. |
ex |
The expected number of cases for each region. The default is calculated under the constant risk hypothesis. |
ubpop |
The upperbound of the proportion of the total population to consider for a cluster. |
ubd |
A proportion in (0, 1]. The distance of
potential clusters must be no more than |
longlat |
The default is |
cl |
A cluster object created by |
progress |
A logical value indicating whether a
progress bar should be displayed. The default is
|
Every zone considered must have a total population less
than ubpop * sum(pop)
. Additionally, the maximum
intercentroid distance for the regions within a zone must
be no more than ubd * the maximum intercentroid
distance across all regions
.
Returns a list with elements:
zones |
A list contained the location ids of each potential cluster. |
loglikrat |
The loglikelihood ratio for each zone (i.e., the log of the test statistic). |
cases |
The observed number of cases in each zone. |
expected |
The expected number of cases each zone. |
pop |
The total population in each zone. |
Joshua French
Assuncao, R.M., Costa, M.A., Tavares, A. and Neto, S.J.F. (2006). Fast detection of arbitrarily shaped disease clusters, Statistics in Medicine, 25, 723-742. <doi:10.1002/sim.2411>
data(nydf)
data(nyw)
coords <- as.matrix(nydf[, c("longitude", "latitude")])
# find zone with max statistic starting from each individual region
all_zones <- dmst.zones(coords,
cases = floor(nydf$cases),
nydf$pop, w = nyw, ubpop = 0.25,
ubd = .25, longlat = TRUE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.