For a single spatial or space-time window, this function uses the EM algorithm to estimate the relative risk and the excess zero indicators for counts assumed to be generated from a zero-inflated Poisson distribution.
zip_em_estimates(p, mu, y, d_init = 0.5, tol = 0.01)
A numeric vector of the given/estimated excess zero probabilities corresponding to each count.
A numeric vector of the given/estimated Poisson expected value
parameters corresponding to each count. Of same length as p
.
An integer vector of the observed counts, of same length as
p
.
A scalar between 0 and 1. The initial guess for the estimate of the excess zero indicator.
A scalar between 0 and 1. It is the absolute tolerance criterion
for the estimate of the excess zero indicator; convergence is reached when
two successive elements in the sequence of estimates have an absolute
difference less than tol
.
A list with two elements:
Scalar estimate of the relative risk.
Estimates of the excess zero indicator variables.