extract_hazard: Extract (inverse) cumulative baseline hazard from Cox PH...

View source: R/extract_hazard.R

extract_hazardR Documentation

Extract (inverse) cumulative baseline hazard from Cox PH model

Description

Extracts a function which returns the (inverse) cumulative baseline hazard from a coxph() call.

Usage

extract_hazard(coxphmod)

Arguments

coxphmod

A call to coxph().

Value

A list containing:

  • cbaseh: A function which returns the cumulative baseline hazard at specified time;

  • inv_cbaseh: A function which returns the inverse cumulative baseline hazard at specified time.

  • max_time: maximal time at which cbaseh is known;

  • max_haz: value of maximal hazard (at maximum time).

Author(s)

Daniel Gomon

See Also

coxph

Examples

require(survival)
exprfit <- as.formula("Surv(survtime, censorid) ~ age + sex + BMI")
tcoxmod <- coxph(exprfit, data= surgerydat)
tcox_hazard_fcts <- extract_hazard(tcoxmod)



d-gomon/cgrcusum documentation built on May 3, 2022, 9:40 p.m.