Joint Models: One Likelihood for Two Processes

On this page
อ่านฉบับภาษาไทย (Thai version)
Abstract
In clinical follow-up studies a biomarker such as serum creatinine is measured repeatedly while patients are simultaneously at risk of an event such as death, and these two processes are rarely independent: the sickest patients deteriorate fastest and die soonest, so their longitudinal record stops precisely because of the outcome. This informative dropout biases any analysis of the trajectory alone, because a two-stage approach — fit a mixed model, then plug the estimated curve into a Cox hazard — locks the trajectory before the survival data can revise it. A joint model instead places the same fixed and random effects in both a longitudinal submodel and a survival submodel and estimates them from a single shared likelihood, so the timing of events feeds back into the estimated trajectory through the shared random effects, governed by an association parameter alpha whose value sets the strength of the coupling. This article explains, equation by equation, how one likelihood links two processes and why it beats analysing each alone.
Joint Models · Part 1 of 2. Next: Joint Model vs Stacking [[joint-model-vs-stacking]].
The question a joint model is built to answer
Imagine a cohort of patients with chronic kidney disease. At every clinic visit you record a serum creatinine, so each patient contributes a string of repeated measurements marching through time. You also record something else: the time to death. These two data streams are not independent. The patients whose creatinine climbs fastest are exactly the patients who die soonest — and the moment they die, their creatinine series simply stops. The sickest patients are the ones who fall out of the longitudinal record first, not at random, but because of the very thing that makes them sick.
This is informative dropout, and it quietly poisons any analysis that looks at the creatinine trajectory alone: if the worst patients disappear first, the surviving values drift toward the healthy and the average trend looks gentler than the biological truth. A joint model is built for precisely this situation — it models the repeated creatinine and the time to death together, so that an early death is allowed to inform what we believe the patient's true trajectory was. The whole idea compresses into a single phrase, one likelihood for two processes, which the rest of this article unpacks.
First, the two-stage way
Before we can appreciate what "joint" changes, it helps to see the honest, workable thing you would do without it: the two-stage approach, where you fit the creatinine trajectory first and then feed it into a survival model as if it were just another covariate.
Stage one is a linear mixed model for the observed creatinine $Y_{ij}$ of patient $i$ at visit $j$:
$$Y_{ij} = \beta_0 + \beta_1 t_{ij} + b_{0i} + b_{1i} t_{ij} + \epsilon_{ij}$$From it we read off each patient's estimated trajectory:
$$\hat m_i(t) = \hat\beta_0 + \hat\beta_1 t + \hat b_{0i} + \hat b_{1i} t$$Stage two then plugs that estimated curve into a Cox-type hazard, where the association parameter $\alpha$ says how strongly the creatinine level drives the risk of death:
$$h_i(t) = h_0(t)\,\exp\{\gamma X_i + \alpha\, \hat m_i(t)\}$$The order is strictly one-directional: creatinine model $\rightarrow \hat m_i(t) \rightarrow$ survival model. You genuinely do need the creatinine data first, and that is fine. The subtler problem is this: once stage one is finished and $\hat m_i(t)$ is locked, the survival outcome can never reach back and revise the trajectory. If a patient's early death is a loud signal that their true creatinine was climbing faster than their sparse measurements suggested, the two-stage model is deaf to it — the trajectory was frozen before the death was ever consulted.
What "joint" actually changes
The joint model keeps both submodels, but it refuses to freeze the first one. Instead of substituting an estimated curve, it writes the patient's true underlying trajectory
$$m_i(t) = \beta_0 + \beta_1 t + b_{0i} + b_{1i} t$$directly inside the hazard:
$$h_i(t) = h_0(t)\,\exp\left[\gamma X_i + \alpha\left(\beta_0 + \beta_1 t + b_{0i} + b_{1i} t\right)\right]$$Look carefully at what just happened. The very same parameters — the fixed effects $\beta_0, \beta_1$ and the patient-specific random effects $b_{0i}, b_{1i}$ — now appear in both submodels at once. The two models are no longer linked by a plug-in number; they are welded together by a shared latent trajectory $m_i(t)$, or equivalently by the shared random effects $b_{0i}, b_{1i}$. Because those parameters must satisfy the creatinine data and the survival data simultaneously, information can now flow in both directions. That single structural move — the same $\beta$ and $b$ living in two equations — is the whole difference between two-stage and joint.
The longitudinal submodel
Let us slow down and read each submodel on its own terms, starting with the longitudinal one:
$$Y_{ij} = \beta_0 + \beta_1 t_{ij} + b_{0i} + b_{1i} t_{ij} + \epsilon_{ij}$$Every symbol earns its place:
- $Y_{ij}$ is the creatinine of patient $i$ at measurement $j$ — the thing you actually wrote in the chart.
- $\beta_0$ is the population mean baseline and $\beta_1$ the population mean change per unit time. These are the fixed effects: the average story, shared by everyone.
- $b_{0i}$ is the patient's random intercept and $b_{1i}$ their random slope — how this particular patient departs from the average. $b_{0i}>0$ means they start higher than average; $b_{1i}>0$ means they rise faster than average, while $b_{1i} < 0$ means they rise more slowly, or are even falling.
- $\epsilon_{ij}$ is measurement error — assay noise, timing jitter, the ordinary imprecision of a single blood draw.
The quantity we actually care about is not any single noisy reading but the underlying trajectory
$$m_i(t) = \beta_0 + \beta_1 t + b_{0i} + b_{1i} t$$which is the model's best estimate of the patient's true creatinine curve after measurement error has been stripped away. The reframing is crucial: $m_i(t)$ is a smooth latent line, not a data point — and when the survival model reaches for "the creatinine" it reaches for this de-noised trajectory, never the raw last value.
The survival submodel
The second submodel is a hazard for the time to death:
$$h_i(t) = h_0(t)\,\exp\{\gamma X_i + \alpha\, m_i(t)\}$$- $h_0(t)$ is the baseline hazard — the background risk over time.
- $X_i$ are the fixed baseline predictors (age, comorbidity) and $\gamma$ their effects.
- $m_i(t)$ is the underlying creatinine level at time $t$, and $\alpha$ is the association parameter — the single number that couples worsening kidney function to the risk of dying.
The sign and size of $\alpha$ are read exactly like a log hazard ratio. $\alpha>0$ means higher or worsening creatinine travels with higher hazard; concretely, $\alpha=\log(1.5)$ means a 1 mg/dL rise in the underlying creatinine multiplies the hazard by about $1.5$ — a roughly 50% higher instantaneous rate (hazard) of death per 1 mg/dL rise in the underlying creatinine (given the units and structure of the model). $\alpha$ is where the clinical story about "failing kidneys kill people" finally gets a number.
One likelihood, not two stages
Now to the phrase that gives the article its title. In the two-stage world there are literally two separate optimisation problems, run in sequence:
$$\hat\beta,\hat b = \arg\max L_{\text{long}}$$ $$\hat\alpha,\hat\gamma=\arg\max L_{\text{surv}}(\hat\beta,\hat b)$$The longitudinal estimates are found first and locked; only then is the survival likelihood maximised, taking $\hat\beta,\hat b$ as fixed, immovable inputs. The survival data never gets a vote on the trajectory.
The joint model collapses those two problems into one likelihood that both data types must satisfy at the same time:
$$L_{\text{joint}} = \prod_i \int L_{\text{long},i}\, L_{\text{surv},i}\, f(b_i)\, db_i$$Written out with every ingredient visible:
$$L_{\text{joint}} = \prod_i \int p(Y_i\mid b_i,\beta,\sigma)\; p(T_i,\delta_i\mid b_i,\beta,\gamma,\alpha)\; p(b_i\mid D)\, db_i$$Here $Y_i$ is the whole set of creatinine measurements, $T_i$ the event or censoring time, $\delta_i$ the event indicator, $b_i$ the random effects, $\beta$ the trajectory parameters, $\sigma$ the measurement-error (residual) standard deviation, $\alpha$ the trajectory–event association, $\gamma$ the survival predictor effects, and $D$ the random-effects covariance. The integral over $b_i$ is what stitches the two likelihoods together: because $p(Y_i\mid b_i,\beta)$ and $p(T_i,\delta_i\mid b_i,\beta,\gamma,\alpha)$ share the same $b_i$ (and often the same $\beta$), maximising the joint likelihood forces every parameter to fit both kinds of data at once.
"Simultaneous" does not mean "computed in a single instant." The machinery is iterative — an EM or Newton-type loop that uses the creatinine data to update the trajectory, uses the death and censoring data to check whether that trajectory is consistent with who actually died, updates $b_i, \beta, \alpha, \gamma$, and repeats until the joint likelihood stops improving. It is not parallel but joint: the parameters that emerge are the ones that best explain both data streams together, not one and then the other.
How the event data feeds back into the trajectory
This feedback is easiest to feel with two hypothetical patients whose measured creatinine is identical — illustrative numbers only:
| Time | Patient A (mg/dL) | Patient B (mg/dL) |
|---|---|---|
| Month 0 | 1.2 | 1.2 |
| Month 1 | 1.5 | 1.5 |
| Month 2 | 1.8 | 1.8 |
On the recorded numbers, A and B are indistinguishable. But Patient A dies at month 3, while Patient B survives to month 12. A longitudinal-only analysis would estimate near-identical trajectories, because it only ever sees the three matching measurements. The joint model knows more: a worsening trajectory carries a higher hazard, so A's early death is extra evidence that A's true creatinine was probably climbing more steeply than those three points alone would suggest. The death does not manufacture new creatinine values; it tells the model which of the many trajectories compatible with those points is most consistent with all of the patient's data.
The mechanism is visible in one line of probability. With longitudinal data only, the patient's random effects are informed by the creatinine alone:
$$p(b_i\mid Y_i) \propto p(Y_i\mid b_i)\,p(b_i)$$In the joint model, the event data enters the same posterior:
$$p(b_i\mid Y_i,T_i,\delta_i) \propto p(Y_i\mid b_i)\,p(T_i,\delta_i\mid b_i)\,p(b_i)$$The random effects now depend on both $Y_i$ and $(T_i,\delta_i)$: the timing of the event directly reshapes the estimated trajectory. This is what makes a joint model genuinely more than "two models trained on the same dataset" — the event term $p(T_i,\delta_i\mid b_i)$ is doing real work inside the estimate of $b_i$.
Three ways to specify the link
"The trajectory drives the hazard" can be made precise in more than one way. The choice of association structure is a modelling decision, and the three standard options answer slightly different clinical questions.
Current value. Risk depends on where the trajectory is right now:
$$h_i(t)=h_0(t)\exp\{\gamma X_i + \alpha\, m_i(t)\}$$Current slope. Risk depends on the level and on how fast it is changing:
$$h_i(t)=h_0(t)\exp\{\gamma X_i + \alpha_1 m_i(t) + \alpha_2 m_i'(t)\}$$with $m_i'(t)=dm_i(t)/dt$. This is the structure that separates two patients who share the same current creatinine but whose curves point in different directions: the one whose level is rising fast is at higher risk than the one whose level is flat, even though at this instant they read exactly the same number.
Shared random effects. The join runs straight through the individual intercept and slope:
$$h_i(t)=h_0(t)\exp\{\gamma X_i + \alpha_0 b_{0i} + \alpha_1 b_{1i}\}$$Here the patient's latent characteristics — where they started and how steeply they are heading — feed the hazard directly, without passing through $m_i(t)$ as an intermediary.
Alpha is the strength of the join
All of this machinery hinges on a single parameter. Ask what happens when the survival model omits the trajectory entirely — drop $m_i(t)$ and $b_i$ from the hazard and you are left with
$$h_i(t)=h_0(t)\exp\{\gamma X_i\}$$and the joint likelihood simply factorises:
$$L_{\text{joint}} = L_{\text{long}}\times L_{\text{surv}}$$With no shared parameter, the two halves come apart into separate models — it is no longer a joint model at all. The same thing happens the moment you set $\alpha=0$: the creatinine trajectory stops relating to the hazard, and the two processes decouple. So $\alpha$ is not just another coefficient; it is the hinge on which the entire construction turns:
$$\boxed{\alpha \text{ is the parameter that measures the strength of the join.}}$$Why it matters
Return to where we started. A severely ill patient's creatinine rises fast and they die early; after death there are no more measurements, so the missingness is emphatically not random — because death is a terminal event, the trajectory does not merely go unobserved but ceases to exist, which is exactly why the event time is so informative about the latent path up to death. A longitudinal-only analysis loses the worst patients first and, deprived of their steepest readings, reports a trend that looks better than the truth. The joint model refuses that bias: it uses both the change in creatinine and the time of death, estimating the two processes from one likelihood, so early deaths become information about the trajectory instead of quietly vanishing from it.
The cleanest way to hold the contrast is a pair of arrow pictures. Two-stage is a pipeline, $Y \rightarrow \hat m_i(t) \rightarrow T$: fit the creatinine first, then push the estimate downstream. The joint model is a shared cause, $Y_i \leftarrow m_i(t) \rightarrow T_i$, or equivalently $\boxed{Y_i \leftarrow b_i \rightarrow T_i}$ — the same latent trajectory and random effects explain both the observed creatinine and the event time. A joint model never claims you can skip the creatinine; it claims you should not lock the creatinine model before the survival model, and should instead let both data sources jointly determine the trajectory, the random effects, and the association in a single estimation.
Key takeaways
- Informative dropout is the motivating problem: the sickest patients stop being measured because they die, so a longitudinal-only trend looks healthier than the truth.
- The two-stage approach fits the trajectory first and plugs $\hat m_i(t)$ into a Cox hazard; the survival outcome can never revise the locked trajectory.
- A joint model puts the same $\beta$ and $b_{0i}, b_{1i}$ in both submodels, linking them through the shared latent trajectory $m_i(t)$ / shared random effects.
- Estimation maximises one joint likelihood, $L_{\text{joint}} = \prod_i \int L_{\text{long},i}\, L_{\text{surv},i}\, f(b_i)\, db_i$, iteratively (EM / Newton) but jointly.
- Event data reshapes the random effects: $p(b_i\mid Y_i,T_i,\delta_i) \propto p(Y_i\mid b_i)\,p(T_i,\delta_i\mid b_i)\,p(b_i)$ — this is why it beats two models on the same data.
- The link can be current value, current slope, or shared random effects; $\alpha$ measures the strength of the join, and $\alpha=0$ makes the likelihood factorise into two separate models.