Learn R Programming

scanstatistics (version 0.1.0)

zip_calculations: Calculate the (logarithm of the) ZIP statistic for each space-time window.

Description

Calculate the logarithm of the ZIP statistic for each space-time window, summing over the locations and times in the window.

Usage

zip_calculations(table, zones, ...)

Arguments

table

A data.table with columns location, duration, mu, p, count. The column mu contains the Poisson expected value parameters, the column p contains the excess zero probabilities.

zones

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

...

Arguments passed to simulate_zip_scanstatistic.

Value

A data.table with columns zone, duration, statistic.