Tutorials › Multi-Omics Data Integration › Likelihood Construction For Joint Longitudinal-Survival Models

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

Likelihood Construction For Joint Longitudinal-Survival Models

Learn to form and evaluate a joint longitudinal-survival likelihood by conditioning on shared random effects and then integrating them out.

Advanced 12 min read

What You'll Learn

  • Specify the conditional longitudinal and event-time models that make up a joint likelihood.
  • Derive the observed-data likelihood by integrating over a subject’s latent random effects.
  • Incorporate right-censored and observed event times using the correct hazard and cumulative hazard terms.
  • Separate the longitudinal marginal contribution from a posterior expectation of the survival contribution.
  • Recognize assumptions, numerical integration issues, and the limits of plug-in random-effect calculations.

Why the Likelihood Must Integrate Over Shared Effects

A subject in a longitudinal-survival study may contribute several omics measurements and either an observed event time or a censoring time. A shared-random-effects model links these sources of information: the same latent subject-specific effects help describe the repeated measurements and the event hazard. The likelihood for that subject must therefore combine both sources conditional on the latent effects, then average over their distribution.

Multiplying a longitudinal likelihood by a survival likelihood evaluated at an estimated random effect is generally not the joint likelihood. It ignores uncertainty about that effect and can distort the contribution, especially when the measurements and event time both provide information about it.

Definition: Let \(Y_i=(Y_{i1},\ldots,Y_{in_i})\) denote subject \(i\)'s repeated measurements at times \(t_{ij}\), let \(T_i=\min(T_i^*,C_i)\) be the observed event or censoring time, and let \(\delta_i=I(T_i^*\leq C_i)\) indicate an observed event. If \(b_i\) is a latent random-effect vector with density \(f_b(b_i)\), the subject-level observed-data likelihood is the conditional joint density of \(Y_i,T_i,\delta_i\), integrated over \(b_i\).

Conditional Models and Their Contributions

Write the longitudinal trajectory as \(m_i(t;b_i)=x_i(t)^\mathsf{T}\beta+z_i(t)^\mathsf{T}b_i\), where \(x_i(t)\) and \(z_i(t)\) are known covariate vectors, \(\beta\) is a fixed-effect vector, and \(b_i\sim N(0,D)\). A common measurement model is

$$ Y_{ij}\mid b_i \sim N\!\left(m_i(t_{ij};b_i),\sigma^2\right), \qquad j=1,\ldots,n_i, $$

with conditionally independent measurement errors across visits. Thus the conditional longitudinal density is the product of the normal densities. Other measurement distributions can be used when appropriate; the likelihood construction is the same, with those densities substituted.

For illustration, take a proportional hazards model whose hazard depends on the current latent trajectory:

$$ h_i(t\mid b_i)=h_0(t)\exp\!\left\{w_i^\mathsf{T}\gamma+\alpha m_i(t;b_i)\right\}, \qquad H_i(t\mid b_i)=\int_0^t h_i(u\mid b_i)\,du . $$

Here \(h_0(t)\) is the baseline hazard, \(w_i\) is a vector of event-model covariates, and \(H_i(t\mid b_i)\) is the cumulative hazard. Conditional on \(b_i\), the event-time contribution for the observed time and event indicator is \(h_i(T_i\mid b_i)^{\delta_i}\exp\{-H_i(T_i\mid b_i)\}\). The hazard factor appears only for an observed event; the survival factor appears for both an event and a censoring time.

Assumptions for this factorization: Conditional on the measured covariates and \(b_i\), the longitudinal errors follow the specified measurement model and the event time follows the specified hazard model. The longitudinal and event processes are conditionally independent given those quantities. The observation and censoring processes must be ignorable for the likelihood being used; in particular, censoring is assumed independent of the event time conditional on the modeled information, with a censoring mechanism that can be omitted from the event-model likelihood. Measurements used here are observed at their recorded times and are modeled as conditionally independent given \(b_i\).

Deriving the Subject-Level Joint Likelihood

Conditioning on \(b_i\) makes the factorization possible: the repeated-measurement density multiplies the event-time contribution. Since \(b_i\) is unobserved, the observed-data contribution averages that conditional density over the random-effects distribution.

$$ L_i = \int \left[ \prod_{j=1}^{n_i} f_Y\!\left(Y_{ij}\mid b_i\right) \right] h_i(T_i\mid b_i)^{\delta_i} \exp\!\left\{-H_i(T_i\mid b_i)\right\} f_b(b_i)\,db_i . $$

This follows by the law of total probability: the joint density of observed data is the integral of its conditional density given \(b_i\), multiplied by the density of \(b_i\). The conditional-independence assumptions justify the product inside the integral. Crucially, the integration is over the product of the longitudinal and event contributions. In general, integrating each factor separately and multiplying the resulting marginal contributions would not give the same answer.

A useful equivalent form makes the role of the measurements explicit. Define \(L_{Yi}=\int [\prod_j f_Y(Y_{ij}\mid b_i)]f_b(b_i)\,db_i\), the marginal longitudinal density. The posterior density of \(b_i\) given the measurements is proportional to the longitudinal density times its prior density. Therefore

$$ L_i = L_{Yi}\, E\!\left[ h_i(T_i\mid b_i)^{\delta_i} \exp\!\left\{-H_i(T_i\mid b_i)\right\} \mid Y_i \right]. $$

The expectation is over the distribution of \(b_i\) given \(Y_i\), not over the prior distribution alone. This identity is also a practical way to organize numerical calculations: first account for the longitudinal data, then average the conditional event contribution using the measurement-informed distribution of the random effects.

Worked Example: Building the Conditional Integrand

Consider hypothetical subject \(i\) with two measurements, \(Y_{i1}=1.4\) at time 0 and \(Y_{i2}=1.8\) at time 1. Let \(m_i(t;b_i)=1+0.5t+b_i\), \(\sigma=0.2\), and evaluate the integrand at \(b_i=0.2\). Suppose the baseline hazard is \(h_0(t)=0.1\), there are no additional event covariates, and \(\alpha=0.3\). The subject has an observed event at \(T_i=2\), so \(\delta_i=1\).

At \(b_i=0.2\), the fitted means at the two measurement times are 1.2 and 1.7. The residuals are \(1.4-1.2=0.2\) and \(1.8-1.7=0.1\). The product of the two normal densities is

$$ \left[\frac{1}{\sqrt{2\pi}(0.2)}\right]^2 \exp\!\left\{-\frac{0.2^2+0.1^2}{2(0.2)^2}\right\} \approx 2.130 . $$

The trajectory is \(m_i(t;0.2)=1.2+0.5t\), so the hazard varies with time:

$$ h_i(t\mid 0.2) =0.1\exp\{0.3(1.2+0.5t)\} =0.1e^{0.36+0.15t}. $$

At the event time, \(m_i(2;0.2)=2.2\), giving \(h_i(2\mid0.2)=0.1e^{0.66}\approx0.1935\) per time unit. The cumulative hazard is not the endpoint hazard multiplied by 2. It must be integrated over the changing hazard:

$$ H_i(2\mid0.2) =0.1e^{0.36}\int_0^2 e^{0.15t}\,dt =0.1e^{0.36}\frac{e^{0.3}-1}{0.15} \approx0.3343 . $$

Because \(\delta_i=1\), the event contribution is \(0.1935e^{-0.3343}\approx0.1385\). Thus the longitudinal-times-event part of the integrand at \(b_i=0.2\) is approximately \(2.130(0.1385)=0.2950\), before multiplication by the random-effects density. This is one integrand value, not the integrated subject likelihood.

Numerical Integration and Censoring

Except in special cases, the integral over \(b_i\) has no closed form. Gaussian quadrature, adaptive quadrature, or Monte Carlo integration can approximate it. Whatever the numerical method, the target remains the same integral: each evaluation must include the conditional longitudinal density, the event contribution, and the random-effects density. The posterior-expectation form can be convenient when the longitudinal integral and its induced distribution for \(b_i\) are available.

Worked Example: A Censored Subject and Posterior Averaging

For a hypothetical subject with measurements \(Y_i\) and a censoring time \(T_i=2\), suppose numerical integration of the longitudinal model gives \(L_{Yi}=0.2821\) in the measurement-density units. Suppose a two-point, equal-weight quadrature approximation to the distribution of \(b_i\mid Y_i\) gives conditional survival factors \(e^{-H_i(2\mid b)}\) of 0.66656 and 0.90609 at its two support points. Since this subject is censored, \(\delta_i=0\), so there is no hazard-at-\(T_i\) factor.

The posterior average of the survival contribution is

$$ \frac{0.66656+0.90609}{2}=0.786325\approx0.7863. $$

The corresponding joint likelihood approximation is

$$ L_i\approx0.2821(0.786325)=0.2218. $$

The result combines the marginal longitudinal density with a survival probability averaged over random effects informed by the measurements. It is not the survival factor at a single estimated random effect.

Worked Example: Distinguishing an Event From Censoring

Use the time-varying hazard from the first example at \(b_i=0.2\) and \(T_i=2\). The calculations give \(h_i(2\mid0.2)\approx0.1935\) per time unit and \(H_i(2\mid0.2)\approx0.3343\). If the subject is censored at time 2, the conditional event-process contribution is

$$ h_i(2\mid0.2)^0e^{-H_i(2\mid0.2)} =e^{-0.3343}\approx0.7158. $$

If instead an event is observed at time 2, the contribution is

$$ h_i(2\mid0.2)^1e^{-H_i(2\mid0.2)} \approx0.1935(0.7158)=0.1385. $$

The event and censoring contributions share the cumulative survival term, but only the observed event contributes a hazard factor. In either case, a full subject likelihood also multiplies by the longitudinal density and integrates over \(b_i\).

Checking the Construction and Choosing a Calculation

Before fitting the model, check that each factor matches the data and assumptions. A useful construction sequence is:

1
Write the measurement density.
Include one conditional density for each observed assay value, with its actual measurement time and the shared random effect.
2
Write the event contribution.
Use \(h_i(T_i\mid b_i)^{\delta_i}\exp\{-H_i(T_i\mid b_i)\}\); compute the cumulative hazard by integrating the time-varying hazard.
3
Multiply conditionally, then integrate.
Multiply both data contributions by \(f_b(b_i)\), and integrate over the full random-effects vector.
4
Assess numerical accuracy and assumptions.
Check integration stability and consider whether censoring, measurement timing, or missingness requires an explicit model.

The main computational alternatives differ in how they evaluate the integral. Gaussian quadrature is often efficient for a low-dimensional random-effect vector, while Monte Carlo methods can be more flexible as its dimension grows but may require many draws for stable estimates. A plug-in calculation evaluates the event contribution at an estimated \(b_i\); it is simpler but does not integrate over uncertainty and is not generally equivalent to the marginal likelihood. A conditional likelihood that treats \(b_i\) as known likewise answers a different calculation unless the effects truly are observed.

Diagnostics include comparing likelihood estimates across quadrature orders or integration tolerances, checking convergence from different initial values, and inspecting whether the fitted model reproduces the observed measurement patterns and event-time distribution. A rapidly changing hazard requires careful cumulative-hazard integration; using a constant-hazard shortcut when the model specifies a time-varying hazard is an error. Sensitivity to the random-effects distribution or to the assumed measurement-error structure can also signal that the likelihood is not capturing the data adequately.

  • Common mistake: multiplying by the endpoint hazard for censored subjects. A censored subject has \(\delta_i=0\), so the event contribution is survival through the censoring time, not a hazard times survival.
  • Common mistake: replacing \(H_i(T_i\mid b_i)\) with \(T_i h_i(T_i\mid b_i)\). That is valid only for a constant hazard over the interval. In general, \(H_i\) is the integral of the hazard over all times up to \(T_i\).
  • Common mistake: integrating the two data sources separately and multiplying. Because both depend on the same latent \(b_i\), the correct operation integrates their product, or equivalently averages the event contribution under the measurement-informed distribution of \(b_i\).

The likelihood relies on the stated conditional-independence and censoring assumptions. If visit times or censoring are informative beyond the modeled quantities, or if measurements after an event are structurally unavailable in a way not addressed by the model, additional modeling may be needed. The likelihood construction alone does not establish that those assumptions are appropriate for a particular study.

Check Your Understanding

Answer each question, then compare with the solutions.

  1. For an observed event, which two event-time factors appear in the conditional contribution?
  2. A subject is right-censored at time \(c\). What is the event-process contribution conditional on \(b_i\)?
  3. Why can the measurement and event contributions not generally be integrated separately and then multiplied?
  4. When can \(H_i(T_i\mid b_i)=T_i h_i(T_i\mid b_i)\) be used?

Solutions. (1) The contribution is \(h_i(T_i\mid b_i)\exp\{-H_i(T_i\mid b_i)\}\): the hazard at the observed event time times survival to that time. (2) It is \(\exp\{-H_i(c\mid b_i)\}\), with no hazard factor because \(\delta_i=0\). (3) Both contributions depend on the same latent \(b_i\), so the integral of their product is generally not the product of their separate integrals. (4) The equality holds when the hazard is constant over the entire interval from 0 to \(T_i\); otherwise the cumulative hazard must be integrated over time.

Clinical Biostats