Tutorials › Joint Modeling of Longitudinal and Time-to-Event Data › Piecewise-Baseline Likelihood for Competing Risks

Competing Risks and Recurrent Events · Tutorial 412 of 697

Piecewise-Baseline Likelihood for Competing Risks

Learn to build a cause-specific piecewise-baseline likelihood, including survival exposure across intervals and the event factor for the observed cause.

Advanced 12 min read

What You'll Learn

  • Define cause-specific piecewise-constant baseline hazards over a shared partition of follow-up time.
  • Construct an individual’s conditional likelihood from cumulative hazard and event or censoring contributions.
  • Calculate interval exposure when predictors are constant within an interval.
  • Distinguish an observed event’s cause-specific density from a censoring contribution.
  • Check the assumptions and common failure modes of the piecewise-baseline likelihood.

Why the Interval Contributions Matter

In a competing-risks joint model, a subject can experience one of several event causes, but only the first event is observed. The likelihood must therefore represent two things at once: survival without any event up to the observed time, and, if an event occurred, its cause-specific hazard at that time. A piecewise-constant baseline makes the baseline hazard simple within each time interval, but survival exposure can still accumulate over several intervals before an event or censoring.

The likelihood developed here is conditional on the subject’s random effects and the covariate and longitudinal-marker trajectory used in the cause-specific hazards. This is the event-process contribution. It is not yet the marginal likelihood obtained by integrating over the random-effects distribution, nor does it include the longitudinal measurement likelihood.

Model and Assumptions

Definition: Let \(T_i\) be the time to the first event for subject \(i\), \(D_i\in\{1,\ldots,R\}\) its cause, and \(C_i\) the censoring time. The observed time is \(Y_i=\min(T_i,C_i)\), and \(\delta_i=1\) if an event is observed and \(0\) if the subject is censored. Partition time into intervals \((a_{k-1},a_k]\), \(k=1,\ldots,K\), where \(a_0=0\). For cause \(r\), specify the conditional hazard on interval \(k\) as $$ \lambda_{ir}(t\mid b_i)=\lambda_{0rk}\exp\{\eta_{ir}(t;b_i)\}, \qquad a_{k-1}<t\leq a_k, $$ where \(\lambda_{0rk}>0\) is the cause-specific baseline hazard for that interval and \(\eta_{ir}(t;b_i)\) is the cause-specific linear predictor, which may depend on covariates, the longitudinal trajectory, and random effects \(b_i\).

The baseline is piecewise constant; the full hazard need not be. If a marker trajectory makes \(\eta_{ir}(t;b_i)\) vary within an interval, the exponential of that predictor also varies, and its contribution must be integrated over time. The partition can include a final interval with \(a_K=\infty\), provided the hazard is defined there.

The conditional likelihood relies on the standard continuous-time cause-specific hazard formulation: conditional on \(b_i\) and the modeled covariate and marker trajectory, the instantaneous probability of cause \(r\) in a short interval of length \(dt\), given survival to \(t\), is \(\lambda_{ir}(t\mid b_i)dt+o(dt)\). The cause-specific hazards add to give the hazard of any event. The likelihood also assumes censoring is noninformative conditional on the variables included in the model, so censoring contributes survival through \(Y_i\), not an additional event-cause factor. Exact event times are treated as observed; ties are not assigned positive probability under the continuous-time model.

Constructing One Subject’s Likelihood

For each interval, only the portion of that interval that falls between time zero and the observed time contributes exposure. Define

$$ A_{irk}(Y_i;b_i)=\lambda_{0rk}\int_{(a_{k-1},a_k]\cap[0,Y_i]}\exp\{\eta_{ir}(t;b_i)\}\,dt. $$

An empty intersection contributes zero. The cumulative hazard for any event up to \(Y_i\) is the sum over causes and intervals, \(\sum_{r=1}^{R}\sum_{k=1}^{K}A_{irk}(Y_i;b_i)\). Thus survival without any cause through \(Y_i\) is the exponential of the negative of this sum.

Result: If an event is observed at \(Y_i\) with cause \(D_i\), its conditional likelihood contribution is the survival probability through \(Y_i\) multiplied by the hazard for the observed cause at \(Y_i\). If the subject is censored at \(Y_i\), the contribution is survival alone: $$ L_i^{T,D\mid b_i}= \left[\prod_{r=1}^{R}\{\lambda_{ir}(Y_i\mid b_i)\}^{\delta_i\,1(D_i=r)}\right] \exp\left\{-\sum_{r=1}^{R}\sum_{k=1}^{K}A_{irk}(Y_i;b_i)\right\}. $$

When \(\delta_i=0\), all event-factor exponents are zero, and the product is one. When \(\delta_i=1\), exactly the factor for the observed cause remains. The cause-specific event factor uses the interval containing \(Y_i\); using a consistent convention at interval boundaries is sufficient because an exact event at a fixed boundary has probability zero under a continuous-time model.

Derivation: Survival and Event Contributions

Write \(S_i(t\mid b_i)\) for the probability of no event of any cause by time \(t\), conditional on \(b_i\) and the modeled trajectories. Over a small time increment \(dt\), surviving to \(t+dt\) requires surviving to \(t\) and avoiding every cause during the increment. The hazard definition gives

$$ S_i(t+dt\mid b_i)=S_i(t\mid b_i)\left[1-\sum_{r=1}^{R}\lambda_{ir}(t\mid b_i)dt+o(dt)\right]. $$

Subtract \(S_i(t\mid b_i)\), divide by \(dt\), and take the limit as \(dt\) tends to zero. This yields \(dS_i(t\mid b_i)/dt=-S_i(t\mid b_i)\sum_r\lambda_{ir}(t\mid b_i)\). Dividing by \(S_i(t\mid b_i)\) and integrating from zero to \(Y_i\), with \(S_i(0\mid b_i)=1\), gives

$$ S_i(Y_i\mid b_i)= \exp\left\{-\sum_{r=1}^{R}\int_0^{Y_i}\lambda_{ir}(t\mid b_i)\,dt\right\} = \exp\left\{-\sum_{r=1}^{R}\sum_{k=1}^{K}A_{irk}(Y_i;b_i)\right\}. $$

The conditional density of an event of cause \(r\) at time \(t\) is \(S_i(t\mid b_i)\lambda_{ir}(t\mid b_i)\): survival is required up to \(t\), followed by an event of cause \(r\) at that time. A censored subject supplies only the probability of remaining event-free through the censoring time, under the stated conditional censoring assumption. These facts give the likelihood above.

A useful simplification applies when \(\eta_{ir}(t;b_i)=\eta_{irk}\) is constant within interval \(k\). If \(e_{ik}(Y_i)\) is the length of that interval’s overlap with \([0,Y_i]\), then

$$ A_{irk}(Y_i;b_i)=\lambda_{0rk}\exp(\eta_{irk})e_{ik}(Y_i). $$

This is the piecewise-exponential exposure calculation. It is exact under an interval-constant predictor. If the predictor changes within an interval, replacing the integral by this expression requires an approximation; the exact likelihood retains the integral.

Worked Example: Event of Cause 2 After Crossing an Interval Boundary

Consider a hypothetical subject followed to an event of cause 2 at \(Y_i=3\) years. The intervals are \((0,2]\) and \((2,4]\). Suppose the conditional cause-specific hazards are constant within each interval: cause 1 has hazards \(0.10\) and \(0.20\) per year, and cause 2 has hazards \(0.05\) and \(0.10\) per year. These values include the subject’s predictor effects.

The subject contributes two years in the first interval and one year in the second. The cumulative hazard for cause 1 is \(0.10(2)+0.20(1)=0.40\). For cause 2 it is \(0.05(2)+0.10(1)=0.20\). The total cumulative hazard is \(0.40+0.20=0.60\), so survival through year 3 is \(\exp(-0.60)=0.5488\).

The event occurs in the second interval, and its cause-specific hazard is \(0.10\) per year for cause 2. Therefore, $$ L_i^{T,D\mid b_i}=0.10\exp(-0.60)=0.05488\ \text{per year}. $$ The likelihood is a density in event time, so its units are inverse years. The event factor is not the total hazard \(0.20+0.10\); it is the hazard for the observed cause.

Worked Example: Censoring After Partial Exposure to an Interval

Suppose a hypothetical subject has no observed event and is censored at \(Y_i=3\) years. Using intervals \((0,2]\) and \((2,4]\), let the cause 1 hazards be \(0.08\) and \(0.12\) per year and the cause 2 hazards be \(0.04\) and \(0.06\) per year. Assume these hazards are constant within intervals conditional on the subject’s modeled trajectory.

For cause 1, cumulative hazard through censoring is \(0.08(2)+0.12(1)=0.28\). For cause 2, it is \(0.04(2)+0.06(1)=0.14\). The total is \(0.28+0.14=0.42\), so the censoring contribution is $$ L_i^{T,D\mid b_i}=S_i(3\mid b_i)=\exp(-0.42)=0.6570. $$

There is no factor for either cause’s hazard at year 3 because no event was observed. The contribution says that, conditional on the model, the subject remained free of both causes through three years.

Worked Example: Predictor Effects in the Interval Exposure

For a hypothetical subject, consider a one-year interval with baseline hazards \(0.10\) per year for cause 1 and \(0.04\) per year for cause 2. Suppose the predictor is constant within this interval, with \(\eta_{i1}= \log(2)\) and \(\eta_{i2}=0\). The full hazards are therefore \(0.10\exp\{\log(2)\}=0.20\) and \(0.04\exp(0)=0.04\) per year.

If the subject is censored at the end of the year, cumulative hazard is \(0.20(1)+0.04(1)=0.24\), and the conditional likelihood contribution is \(\exp(-0.24)=0.7866\). If instead a cause 1 event is observed at the end of that interval, the event factor is \(0.20\) per year, giving $$ L_i^{T,D\mid b_i}=0.20\exp(-0.24)=0.1573\ \text{per year}. $$ The doubled predictor effect applies to cause 1’s hazard and its accumulated exposure, not to cause 2.

From Individual Contributions to the Conditional Likelihood

If subjects are conditionally independent given their random effects and modeled trajectories, the event-process likelihood conditional on all random effects is the product of the individual contributions:

$$ L^{T,D\mid \boldsymbol b}=\prod_{i=1}^{n}L_i^{T,D\mid b_i}. $$

The baseline parameters \(\lambda_{0rk}\), regression parameters within \(\eta_{ir}\), and any association parameters are estimated through this likelihood together with the appropriate longitudinal-model contribution. In a joint model, subjects’ random effects are not generally known. A marginal likelihood therefore requires integrating the conditional joint contribution over their random-effects distribution. That integration is a separate computational step; the interval decomposition here identifies the integrand’s event-process component.

Diagnostics, Alternatives, and Limitations

The likelihood is easy to misconstruct when follow-up crosses cut points. Check every subject’s exposure lengths: they must be nonnegative, sum to \(Y_i\), and allocate a partial interval correctly. For an event, verify that the event factor uses the observed cause and the interval containing the event time. For a censored observation, verify that there is no event factor. A useful arithmetic check is that the total cumulative hazard equals the sum of all cause-by-interval contributions.

Other warning signs include intervals with very few events for a cause, implausibly large estimated baseline hazards in sparsely populated intervals, and estimates that change markedly when cut points are shifted. These can indicate weak information or an overly fine partition. If a marker predictor varies sharply within an interval, using a constant-predictor exposure formula without justification can also distort the likelihood. The interval integral, rather than an assumed interval average, defines the exact contribution.

Baseline approachHow it represents baseline riskPractical trade-off
Piecewise-constant baselineOne baseline hazard parameter per cause and intervalFlexible and transparent exposure sums, but results can depend on cut points and sparse intervals can be unstable
Parametric baselineA specified smooth form, such as a Weibull hazardFewer baseline parameters, but conclusions depend more strongly on the chosen functional form
Semiparametric cause-specific hazardsBaseline hazard left unspecified and handled through a partial-likelihood approachAvoids a parametric baseline form, but does not provide this same fully specified conditional event-time likelihood without additional modeling choices

The piecewise model is not automatically more accurate because it is more flexible. Its cut points and interval widths determine how baseline risk can change, and a large number of parameters can be poorly estimated when events are limited. Conversely, intervals that are too broad may fail to represent important changes in baseline risk. The approach also does not remove the need to specify the predictor structure, account for the longitudinal-marker trajectory, or justify the conditional censoring assumption.

Common Mistake

Wrong reasoning: “A cause 2 event at time \(Y_i\) contributes the cause 2 hazard at \(Y_i\), so I should multiply only by cause 2’s survival probability.”

Correction: Before the cause 2 event, the subject must have avoided every event cause. The survival factor therefore uses the sum of cumulative hazards across all causes and all intervals up to \(Y_i\). Only the event factor is specific to the observed cause. Leaving out the other causes’ cumulative hazards overstates the likelihood of surviving event-free to that time.

Key takeaway: A piecewise-baseline competing-risks likelihood accumulates total-event hazard over every interval traversed. An observed event adds the hazard of its recorded cause at the event time; censoring adds no cause-specific event factor.

Check Your Understanding

Answer each question, then compare with the brief solutions below.

  1. A subject is censored after 1.5 years in the first interval. Which causes contribute to the survival exponent, and is there an event-hazard factor?
  2. There are two causes with constant hazards \(0.06\) and \(0.04\) per year in an interval. A subject experiences cause 1 after two years in that interval. Calculate the conditional likelihood contribution.
  3. A cause-specific predictor changes within an interval. Is baseline piecewise constancy alone enough to replace the exposure integral by baseline hazard times interval length times one exponential predictor value?
  4. Why does a cause 2 event likelihood include cause 1’s cumulative hazard?

Solutions. (1) Both causes contribute their cumulative hazards over the 1.5 years; censoring has no event-hazard factor. (2) Total cumulative hazard is \((0.06+0.04)(2)=0.20\). The event factor is \(0.06\), so the contribution is \(0.06\exp(-0.20)=0.04912\) per year. (3) No. If the predictor varies within the interval, its exponential must remain inside the time integral unless a stated approximation is used. (4) The subject must survive without any event cause until the cause 2 event time, so the survival exponent includes the cumulative hazards of all causes.

Clinical Biostats