Learn R Programming

scanstatistics (version 1.1.1)

estimate_zip_params: Estimate the parameters of a ZIP distribution.

Description

Heuristically estimate the ZIP distribution Poisson mean parameters and the structural zero probabilities for each location and time point. Assumes the structural zero probability is constant over time for each location.

Usage

estimate_zip_params(counts, population = NULL, min_p = 0.001, min_mu = 0.3)

Value

A list with two elements:

baselines

A matrix of the same dimensions as counts. If counts was a vector, a matrix with 1 row will be returned.

probs

A matrix of the same dimensions as counts. If counts was a vector, a matrix with 1 row will be returned.

Arguments

counts

A matrix or vector of observed counts. Rows indicate time (ordered from most recent) and columns indicate locations. If a vector, the elements are assumed to be the counts for each location.

population

A matrix or vector of populations for each location (optional). If a matrix, should be of the same dimensions as counts. If a vector, should be of the same length as the number of columns in counts.

min_p

The minimum value you think possible for the structural zero probability.

min_mu

The mimum value you think possible for the Poisson mean parameter of the ZIP distribution (before adjusting for population size).