zero_inflation_index#

superglm.zero_inflation_index(
y,
mu,
sample_weight=None,
*,
family: str = 'poisson',
theta: float | None = None,
) → ZeroInflationResult#

Descriptive zero-inflation index.

Computes the ratio of observed to expected zeros under the assumed family. sample_weight is a replication weight here: both counts and the index denominator use the corresponding replicated-row measure.

Parameters:
yarray-like

Observed response values.

muarray-like

Fitted mean values.

sample_weightarray-like or None

Optional nonnegative replication weights. Integer weights are equivalent to literal row replication.

familystr

Family assumption: "poisson" or "nb2".

thetafloat or None

NB2 theta parameter (required if family="nb2").

Returns:
ZeroInflationResult