Free Access Week - Data Engineering + BI
Data Engineering and BI courses are free this week!
Free Access Week - Jun 2-8

scanstatistics (version 1.0.1)

poisson_priority: Compute Poisson priority function values cumulatively over time.

Description

Given a matrices with observed and expected counts (baselines) for each timepoint (row) and location/data stream (column), sum counts and baselines cumulatively backwards in time, and compute the Poisson priority function value for each column and subset of time.

Usage

poisson_priority(counts, baselines, scalar_priority_fun = poisson_qmax)

Arguments

counts

A matrix of observed counts. Rows represent timepoints, ordered from most recent to most distant. Columns represent e.g. locations or data streams.

baselines

A matrix of expected counts with the same dimensions as counts.

scalar_priority_fun

A function taking two arguments c (count) and b (baseline) and returning a scalar.

Value

A matrix with the same dimensions as counts. The ith element in each column contains the Poisson priority function value for the window of time (duration) stretching from 1 to i, for that column.