Simulate a single negative binomial score scan statistic.

Share:

Description

Simulate negative binomial-distributed data according to the supplied parameters and calculate the value of the score scan statistic, according to the specified model.

Usage

1
sim_negbin_statistic(table, zones, wstat_fun)

Arguments

table

A data.table with at least the columns mu and theta. The parameter θ (theta) is the same as size in rnbinom.

zones

A set of zones, each zone itself being a set containing locations. Locations should be encoded as integers.

wstat_fun

The function that calculates the statistic for each window.

Value

A scalar; the scan statistic for the simulated data.

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.