Simulate negative binomial-distributed data according to the supplied parameters and calculate the value of the score scan statistic, according to the specified model.
sim_negbin_statistic(table, zones, wstat_fun)
A data.table
with at least the columns mu
and
theta
. The parameter \(\theta\) (theta) is the same as
size
in rnbinom
.
A set
of zones, each zone itself being a set
containing locations. Locations should be encoded as integers.
The function that calculates the statistic for each window.
A scalar; the scan statistic for the simulated data.