Obtain the cumulative hazard at a particular time, given a data frame of piecewise-constant background hazards. This is used in the computation of likelihoods and results in additive hazards models.
Arguments
- t
A time point, or vector of time points, to calculate the cumulative hazard at.
- backhaz
A data frame with two columns, named
"time"
and"hazard"
. Each row gives the "background" hazard between the specified time and the next time.- strata
A vector of the same length as
t
indicating strata. There should then bea column in
backhaz
namedstratum
, which should be a factor with the same levels asstrata
(or analogous character vector).a row in
backhaz
indicating the background hazard at each time interval for each stratum instrata
.
We assume that the background hazard is known at all times, and defined by a piecewise-constant function (step function) of time. The first element of
"time"
should be 0, and the final row specifies the hazard at all times greater than the last element of"time"
.In additive hazards models, the background hazard is the hazard of death from causes other than the specific cause of interest. The overall hazard is defined as the sum of the background hazard and the cause-specific hazard. In
survextrap
, the cause-specific hazard is modelled with the M-spline model, and the background hazard is assumed to be known.