Learn R Programming

scanstatistics (version 0.1.0)

zip_mcsim: Monte Carlo simulation of expectation-based Poisson scan statistics.

Description

This function generates n_mcsim Poisson-distributed data sets according to the parameters in the input table, and calculates the value of the scan statistic for each generated data set using the supplied zones.

Usage

zip_mcsim(table, zones, n_mcsim = 0, ...)

Arguments

table

A data.table with columns location, duration, p, mu.

zones

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

n_mcsim

A positive integer; the number of replicate scan statistics to generate.

...

Arguments passed to simulate_zip_scanstatistic.

Value

A numeric vector of length n_mcsim.