A built-in negative-binomial family for use with [fastglm()] and [fastglmPure()] when `theta` (the NB2 dispersion) is known. Equivalent to `MASS::negative.binomial(theta, link)` but without taking a hard dependency on the **MASS** package. The variance is `mu + mu^2 / theta`; as `theta -> Inf` it reduces to Poisson.
negbin(theta, link = "log")A `family` object with class `"family"` and `family$family == "Negative Binomial(theta)"`. The object also carries the slot `family$theta`, which `family_code()` and the dispatch layer use to detect the native NB fast path.
For joint estimation of `theta` together with `beta`, use the dedicated (forthcoming) `fastglm_nb()` entry point. The `negbin()` family here is intended for use cases where `theta` has been pre-specified or estimated separately.