Learn R Programming

scanstatistics (version 0.1.0)

poisson_statistic: Calculate the expectation-based Poisson statistic for each space-time window.

Description

This function calculates the logarithm of the expectation-based Poisson statistic for each space-time window, given already calculated relative risks and aggregate counts and mus.

Usage

poisson_statistic(table)

Arguments

table

A data.table with columns zone, duration, count, mu, relrisk. The columns count and mu contain the sums of the counts and mus for the locations inside each zone and up to the given duration. The column relrisk contains the maximum likelihood estimate for the relative risk for each zone-duration combination.

Value

A data.table with columns zone, duration, statistic. The column statistic contains the logarithm of the statistic for each zone-duration combination.