negbin_family: Negative Binomial Family for lgspline

View source: R/negbin_helpers.R

negbin_familyR Documentation

Negative Binomial Family for lgspline

Description

Creates a family-like object for NB2 regression. The link is log, the variance function is V(\mu) = \mu + \mu^2/\theta, and the dispersion stored by lgspline (sigmasq_tilde) is the shape parameter \theta.

Usage

negbin_family()

Details

The NB2 model has a nuisance shape parameter \theta analogous to the Weibull scale parameter. It is estimated jointly with \boldsymbol{\beta} and its uncertainty is propagated via the Schur complement correction.

Value

A list with family components used by lgspline.

Examples

fam <- negbin_family()
fam$family
fam$link


lgspline documentation built on Aug. 5, 2026, 1:10 a.m.