Statistics & probability

Hurdle Poisson regression calculator for zero and positive counts

Fit separate logistic positivity and zero-truncated Poisson count regressions to independent integer observations.

Your numbers

25–250 integer counts; both zero and positive values required.
One row per count. Include a column of ones for an intercept; up to three columns.

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Behind the numbers

How this calculation works

Fit separate logistic positivity and zero-truncated Poisson count regressions to independent integer observations. Return both coefficient vectors and the distinction between positive-count and unconditional expected values.

THE FORMULAπᵢ=logistic(xᵢᵀγ), λᵢ=exp(xᵢᵀβ); P(Yᵢ=0)=1−πᵢ; P(Yᵢ=y>0)=πᵢ e^(−λᵢ) λᵢ^y/[y!(1−e^(−λᵢ))]; E(Yᵢ)=πᵢλᵢ/(1−e^(−λᵢ)).

A worked example

The seventy displayed synthetic counts yield occurrence coefficients approximately [0, 0.099043709] and positive-count log-rate coefficients [0.359307292, 1.164740256]. Total negative log likelihood is 94.738203576.

Good to know

25–250 independent integer counts 0–10000; 1–3 explicit full-rank design columns including any intercept, entries within ±20. Need at least p+5 positives and p+3 zeros; positive-row design also full rank. Logit positivity and zero-truncated Poisson rate; coefficient bounds ±15 and rate-predictor bounds ±15, with interior score/curvature checks. No offsets, intervals, negative-binomial component, random effects or global fit certificate.

Separate crossing the hurdle from size

A hurdle model answers two questions: whether a count is positive, and how large it is after positivity occurs. A zero belongs only to the occurrence component. Every positive count contributes both an occurrence outcome and a positive-count likelihood contribution, so the two fitted mechanisms remain interpretable.

This implementation uses a logistic probability for positivity and a log-linked Poisson rate for the positive component. The positive distribution is a Poisson conditioned to exceed zero. It is useful when beginning an activity and repeating that activity plausibly involve different predictor relationships.

Conditional and overall hurdle meansExpected countPredictor-1010246Blue: positive onlyGreen: overall
Scroll across to see the full diagram.
Default fitted positive-count and overall means use the same rate curve but differ by the fitted probability of positivity.

Compare this with the Zero inflated Poisson regression calculator from count observations. Fit zero occurrence separately from a zero-truncated positive-count model;zero-inflated Poisson retains zeros in its count component and has a different likelihood.

Arrange the response and design

Enter one nonnegative integer count per observation and one matching design row. Columns are used exactly as supplied: a leading column of ones creates an intercept. Without that column the fitted linear predictors have no intercept, which is a different model rather than an automatic formatting correction.

The default design has seventy rows with an intercept and a predictor spanning minus one to one. Responses include both zero and positive counts. Their synthetic origin makes them a numerical demonstration, not evidence about a real behavior, customer population or intervention effect.

Understand the likelihood split

For a row with predictor x, positivity probability is logistic of x times the occurrence coefficients. A positive value y has conditional probability proportional to the ordinary Poisson mass divided by one minus exp of negative lambda. The divisor removes the impossible zero from that component.

Because the two coefficient vectors enter separate likelihood terms, they can be optimized independently here. The reported total negative log likelihood adds their contributions. Each component must have a finite interior solution, an acceptably small numerical score and positive local curvature before any fitted predictions are returned.

Interpret the default coefficients

The example produces occurrence coefficients close to zero for the intercept and 0.099044 for the predictor. The log-rate coefficients are approximately 0.359307 and 1.164740. Those are fitted sample results, so they need not match the parameters used to generate the demonstration data.

At predictor zero, the fitted positivity probability is approximately one half and the underlying Poisson rate is approximately 1.432. The conditional positive mean exceeds that rate because the zero mass has been removed. The unconditional mean multiplies that positive mean by the chance of crossing the hurdle.

Distinguish three prediction quantities

The output lists positivity probabilities, untruncated Poisson rates, conditional positive means and overall means for the entered rows. Comparing the rate directly with an observed mean among positive records misses the truncation correction. For small rates, that correction is especially large because most ordinary Poisson probability lies at zero.

A predictor can increase the chance of any activity while decreasing intensity among active observations. Combining the two components can therefore yield a nonlinear overall association. Inspect both coefficient vectors and predicted components rather than assigning one universal multiplicative interpretation to the complete expected count.

Recognize problematic datasets

Complete or near separation in the occurrence model can push logistic coefficients toward infinity. A positive-count sample containing only ones drives the truncated Poisson rate toward zero. Neither situation supports the finite interior fit required here; adding iterations does not supply missing statistical information.

The design must be full rank overall and within positive observations. Rescale large predictors before fitting and avoid duplicate columns. The calculator limits explicit design width to three columns, observations to twenty-five through two hundred fifty, and individual counts to ten thousand to bound the numerical task.

Decide whether the model fits the question

This Poisson positive component still imposes a particular mean-variance relationship after truncation. Strong remaining dispersion, dependent records or varying exposure may need a different model. A finite optimum is a computation check, not a goodness-of-fit certificate or proof that zeros arise through one particular mechanism.

No exposure offset, confidence intervals, random effects, negative-binomial component or out-of-sample query interface is supplied. This hurdle likelihood differs from a zero-inflated mixture because its positive-count process cannot itself generate an observed zero. Choose between those structures using study design and substantive reasoning as well as diagnostics.

A few questions, answered

Is the Poisson rate the mean among positive counts?

No. The positive mean is lambda divided by one minus exp(−lambda), because the distribution has been conditioned to exclude zero.

Why must I include a column of ones?

Columns are used exactly as supplied. A ones column specifies an intercept; without it, the linear predictor has no intercept.

Can occurrence and intensity have opposite slopes?

Yes. A predictor may increase positivity while decreasing the expected count conditional on positivity. The overall mean combines both components.

Why can a dataset of positive ones fail?

The truncated Poisson likelihood can approach its optimum as the underlying rate tends to zero. That is a boundary rather than the finite interior fit this calculator supports.

Find your calculator

Start typing to explore the library.