The equation highlighted below is the fundamental likelihood function for joint models. This document breaks it down piece by piece.

The Full Equation

\[ p(y_i, T_i, \delta_i) = \int p(y_i \mid b_i) \left\{ h(T_i \mid b_i)^{\delta_i} S(T_i \mid b_i) \right\} p(b_i)\,db_i \]

What This Equation Represents

This is the joint likelihood for a single patient \(i\).

It gives the probability of observing both:

  • the longitudinal measurements \(y_i\), and
  • the survival outcome \((T_i, \delta_i)\).

The key idea is that both processes depend on the same underlying random effects \(b_i\), which represent the patient’s true underlying health trajectory.

Breaking Down Each Component

Component 1: \(p(y_i \mid b_i)\)

This is the probability of observing the patient’s longitudinal measurements, given their random effects.

In words:

If we know the patient’s true underlying trajectory, represented by \(b_i\), how likely are we to observe the measurements that were actually recorded?

For normally distributed longitudinal data:

\[ p(y_i \mid b_i) = \prod_{j=1}^{n_i} \frac{1}{\sqrt{2\pi\sigma^2}} \exp \left\{ -\frac{ \left( y_{ij} - x_{ij}^{\top}\beta - z_{ij}^{\top}b_i \right)^2 }{ 2\sigma^2 } \right\} \]

This is the likelihood contribution from the linear mixed-effects model. It describes how well the model, including the patient’s random effects, fits the observed longitudinal measurements such as CD4 counts or bilirubin levels.

Component 2: \(h(T_i \mid b_i)^{\delta_i}S(T_i \mid b_i)\)

This is the survival likelihood contribution.

It represents the probability of observing the patient’s survival outcome.

Part 2a: \(h(T_i \mid b_i)^{\delta_i}\)

If the patient experienced the event, so that \(\delta_i = 1\),

\[ h(T_i \mid b_i)^{1} = h(T_i \mid b_i) \]

and the likelihood includes the hazard at the event time.

If the patient was censored, so that \(\delta_i = 0\),

\[ h(T_i \mid b_i)^{0} = 1 \]

and there is no hazard contribution because the event was not observed.

A common form of the hazard function is

\[ h(T_i \mid b_i) = h_0(T_i) \exp \left\{ \gamma^{\top}w_i + \alpha m_i(T_i) \right\} \]

where

\[ m_i(T_i) = x_i^{\top}(T_i)\beta + z_i^{\top}(T_i)b_i. \]

The hazard at time \(T_i\) depends on:

  • the baseline hazard \(h_0(T_i)\),
  • the patient’s baseline covariates \(w_i\), such as treatment or sex, and
  • the patient’s current underlying marker level \(m_i(T_i)\).

Crucially, \(m_i(T_i)\) depends on \(b_i\), which links the survival process to the longitudinal process.

Part 2b: \(S(T_i \mid b_i)\)

This is the survival probability: the probability that the patient survives up to time \(T_i\).

\[ S(T_i \mid b_i) = \exp \left\{ - \int_0^{T_i} h(s \mid b_i)\,ds \right\} \]

Substituting the hazard model gives

\[ S(T_i \mid b_i) = \exp \left\{ - \int_0^{T_i} h_0(s) \exp \left[ \gamma^{\top}w_i + \alpha m_i(s) \right] \,ds \right\}. \]

This survival probability accounts for:

  • all hazards the patient faced from time \(0\) to time \(T_i\), and
  • the patient’s evolving marker level \(m_i(s)\) over time.

Again, \(m_i(s)\) depends on \(b_i\), so the survival process remains linked to the longitudinal process.

Component 3: \(p(b_i)\)

This is the probability distribution of the random effects.

For multivariate normally distributed random effects,

\[ p(b_i) = (2\pi)^{-k/2} |D|^{-1/2} \exp \left\{ -\frac{1}{2} b_i^{\top} D^{-1} b_i \right\}, \]

where \(k\) is the number of random effects, for example \(k=2\) for a random intercept and a random slope.

This distribution describes:

  • how much patients vary in their baseline marker levels,
  • how much patients vary in their rates of change over time, and
  • how the random intercept and random slope are correlated.

Component 4: The Integral

\[ \int \cdots db_i \]

The random effects \(b_i\) are unobserved latent variables. We do not know each patient’s exact random effects.

Therefore, the model integrates over all possible values of \(b_i\).

Conceptually, we:

  1. consider a possible value of the patient’s random effects;
  2. calculate how likely the observed longitudinal data would be;
  3. calculate how likely the observed survival outcome would be;
  4. weight this by how likely that value of the random effects is in the population; and
  5. average over all possible values of \(b_i\).

The Full Joint Likelihood: Complete Form

Putting everything together,

\[ \begin{aligned} p(y_i, T_i, \delta_i) = \int &\left[ \prod_{j=1}^{n_i} \frac{1}{\sqrt{2\pi\sigma^2}} \exp \left\{ -\frac{ \left( y_{ij} - x_{ij}^{\top}\beta - z_{ij}^{\top}b_i \right)^2 }{ 2\sigma^2 } \right\} \right] \\[6pt] &\times \left[ h_0(T_i) \exp \left\{ \gamma^{\top}w_i + \alpha \left( x_i^{\top}(T_i)\beta + z_i^{\top}(T_i)b_i \right) \right\} \right]^{\delta_i} \\[6pt] &\times \exp \left\{ - \int_0^{T_i} h_0(s) \exp \left[ \gamma^{\top}w_i + \alpha \left( x_i^{\top}(s)\beta + z_i^{\top}(s)b_i \right) \right] \,ds \right\} \\[6pt] &\times (2\pi)^{-k/2} |D|^{-1/2} \exp \left\{ -\frac{1}{2} b_i^{\top} D^{-1} b_i \right\} \,db_i. \end{aligned} \]

Visual Interpretation

Component What it represents Role in the model
\(b_i\) True underlying health trajectory Latent variable linking the longitudinal and survival processes
\(p(y_i \mid b_i)\) Longitudinal likelihood Measures how well the patient’s trajectory fits the observed longitudinal data
\(h(T_i \mid b_i)^{\delta_i}S(T_i \mid b_i)\) Survival likelihood Measures how likely the observed survival outcome is, given the patient’s trajectory
\(p(b_i)\) Random-effects distribution Describes how likely a particular trajectory is in the population
\(\int \cdots db_i\) Integration over random effects Averages over all possible latent trajectories

A Concrete Example: The AIDS Data

For the AIDS data, consider the following joint model.

Longitudinal Model

\[ y_i(t) = \beta_0 + \beta_1 t + \beta_2(t \times ddI_i) + b_{i0} + b_{i1}t + \varepsilon_i(t). \]

Survival Model

\[ h_i(t) = h_0(t) \exp \left\{ \gamma \times ddI_i + \alpha \left[ \beta_0 + \beta_1 t + \beta_2(t \times ddI_i) + b_{i0} + b_{i1}t \right] \right\}. \]

Random Effects

\[ b_i = \begin{pmatrix} b_{i0} \\ b_{i1} \end{pmatrix} \sim N(0,D). \]

Full Likelihood

\[ p(y_i, T_i, \delta_i) = \int p(y_i \mid b_{i0}, b_{i1}) \left\{ h(T_i \mid b_{i0}, b_{i1})^{\delta_i} S(T_i \mid b_{i0}, b_{i1}) \right\} p(b_{i0}, b_{i1}) \,db_{i0}\,db_{i1}. \]

Why This Matters

Key Insight 2: The Integral Handles Uncertainty

We do not know the true \(b_i\) for each patient.

By integrating over all possible values of \(b_i\), the joint model:

  • properly accounts for uncertainty in the latent trajectory,
  • avoids treating noisy longitudinal measurements as error-free, and
  • can reduce bias in estimating the association between the longitudinal marker and survival.

Key Insight 3: Conditional Independence

Given \(b_i\), the longitudinal and survival processes are assumed to be conditionally independent:

\[ p(y_i, T_i, \delta_i \mid b_i) = p(y_i \mid b_i) \times p(T_i, \delta_i \mid b_i). \]

This is why the joint likelihood factorizes in this way.

All dependence between the longitudinal and survival processes is captured through the shared random effects \(b_i\).

Connection to the Time-Dependent Cox Model

A time-dependent Cox model effectively works with a factorization such as

\[ p(y_i, T_i, \delta_i) \approx p(T_i, \delta_i \mid y_i) \times p(y_i). \]

It conditions directly on the observed longitudinal values \(y_i\), often treating them as if they were known without measurement error.

This can ignore:

  • measurement error in \(y_i\), and
  • the fact that both the observed longitudinal measurements and survival outcome depend on the same underlying latent health trajectory.

The joint model instead uses

\[ p(y_i, T_i, \delta_i) = \int p(y_i \mid b_i) \times p(T_i, \delta_i \mid b_i) \times p(b_i) \,db_i. \]

This allows the model to account explicitly for measurement error and the shared latent structure.

Summary

Concept Explanation
\(p(y_i \mid b_i)\) Likelihood of the observed longitudinal data
\(h(T_i \mid b_i)^{\delta_i}\) Hazard contribution at the event time, if the event occurred
\(S(T_i \mid b_i)\) Probability of surviving up to the observed time
\(p(b_i)\) Distribution of random effects in the population
\(\int \cdots db_i\) Averages over all possible values of the random effects
Key insight Shared random effects link the longitudinal and survival processes and explain their dependence

The Standard Joint Model Structure

1. The Longitudinal Sub-model

\[y_i(t) = m_i(t) + \varepsilon_i(t)\]

where:

\[m_i(t) = x_i^\top(t)\beta + z_i^\top(t)b_i\]

and:

\[\varepsilon_i(t) \sim N(0, \sigma^2).\]

2. The Survival Sub-model

\[h_i(t \mid \mathcal{M}_i(t)) = h_0(t) \exp\{\gamma^\top w_i + \alpha m_i(t)\}\]

where \(\mathcal{M}_i(t) = \{m_i(s), 0 \le s < t\}\) is the marker history.

Key Features

  • Measurement Error Correction: Uses true marker value \(m_i(t)\)
  • Full Conditional Independence: Given \(b_i\), processes are independent
  • Dynamic Predictions: Predicts future marker values and survival

A Concrete Example: The AIDS Data

Longitudinal Model

\[y_i(t) = \beta_0 + \beta_1 t + \beta_2 (t \times ddI_i) + b_{i0} + b_{i1} t + \varepsilon_i(t).\]

Survival Model

\[h_i(t) = h_0(t) \exp\{\gamma \times ddI_i + \alpha[\beta_0 + \beta_1 t + \beta_2 (t \times ddI_i) + b_{i0} + b_{i1} t]\}.\]

Random Effects

\[b_i = \begin{pmatrix} b_{i0} \\ b_{i1} \end{pmatrix} \sim N(0, D).\]

Full Likelihood

\[p(y_i, T_i, \delta_i) = \int p(y_i \mid b_{i0}, b_{i1}) \{h(T_i \mid b_{i0}, b_{i1})^{\delta_i} S(T_i \mid b_{i0}, b_{i1})\} p(b_{i0}, b_{i1}) \, db_{i0} \, db_{i1}.\]

Parameter Interpretation

Longitudinal Parameters

Parameter Meaning Example (AIDS Data)
\(\beta_0\) Baseline marker value Baseline CD4 count
\(\beta_1\) Rate of change over time CD4 decline per month
\(\sigma^2\) Measurement error variance Variability in CD4 measurements

Survival Parameters

Parameter Meaning Example (AIDS Data)
\(\gamma\) Treatment effect on survival ddI effect on death hazard
\(\alpha\) Association parameter CD4 effect on death hazard
\(h_0(t)\) Baseline hazard Underlying death risk

Random Effects Parameters

Parameter Meaning Example (AIDS Data)
\(D_{11}\) Variance of random intercept Variation in baseline CD4
\(D_{22}\) Variance of random slope Variation in CD4 decline
\(D_{12}\) Covariance between intercept and slope Correlation between baseline and decline

Understanding the Components

What is \(\gamma^\top w_i\) in the Survival Model?

In the survival sub-model:

\[h_i(t \mid \mathcal{M}_i(t)) = h_0(t) \exp\{\gamma^\top w_i + \alpha m_i(t)\}\]

\(\gamma^\top w_i\) represents the linear combination of baseline covariates (fixed effects) that affect the hazard function:

  • \(w_i\) = a vector of baseline covariates for individual \(i\) (time-fixed predictors measured at baseline)
  • \(\gamma\) = a vector of regression coefficients for those covariates
  • \(\gamma^\top w_i\) = the dot product (sum of each covariate multiplied by its coefficient)

Example from the AIDS Data:

\[h_i(t) = h_0(t) \exp\{\gamma \times ddI_i + \alpha[\text{CD4 trajectory}]\}\]

Here: - \(w_i\) = \(ddI_i\) (treatment indicator: whether patient received ddI or placebo) - \(\gamma\) = the treatment effect on survival hazard

What it represents:

Component Interpretation
\(w_i\) Baseline characteristics that don’t change over time (e.g., treatment group, gender, age at baseline)
\(\gamma\) How much each baseline characteristic shifts the log-hazard
\(\exp(\gamma^\top w_i)\) The multiplicative effect of these covariates on the hazard

Note on notation: - \(\gamma^\top w_i\) (with a gamma) = survival model fixed effects - \(\beta^\top x_i(t)\) (with a beta) = longitudinal model fixed effects

What is \(m_i(t)\) in the AIDS Example?

\(m_i(t)\) represents the true underlying CD4 trajectory for patient \(i\) at time \(t\).

Distinction between observed and true values:

Component Role Example
\(y_i(t)\) Observed CD4 The CD4 value you see in the medical record (e.g., 450 cells/mm³)
\(m_i(t)\) True CD4 The patient’s actual CD4 level (unobserved, e.g., 455 cells/mm³)
\(\varepsilon_i(t)\) Measurement error The difference between observed and true (e.g., -5 cells/mm³ due to lab variability)

Why we use \(m_i(t)\) in the survival model:

  • We use the true CD4 trajectory \(m_i(t)\), NOT the observed \(y_i(t)\)
  • This corrects for measurement error bias
  • If we used \(y_i(t)\) instead, we’d get attenuated (biased toward zero) estimates of \(\alpha\)

Interpretation of \(\alpha\) in the AIDS context:

  • \(\alpha\) = the effect of true CD4 count on the hazard of death
  • Negative \(\alpha\): Higher true CD4 \(\rightarrow\) Lower death hazard
  • Positive \(\alpha\): Higher true CD4 \(\rightarrow\) Higher death hazard (unlikely for CD4)

So in the AIDS example, \(m_i(t)\) is the latent (true) CD4 trajectory that drives both the observed CD4 measurements AND the survival process!

Why This Matters

Key Insight 2: The Integral Handles Uncertainty

By integrating over \(b_i\), the model:

  • Accounts for uncertainty in the latent trajectory
  • Avoids treating noisy measurements as error-free
  • Reduces bias in estimating associations

Key Insight 3: Conditional Independence

Given \(b_i\):

\[p(y_i, T_i, \delta_i \mid b_i) = p(y_i \mid b_i) \times p(T_i, \delta_i \mid b_i)\]

All dependence is captured through the shared random effects.

Connection to the Time-Dependent Cox Model

The time-dependent Cox model conditions on observed \(y_i\):

\[p(y_i, T_i, \delta_i) \approx p(T_i, \delta_i \mid y_i) \times p(y_i)\]

This ignores measurement error and the shared latent structure.

The joint model correctly handles this:

\[p(y_i, T_i, \delta_i) = \int p(y_i \mid b_i) \times p(T_i, \delta_i \mid b_i) \times p(b_i) \, db_i.\]

Common Extensions

  • More Complex Longitudinal: Non-linear trajectories, multiple biomarkers
  • More Complex Survival: Competing risks, recurrent events
  • Flexible Associations: Time-varying \(\alpha(t)\), association with slope or AUC