get_H0 | R Documentation |
Returns the baseline cumulative hazard, at the requested times,
from a Cox model fitted by coxph
. Linear
interpolation is used, assuming the hazard is piecewise constant,
thus the cumulative hazard is piecewise linear.
get_H0(H0, t)
H0 |
output from |
t |
vector of times for which cumulative hazard estimates are required. |
This does not extrapolate. If t
is outside the observed event times, then NA
will be returned.
Fitted cumulative hazard at t
.
library(survival)
wide <- coxph(Surv(years, death==1) ~ sex + thick_centred +
infilt + epith + ulcer + depth + age, data=melanoma)
basehaz(wide)
get_H0(basehaz(wide), c(0,1,5,10,100))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.