Introduce a latent Bernoulli distribution indicator , with denoting a structural zero and . Conditional on , retain the negative binomial regression with and . This gives a zero-inflated negative binomial model:
A participant who fishes may still catch zero, so an observed zero does not reveal the latent class. This distinguishes zero inflation from a hurdle model, which truncates the count component at zero. The marginal expectation becomes , and the law of total variance gives
A constant is a parsimonious starting model. If there is evidence that nonparticipation changes with day or other recorded predictors, use logistic regression for instead. Conditional independence of visitors remains an assumption; extra zeros alone do not establish its validity.
Let and . Under the proposed zero-inflated negative binomial model, independence gives the likelihood function
The positive-count factor uses the ordinary, untruncated negative binomial distribution. With , the log-likelihood is
For latent indicators , the complete-data log-likelihood is
where is allowed only when . This separation is what makes the expectation-maximization algorithm convenient.
For EM for zero-inflated negative binomial regression, at iteration apply Bayes' theorem to each zero in the zero-inflated negative binomial model. The E step computes the conditional expectation of its latent indicator:
Treating these values as fixed, the M step maximizes the expected complete-data log-likelihood. Its two parameter blocks separate:
The second block is a weighted negative binomial regression with fixed size . Writing and , its parameter-dependent objective is
Its score function and negative Hessian matrix are
The objective is concave, so a finite maximizer, when it exists, can be found by Newton method or iteratively reweighted least squares. The latter uses working response and weights . This is not an unweighted regression on only the positive counts: zeros retain fractional weight in the count component.
Start with and finite coefficients, alternate the two steps, and monitor the observed log-likelihood. Exact maximization makes the expectation-maximization algorithm nondecreasing in that likelihood, although the mixture may have multiple stationary points. All-zero data can lead to boundary fits and poor identification; multiple initializations and explicit checks for boundary parameters are useful.