View source: R/extract_hazard.R
extract_hazard | R Documentation |
Extracts a function which returns the (inverse) cumulative
baseline hazard from a coxph()
call.
extract_hazard(coxphmod)
coxphmod |
A call to |
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).
Daniel Gomon
coxph
require(survival) exprfit <- as.formula("Surv(survtime, censorid) ~ age + sex + BMI") tcoxmod <- coxph(exprfit, data= surgerydat) tcox_hazard_fcts <- extract_hazard(tcoxmod)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.