cox_family: Cox Proportional Hazards Family for lgspline

View source: R/cox_helpers.R

cox_familyR Documentation

Cox Proportional Hazards Family for lgspline

Description

Creates a family-like object for Cox PH models. The link function is log (the linear predictor is log-relative-hazard), but unlike standard GLM families there is no dispersion parameter and no closed-form mean-variance relationship.

The family provides $loglik and $aic methods compatible with logLik.lgspline.

Usage

cox_family()

Details

Cox PH is semiparametric: the baseline hazard is unspecified. The partial log-likelihood depends only on the order of event times and the linear predictor \eta = \mathbf{X}\boldsymbol{\beta}. Consequently:

  • No dispersion parameter is estimated (sigmasq_tilde is fixed at 1).

  • dev.resids returns martingale-style residuals for GCV tuning compatibility.

  • The response variable is survival time (positive), and the link is log.

Value

A list with family components used by lgspline.

Examples

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


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