Tutorials › Multi-Omics Data Integration › Joint Models Of Recurrent Events And Terminal Events

Clinical Outcomes: Survival and Longitudinal Data · Tutorial 471 of 597

Joint Models Of Recurrent Events And Terminal Events

Build and interpret a shared-frailty model for recurrent events and a terminal event, including its conditional likelihood, marginal implications, assumptions, and diagnostics.

Advanced 12 min read

What You'll Learn

  • Specify recurrent-event intensity and terminal-event hazard using a shared frailty.
  • Interpret the frailty association parameter on the terminal-event hazard scale.
  • Construct a subject’s conditional likelihood from recurrent events, death, and exposure time.
  • Integrate over gamma frailty and distinguish conditional from marginal risks.
  • Diagnose assumptions and compare shared-frailty models with separate or event-history approaches.
  • Identify how terminal-event censoring and survivor selection affect interpretation.

Why Model Recurrent Events and Death Together?

A patient may experience repeated hospitalizations, infections, or disease exacerbations before death. Death is a terminal event: it ends the period in which further recurrent events can occur. If patients who tend to have many recurrent events also tend to die sooner, analyzing the recurrent-event process and death as unrelated outcomes can miss an important dependence and can misstate the population pattern of recurrence.

A shared-frailty model represents this dependence using a subject-specific latent factor. The factor raises or lowers a patient’s recurrent-event intensity and, through a possibly different power, the patient’s terminal-event hazard. It is a model for association, not proof that recurrent events cause death or that an unmeasured biological mechanism has been identified.

Model and Assumptions

Definition: For subject \(i\), let \(N_i(t)\) count recurrent events by time \(t\), let \(T_i\) be the terminal-event time, and let \(C_i\) be the censoring time. Let \(Y_i(t)=I\{t\leq T_i,\ t\leq C_i\}\) indicate that the subject is under observation and still at risk. A shared-frailty model specifies, conditional on frailty \(U_i\) and covariates, $$ \lambda_{Ri}(t\mid U_i)=Y_i(t)U_i\lambda_{R0}(t)\exp\{\beta^\mathsf{T}x_i(t)\}, \qquad \lambda_{Di}(t\mid U_i)=Y_i(t)U_i^\alpha\lambda_{D0}(t)\exp\{\gamma^\mathsf{T}z_i(t)\}. $$ Here \(\lambda_{Ri}(t\mid U_i)\) is the recurrent-event intensity, \(\lambda_{Di}(t\mid U_i)\) is the terminal-event hazard, and \(\lambda_{R0}(t)\) and \(\lambda_{D0}(t)\) are baseline functions. The covariates \(x_i(t)\) and \(z_i(t)\) must be observed and predictable at time \(t\). The parameter \(\alpha\) controls how the shared frailty enters the terminal-event hazard.

A common choice is \(U_i\sim\operatorname{Gamma}(1/\theta,\theta)\), using shape and scale parameters, independently across subjects, with \(\theta>0\). This parameterization gives \(E(U_i)=1\) and \(\operatorname{Var}(U_i)=\theta\). Conditional on \(U_i\) and the covariate histories, the recurrent and terminal processes are commonly assumed independent, with the intensities above. In this basic version, the recurrent process is conditionally Poisson: absent additional event-history terms, its increments are independent conditional on the frailty and covariates.

The model also assumes that recurrent events are recorded up to the terminal event or censoring, that death prevents subsequent recurrent events, and that censoring is independent of the event processes conditional on the modeled information. These assumptions are substantive. For example, if worsening health causes both missed follow-up and death, independent censoring may not be credible without additional modeling. As in other survival models, the baseline functions and covariate effects must be adequately specified for the intended analysis.

The baseline functions give rates for a subject with \(U_i=1\) and zero-valued covariates. Since \(E(U_i)=1\), the initial marginal recurrent intensity at fixed covariates equals its baseline-covariate value. The initial marginal terminal hazard equals its baseline-covariate value only when \(E(U_i^\alpha)=1\), which holds in particular for \(\alpha=1\). More generally, \(E(U_i^\alpha)\) need not equal one. At later times, conditioning on survival can also change the frailty distribution among those still at risk.

What the Association Parameter Means

For fixed covariates and \(U_i\), a one-unit increase in frailty multiplies the recurrent intensity according to \(U_i\), and the terminal hazard according to \(U_i^\alpha\). Comparing two frailty values \(u_1\) and \(u_2\), the recurrent-intensity ratio is \(u_2/u_1\), while the terminal-hazard ratio is \((u_2/u_1)^\alpha\). Thus, doubling frailty multiplies the terminal hazard by \(2^\alpha\), conditional on covariates and frailty.

When \(\alpha>0\), larger frailty raises both rates, so the model induces positive dependence between recurrence propensity and terminal-event risk. If \(\alpha=0\), frailty affects recurrence but not the terminal hazard; conditional on covariates, the frailty does not link the two processes. A negative \(\alpha\), if scientifically and mathematically allowed under the chosen frailty distribution, represents opposite directions of frailty association. With gamma frailty, negative powers require finite negative moments; for \(U_i\sim\operatorname{Gamma}(1/\theta,\theta)\), \(E(U_i^\alpha)\) is finite only if \(\alpha>-1/\theta\). In many applications \(\alpha\) is constrained to be nonnegative.

Worked Example: Interpreting Conditional Rates

Suppose a hypothetical patient has \(U_i=0.8\), and the covariate-adjusted recurrent baseline rate is \(0.50\) events per year. The covariate-adjusted terminal baseline hazard is \(0.25\) per year, and \(\alpha=2\). Calculate the patient’s conditional rates.

The recurrent intensity is \(0.8\times0.50=0.400\) events per year. The terminal hazard is \(0.8^2\times0.25=0.64\times0.25=0.160\) per year.

These are instantaneous rates conditional on this patient’s frailty and covariates, not probabilities of an event during a year. The terminal hazard is lower than its baseline-covariate value here because this patient’s frailty is below one and \(\alpha\) is positive.

Likelihood Contributions and Frailty Integration

Let \(t_{ij}\) denote the recurrent-event times observed for subject \(i\), let \(L_i=\min(T_i,C_i)\) be the end of observed follow-up, and let \(\delta_i=1\) if the terminal event is observed and \(0\) if the subject is censored. Conditional on \(U_i\), the recurrent-event likelihood is the product of the intensities at event times multiplied by the probability of no additional recurrent event over the observed exposure. The terminal-event contribution is its hazard at the observed death time, when death is observed, multiplied by the survival contribution through \(L_i\).

$$ L_i(U_i)= \left\{\prod_{j=1}^{N_i(L_i)}\lambda_{Ri}(t_{ij}\mid U_i)\right\} \exp\left\{-\int_0^{L_i}\lambda_{Ri}(t\mid U_i)\,dt\right\} \left\{\lambda_{Di}(L_i\mid U_i)^{\delta_i} \exp\left[-\int_0^{L_i}\lambda_{Di}(t\mid U_i)\,dt\right]\right\}. $$

This expression treats the recurrent and terminal processes as conditionally independent given frailty and covariates; they are linked in the observed-data likelihood by the shared \(U_i\). The marginal likelihood contribution is obtained by averaging over the frailty distribution:

$$ L_i=\int_0^\infty L_i(u)f_U(u)\,du. $$

With a gamma frailty, this integral is often available in closed form for simple baseline and covariate structures; otherwise it can be evaluated numerically. The resulting likelihood is a product over subjects, with each subject’s frailty integrated out. The frailty is not ordinarily replaced by its mean inside the likelihood: in general, \(E\{L_i(U_i)\}\ne L_i\{E(U_i)\}\).

Worked Likelihood Calculations

Worked Example: A Conditional Contribution With Two Events and Death

Consider hypothetical data with two recurrent events during two years of observed follow-up, followed by an observed terminal event at two years. For this subject, suppose the conditional recurrent-event rate is constant at \(0.60\) events per year and the terminal hazard is constant at \(0.300\) per year. These rates could arise, for example, from a specified frailty value and covariates. Calculate the conditional likelihood contribution.

For two recurrent events, the recurrent-event contribution is the product of two event-time intensities times the no-event factor over two years: \(0.60^2\exp(-0.60\times2)=0.36\exp(-1.20)\approx0.1084\), in units of events squared per year squared.

Because death is observed at the end of the same two years, its contribution is \(0.300\exp(-0.300\times2)=0.300\exp(-0.600)\approx0.1646\), in units of inverse years.

Multiplying the unrounded expressions gives \((0.60^2\exp(-1.20))(0.300\exp(-0.600))=0.108\exp(-1.8)\approx0.01785\) per year cubed. This is a likelihood contribution, not a probability by itself; its units reflect the three observed event-time factors.

Worked Example: How Recurrent Events Update Frailty

Suppose the hypothetical frailty distribution is gamma with mean one and variance \(\theta=0.5\). Thus its shape is \(1/\theta=2\) and scale is \(\theta=0.5\). A subject has three recurrent events over an exposure interval for which the integrated recurrent rate excluding frailty is \(A=2\). Under the conditional Poisson model, \(N\mid U\sim\operatorname{Poisson}(AU)\). Find the frailty distribution given these recurrent data, then assess the implied terminal-risk multiplier when \(\alpha=2\).

The likelihood for the observed count, as a function of \(U\), is proportional to \(U^3\exp(-2U)\). The prior density is proportional to \(U^{2-1}\exp(-U/0.5)=U\exp(-2U)\). Multiplying gives a posterior density proportional to \(U^4\exp(-4U)\), which is a gamma distribution with shape \(5\) and rate \(4\) (scale \(0.25\)). Its mean is \(5/4=1.25\), above the prior mean of one.

For a gamma distribution with shape \(a\) and rate \(b\), \(E(U^2)=a(a+1)/b^2\). Therefore, given these recurrent data, \(E(U^2\mid N=3)=5\times6/4^2=30/16=1.875\). Under \(\alpha=2\), the terminal hazard is proportional to \(U^2\); this calculation shows how the observed count shifts the expected frailty multiplier upward. It is not a complete posterior death-risk prediction: survival information and any terminal-event observation would also update frailty.

Worked Example: Marginal and Conditional Terminal Hazards

Take the same mean-one gamma frailty with variance \(\theta=0.5\). At the start of follow-up, suppose a hypothetical subject’s covariate-adjusted terminal baseline hazard is \(0.20\) per year. Calculate the initial marginal hazard for \(\alpha=1\) and \(\alpha=2\), before conditioning on any observed survival or recurrent history.

At time zero, the marginal hazard is the expectation of the conditional hazard: \(0.20E(U^\alpha)\). For \(\alpha=1\), \(E(U)=1\), so the initial marginal hazard is \(0.20\) per year. For \(\alpha=2\), a mean-one variable with variance \(0.5\) has \(E(U^2)=\operatorname{Var}(U)+[E(U)]^2=0.5+1=1.5\). The initial marginal hazard is therefore \(0.20\times1.5=0.300\) per year.

The frailty-one baseline hazard is \(0.20\) per year in both models. It matches the initial marginal hazard when \(\alpha=1\), but not when \(\alpha=2\). At later times the marginal hazard also reflects the changing frailty distribution among survivors.

Justification: Why the Marginal Hazard Changes

The marginal terminal hazard among subjects still at risk is an average of conditional hazards over the frailty distribution among those subjects. With fixed covariates and no recurrent-history conditioning, define \(H_{D0}(t)=\int_0^t\lambda_{D0}(s)\exp\{\gamma^\mathsf{T}z_i(s)\}\,ds\). Conditional survival to \(t\) is \(\exp\{-U^\alpha H_{D0}(t)\}\). Consequently, the frailty density among survivors is proportional to the original density times this survival probability, and the marginal hazard is

$$ \lambda_D^{\mathrm{marg}}(t) = \lambda_{D0}(t)\exp\{\gamma^\mathsf{T}z_i(t)\} \frac{E\left[U^\alpha\exp\{-U^\alpha H_{D0}(t)\}\right]} {E\left[\exp\{-U^\alpha H_{D0}(t)\}\right]}. $$

This follows by dividing the expected terminal-event density at time \(t\), conditional on survival to \(t\), by the marginal probability of survival to \(t\). At \(t=0\), both exponential terms equal one, giving the multiplier \(E(U^\alpha)\). As follow-up proceeds with \(\alpha>0\), higher-frailty subjects tend to experience death earlier, so the frailty distribution among survivors is generally shifted downward. This selection explains why a conditional proportional-hazards model need not produce a marginal hazard that is simply the baseline multiplied by a constant.

Diagnostics, Alternatives, and Limitations

A shared frailty is useful when the scientific aim is to represent unobserved subject-level propensity linking recurrence and death. It does not automatically fit every recurrent-event pattern. Examine event counts and timing, fitted recurrent and terminal risks, and whether the model captures differences between subjects as well as changes with event order or time. Check convergence, sensitivity to the frailty distribution and baseline specification, and uncertainty in \(\alpha\). In particular, weak recurrent-event information or few terminal events can leave the frailty variance and association parameter poorly estimated.

  • Conditional independence may be inadequate. After accounting for frailty and covariates, recurrent events and death may still be associated, for example because recent events change death risk. Residual event-history structure may be needed.
  • One shared factor can be too restrictive. It presumes a particular form of latent association, with recurrence depending on \(U_i\) and death on \(U_i^\alpha\). Multiple latent factors or a different dependence structure may be more appropriate.
  • Survival selects the observed risk set. Later risk comparisons concern survivors, whose frailty distribution can differ from the original population. Conditional and marginal hazard interpretations must not be interchanged.
  • Terminal events truncate recurrence. Patients who die earlier have less time to accumulate recurrent events. A raw comparison of event counts without accounting for exposure and terminal follow-up can therefore be misleading.
  • Censoring and covariate timing matter. Informative censoring or covariates measured after the time they are meant to predict can invalidate the stated likelihood or interpretation.

A separate recurrent-event model and terminal-event survival model may be simpler, but they do not encode shared latent dependence. A model using event-history covariates can represent effects of prior events on the subsequent terminal hazard, but that is a different dependence mechanism and need not capture residual subject-level heterogeneity. The shared-frailty approach is valuable when that latent association is the target, though it does not establish causation or identify which unmeasured factors created the dependence.

Common Mistakes

  • Assuming mean-one frailty makes every marginal baseline equal to its conditional baseline. It ensures \(E(U)=1\), not \(E(U^\alpha)=1\). For \(\alpha=2\) and \(\theta=0.5\), \(E(U^2)=1.5\), so the initial marginal terminal hazard is 1.5 times its baseline-covariate value.
  • Reading \(\alpha\) as a causal effect of recurrence on death. It describes how the shared latent frailty enters the terminal hazard. It does not say that an additional recurrent event causes death.
  • Using \(U_i=1\) rates as population-average rates without checking. They are conditional rates at frailty one. Marginal rates require averaging over the appropriate frailty distribution, including survivor selection when relevant.
  • Ignoring exposure time in the recurrent-event likelihood. The factor \(\exp\{-\int\lambda_{Ri}(t\mid U_i)dt\}\) accounts for intervals without events; multiplying event-time intensities alone is not the likelihood.
Key takeaway: The shared-frailty model links recurrent intensity and terminal hazard through a latent subject effect. Interpret its parameters conditionally, integrate over frailty for marginal statements, and account for selection among survivors.

Check Your Understanding

Answer each question, then compare with the solutions.

  1. With \(\alpha=1.5\), by what factor does the conditional terminal hazard change when frailty doubles?
  2. For mean-one frailty with variance \(0.4\), calculate \(E(U^2)\). If the baseline-covariate terminal hazard is \(0.10\) per year, what is the initial marginal hazard when \(\alpha=2\)?
  3. A patient has one recurrent event during one year, with constant conditional recurrent intensity \(0.4\) events per year, and is censored without observed death at one year. Write the conditional likelihood contribution, assuming the terminal hazard is constant at \(0.2\) per year.
  4. Why can the marginal terminal hazard change over time even when the conditional terminal hazard follows a proportional-hazards form?
  5. Name one important assumption that must hold for the stated likelihood’s treatment of censoring.

Solutions. (1) The factor is \(2^{1.5}=2\sqrt{2}\approx2.828\). (2) \(E(U^2)=\operatorname{Var}(U)+[E(U)]^2=0.4+1=1.4\), so the initial marginal hazard is \(0.10\times1.4=0.140\) per year. (3) The recurrent contribution is \(0.4\exp(-0.4\times1)\), and the censored terminal contribution is survival \(\exp(-0.2\times1)\); together they give \(0.4\exp(-0.6)\approx0.2195\) per year. (4) Survival changes the frailty distribution among those still at risk, so the marginal hazard averages conditional hazards over a changing distribution. (5) Censoring must be independent of the event processes conditional on the modeled information; otherwise the stated censoring treatment may be invalid.

Clinical Biostats