get_cox_hessian: Compute the Hessian Matrix for Cox Proportional Hazards Model

get_cox_hessianR Documentation

Compute the Hessian Matrix for Cox Proportional Hazards Model

Description

This function computes the Hessian matrix of the Cox proportional hazards model, which is used for estimating the covariance matrix of the coefficients. The Hessian is calculated by summing contributions from each event time in the risk set.

Usage

get_cox_hessian(X, time, status, coefs, entry_points)

Arguments

X

A matrix of covariates (design matrix) for the Cox model.

time

A numeric vector of event times.

status

A numeric vector of event indicators (1 for event, 0 for censored).

coefs

A numeric vector of coefficients for the Cox model.

entry_points

A numeric vector of entry times for the subjects. Defaults to 0.

Value

A matrix representing the negative Hessian of the Cox model.


catalytic documentation built on April 4, 2025, 5:51 a.m.