NBProfileResult#

class superglm.NBProfileResult(
theta_hat: float,
nll: float,
converged: bool,
evaluations: DataFrame = <factory>,
warnings: list[str] = <factory>,
_y: NDArray | None = None,
_mu: NDArray | None = None,
_weights: NDArray | None = None,
_weight_semantics: str = 'frequency',
_bound_side: str | None = None,
_ci_cache: dict[float,
~superglm.profiling._scalar.Interval]=<factory>,
_caution: str | None = None,
_optimum_point: tuple[float,
float,
bool] | None=None,
_ci_cautions: dict[float,
list[str]]=<factory>,
)#

Bases: object

Profile-likelihood estimate of the NB2 shape theta.

nll is the mean negative log-likelihood at theta_hat and the published fitted mean, which the interval and the plot measure against. evaluations lists each alternation step’s theta and NLL in order.

interval(alpha: float = 0.05) → Interval#

Likelihood-ratio interval for theta on the fixed-mean profile, with censoring flags.

A censored side, and a theta_hat that is not the fixed-mean optimum, is recorded in warnings when first computed and warned about on every call; the interval is then inverted from that optimum.

ci(alpha: float = 0.05) → tuple[float, float]#

(lower, upper) of interval(); a censored side is where its search stopped.

profile_plot(alpha: float = 0.05, ax=None)#

Likelihood-ratio statistic on a 40-point log grid around the interval.