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.
estimate_zip_params(counts, population = NULL, min_p = 0.001, min_mu = 0.3)
A list with two elements:
A matrix of the same dimensions as counts
.
If counts
was a vector, a matrix with 1 row will
be returned.
A matrix of the same dimensions as counts
. If
counts
was a vector, a matrix with 1 row will be
returned.
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.
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
.
The minimum value you think possible for the structural zero probability.
The mimum value you think possible for the Poisson mean parameter of the ZIP distribution (before adjusting for population size).