info_cox: Compute Cox Observed Information Matrix

View source: R/cox_helpers.R

info_coxR Documentation

Compute Cox Observed Information Matrix

Description

Negative Hessian of the Cox partial log-likelihood under the Breslow approximation for tied event times. Data must be sorted by ascending event time.

Usage

info_cox(X, eta, status, y = NULL, weights = 1)

Arguments

X

Design matrix (N x p), sorted by ascending event time.

eta

Linear predictor vector.

status

Event indicator (1 = event, 0 = censored).

y

Optional numeric vector of observed event/censor times, same length and order as eta. When supplied, tied event times are handled with the Breslow approximation. When omitted, the function assumes there are no ties.

weights

Observation weights (default 1).

Details

Under the Breslow approximation, the observed information is

\sum_g d_g^{(w)} \Bigl[\frac{S_{2g}}{S_{0g}} - \Bigl(\frac{S_{1g}}{S_{0g}}\Bigr) \Bigl(\frac{S_{1g}}{S_{0g}}\Bigr)^{\top}\Bigr]

where S_{0g} = \sum_{j \in R_g} w_j e^{\eta_j}, S_{1g} = \sum_{j \in R_g} w_j e^{\eta_j}\mathbf{x}_j, and S_{2g} = \sum_{j \in R_g} w_j e^{\eta_j}\mathbf{x}_j\mathbf{x}_j^{\top}.

Value

Symmetric p x p observed information matrix.


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