View source: R/optimal_ubpop.R
optimal_ubpop | R Documentation |
optimal_ubpop
computes statistics for choosing an optimal population
upper bound. ubpop_seq
is a sequence of values to consider as the
optimal choice of upper bound. The smallest value must be at least
min(pop)/sum(pop)
and should generally be less than or equal to 0.5.
optimal_ubpop(
coords,
cases,
pop,
ex = sum(cases)/sum(pop) * pop,
nsim = 499,
alpha = 0.05,
ubpop_seq = seq(0.01, 0.5, len = 50),
longlat = FALSE,
cl = NULL,
type = "poisson",
min.cases = 0,
simdist = "multinomial"
)
coords |
An |
cases |
The number of cases observed in each region. |
pop |
The population size associated with each region. |
ex |
The expected number of cases for each region. The default is calculated under the constant risk hypothesis. |
nsim |
The number of simulations from which to compute the p-value. |
alpha |
The significance level to determine whether a cluster is signficant. Default is 0.10. |
ubpop_seq |
A strictly increasing numeric vector with values between
min(pop)/sum(pop) and 1. The default is |
longlat |
The default is |
cl |
A cluster object created by |
type |
The type of scan statistic to compute. The
default is |
min.cases |
The minimum number of cases required for a cluster. The default is 2. |
simdist |
Character string indicating the simulation
distribution. The default is |
Returns a smerc_optimal_ubpop
object. This includes:
ubpop_seq |
The sequence of population bounds considered |
elbow_method |
An object with statistics related to the elbow method |
gini_method |
An object with statistics related to the gini method |
elbow_ubpop |
The population upperbound suggested by the elbow method |
gini_ubpop |
The population upperbound suggested by the Gini method |
Joshua French
Meysami, Mohammad, French, Joshua P., and Lipner, Ettie M. The estimation of the optimal cluster upper bound for scan methods in retrospective disease surveillance. Submitted.
Han, J., Zhu, L., Kulldorff, M. et al. Using Gini coefficient to determining optimal cluster reporting sizes for spatial scan statistics. Int J Health Geogr 15, 27 (2016). <doi:10.1186/s12942-016-0056-6>
scan.test
data(nydf)
coords <- with(nydf, cbind(longitude, latitude))
ubpop_stats <- optimal_ubpop(
coords = coords, cases = nydf$cases,
pop = nydf$pop, nsim = 49,
ubpop_seq = seq(0.05, 0.5, by = 0.05)
)
ubpop_stats
## Not run:
plot(ubpop_stats)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.