Learn R Programming

scanstatistics (version 0.1.0)

negbin_increasing_calculations: Calculate the increasing score for each space-time window.

Description

Calculate the increasing score for each space-time window, given the initial data of counts, expected values, and overdispersion parameters.

Usage

negbin_increasing_calculations(table, zones)

Arguments

table

A data.table with columns location, duration, mu, theta, count. The location column should consist of integers that are unique to each location. The duration column should also consist of integers, starting at 1 for the most recent time period and increasing in reverse chronological order.

A negative binomial distribution parametrized by \(\mu\) and \(\theta\) (columns mu and theta respectively) has expected value \(\mu\) and variance \(\mu+\mu^2/\theta\). The parameter \(\theta\) is referred to as the size in NegBinomial, and theta in negative.binomial.

zones

A set of zones, each zone itself a set containing one or more locations of those found in table.

Value

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