info_negbin: Compute Negative Binomial Observed Information Matrix

View source: R/negbin_helpers.R

info_negbinR Documentation

Compute Negative Binomial Observed Information Matrix

Description

Negative Hessian of the NB2 log-likelihood with respect to \boldsymbol{\beta} under the log link.

Usage

info_negbin(X, y, mu, theta, weights = 1)

Arguments

X

Design matrix (N x p).

mu

Mean vector.

theta

Shape parameter.

weights

Observation weights (default 1).

Details

The expected information under log link is

\mathbf{I} = \mathbf{X}^{\top}\mathbf{W}\mathbf{X}

where W_{ii} = w_i \mu_i \theta / (\theta + \mu_i). This is the IRLS weight for NB2 with log link.

Value

Symmetric p x p observed information matrix.


lgspline documentation built on May 8, 2026, 5:07 p.m.