Learn R Programming

scanstatistics (version 0.1.0)

poisson_relrisk: Add column for relative risk MLE to table with aggregate counts and means.

Description

This function adds a column for the maximum likelihood estimate for the relative risk (assumed to be 1 or greater). The table should contain the aggregates (sums) of the counts and expected value parameters for each zone and duration.

Usage

poisson_relrisk(table)

Arguments

table

A data.table with columns zone, duration, count, mu. The latter two are the sums of observed counts and estimated expected value parameters for the locations comprising the zone and up to the given duration (i.e. cumulative sum for the duration).

Value

The same table, with an extra column relrisk.