% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/negbin_helpers.R
\name{negbin_helpers}
\alias{negbin_helpers}
\title{Negative Binomial Regression Helpers for lgspline}
\description{
Functions for fitting negative binomial (NB2) regression models within the
lgspline framework. Analogous to the Weibull AFT and Cox PH helpers, these
provide the log-likelihood, score, information, and all interface functions
needed by lgspline's unconstrained fitting, penalty tuning, and inference
machinery.
}
\details{
The parameterization follows NB2: \eqn{Y \sim \mathrm{NB}(\mu, \theta)}
with \eqn{\mathrm{Var}(Y) = \mu + \mu^2/\theta}, where \eqn{\theta > 0}
is the shape (size) parameter. The canonical link is log:
\eqn{\eta = \log\mu}. The dispersion stored in
\code{lgspline$sigmasq_tilde} is \eqn{\theta} itself, not
\eqn{1/\theta}.
}
