In this vignette we derive the explicit formula for the overall
survival under piecewise constant hazards. This is implemented in the
function PWCsurvOS()
.
So we are in the situation where the hazards for the transitions are piecewise constant, i.e. all three hazard functions λ01(t) (stable to progression), λ02(t) (stable to death) and λ12(t) (progression to death) are step functions. Say the start points of the constant hazard pieces for λ01(t) are 0 ≡ t01(1) < ⋯ < t01(k01), k01 ≥ 1, with corresponding constant positive hazards h01(1), …, h01(k01). Obviously we use here the smallest set of pieces, i.e. neighboring hazards are required to be different, h01(j) ≠ h01(j + 1). This holds analogously for the hazard functions of the other two state transitions.
We denote the cumulative hazards similarly as Λ01(t), Λ02(t) and Λ12(t). Note that these are piecewise linear, with the slope changes occurring at the times of hazard changes.
Now we want to calculate the overall survival (OS) survival function induced by the piecewise constant hazard model. We start from
SOS(t) = SPFS(t) + ∫0tSPFS(u)λ01(u)exp (Λ12(u) − Λ12(t)) du where SOS(t) is the survival function for OS, and SPFS(t) is the survival function for PFS with the closed form
SPFS(t) = exp (−Λ01(t) − Λ02(t)). Hence we can rewrite the integral from above as
exp (−Λ12(t))∫0texp (Λ12(u) − Λ01(u) − Λ02(u))λ01(u) du So overall we now have
$$ S_{\text{OS}}(t) = S_{\text{PFS}}(t) + \exp(- \Lambda_{12}(t)) \cal{I}(t) $$ and we can rewrite the integral $$ \cal{I}(t) := \int_0^t \exp(\Lambda_{12}(u) - \Lambda_{01}(u) - \Lambda_{02}(u))\lambda_{01}(u)\, du $$ in terms of the unique starting time points 0 ≡ t(1) < ⋯ < t(k), chosen such that the set {t(1), …, t(k)} is the smallest super set of all state specific transition starting points {t01(1), …, t01(k01)}, {t02(1), …, t02(k02)} and {t12(1), …, t12(k12)}, as
where:
Note that this is essentially just because of Λ(t) = Λ(s) + h(t − s) when there is a constant hazard λ(t) ≡ h and two time points s < t.
We can then easily derive a closed form for each integral part, j = 1, …, l, where t(l + 1) ≡ t is the end point of the last integral:
Note that if it should happen that b(j) = 0, the integral simplifies further to $$ \cal{I}_{j} = \int_{t_{(j)}}^{t_{(j+1)}} \exp(a_{(j)})h_{01(j)}\,du = \exp(a_{(j)})h_{01(j)}(t_{(j+1)} - t_{(j)}). $$
The above formula is implemented in the function
PWCsurvOS()
. Note that there are a few modifications
compared to above exposition: