Tutorials › Joint Modeling of Longitudinal and Time-to-Event Data › A Biomarker Progression Case Study With Latent Classes

Latent Class Joint Models · Tutorial 469 of 697

A Biomarker Progression Case Study With Latent Classes

Learn to interpret a complete hypothetical latent class joint model, from its class-specific biomarker and event profiles to population prevalence and uncertain participant assignments.

Advanced 11 min read

What You'll Learn

  • Specify a two-class joint model for repeated biomarker measurements and event times.
  • Interpret class-specific biomarker trajectories and event hazards in context.
  • Calculate posterior class probabilities and distinguish them from hard assignments.
  • Estimate class prevalence using posterior membership probabilities.
  • Combine class-specific survival estimates to obtain marginal survival.
  • Identify assumptions and diagnostics relevant to interpreting fitted profiles.

A Case Study: Biomarker Progression and an Event

Suppose a hypothetical cohort follows 240 adults for up to five years. At enrollment and approximately once each year, researchers measure a blood biomarker; they also record time to a clinical event or censoring. Some participants have fewer measurements because the event occurs or follow-up ends. The scientific aim is to describe how biomarker progression and event risk vary across latent profiles, not to claim that an unobserved class is a naturally occurring patient type.

A latent class joint model is useful here because it represents the longitudinal measurements and event outcome together. A participant's class is not directly observed. Instead, the model estimates a probability of belonging to each class, using the participant's available biomarker history and event information. The case below uses two classes to make the interpretation concrete.

Model Specification and Assumptions

Let \(C_i\in\{1,2\}\) denote participant \(i\)'s latent class, with class probabilities \(P(C_i=k)=\pi_k\), where \(\pi_1+\pi_2=1\). Let \(Y_{ij}\) be the biomarker measurement for participant \(i\) at time \(t_{ij}\), measured in years since enrollment. One possible class-specific linear trajectory model is

$$ Y_{ij}=\beta_{0k}+\beta_{1k}t_{ij}+b_{0i}+b_{1i}t_{ij}+\epsilon_{ij},\qquad C_i=k. $$

Here \(\beta_{0k}\) is the class-specific mean biomarker level at enrollment and \(\beta_{1k}\) is the class-specific mean change per year. The participant-specific random intercept and slope satisfy \((b_{0i},b_{1i})^\mathsf{T}\mid C_i=k\sim N_2(0,D_k)\); the measurement errors satisfy \(\epsilon_{ij}\mid C_i=k\sim N(0,\sigma_k^2)\). This example allows within-participant correlation through the random effects.

Let \(T_i\) be the observed event or censoring time and \(\delta_i=1\) if the event is observed, with \(\delta_i=0\) for censoring. For illustration, the class-specific event hazard is

$$ \lambda_i(t\mid C_i=k)=\lambda_0(t)\exp(\alpha_k),\qquad \alpha_1=0. $$

The reference class is class 1, so \(\exp(\alpha_2)\) is the class 2 versus class 1 hazard ratio. The baseline hazard \(\lambda_0(t)\) may, for example, be Weibull. In this specification, the association between the biomarker process and event risk is represented by their shared latent class; the hazard does not additionally depend on an individual's random effects.

Model assumptions: Participants are independent; class probabilities and the class-specific outcome models are correctly specified; and, conditional on class, the longitudinal and event outcomes are independent under this particular model. Censoring must be noninformative conditional on the modeled information. The Gaussian longitudinal specification, including its random-effects distribution, must be adequate. These are substantive assumptions to assess, not consequences of fitting the model.

A useful expression for one participant's contribution to the observed-data likelihood is

$$ L_i=\sum_{k=1}^2 \pi_k f_k(\mathbf{Y}_i\mid\mathbf{t}_i) \{\lambda_k(T_i)\}^{\delta_i}S_k(T_i), $$

where \(f_k\) is the class-specific longitudinal density, with the random effects integrated out, and \(S_k(t)\) is class-specific event-free survival. The event contribution is a density when \(\delta_i=1\) and a survival probability when \(\delta_i=0\). The sum over classes is essential: class membership is unobserved, so the likelihood averages over possible classes rather than treating a guessed assignment as known.

Reading the Fitted Trajectory and Risk Profiles

Assume the hypothetical fit estimates \(\hat\pi_1=0.65\) and \(\hat\pi_2=0.35\). The estimated mean trajectories, in biomarker units, are

$$ \widehat{\mu}_1(t)=8.0+0.40t,\qquad \widehat{\mu}_2(t)=8.2+1.20t. $$

These are fitted class-specific population mean trajectories, not predictions for every individual in a class. Class 1 has an estimated mean increase of 0.40 biomarker units per year; class 2 has an estimated increase of 1.20 units per year. The fitted means at five years are \(8.0+0.40(5)=10.0\) and \(8.2+1.20(5)=14.2\) units, respectively. The fitted class 2 trajectory therefore rises more steeply over this period.

Suppose the estimated class 2 versus class 1 hazard ratio is 2.10, with a 95% confidence interval of 1.35 to 3.27. Under the specified proportional-hazards model, this compares the instantaneous event hazards at the same time among participants in the two latent classes. It does not mean that class 2 participants are 2.10 times as likely to experience the event by five years, and it does not establish that faster biomarker increase causes higher event risk.

Worked Example: Calculating Class-Specific Trajectory Values

Use the fitted mean trajectories above to compare the class-specific biomarker means at enrollment, two years, and five years. The time unit is years and the response unit is the biomarker's measurement unit.

At enrollment, \(t=0\):

$$ \widehat{\mu}_1(0)=8.0+0.40(0)=8.0,\qquad \widehat{\mu}_2(0)=8.2+1.20(0)=8.2. $$

At two years:

$$ \widehat{\mu}_1(2)=8.0+0.40(2)=8.8,\qquad \widehat{\mu}_2(2)=8.2+1.20(2)=10.6. $$

At five years:

$$ \widehat{\mu}_1(5)=8.0+0.40(5)=10.0,\qquad \widehat{\mu}_2(5)=8.2+1.20(5)=14.2. $$

The class 2 minus class 1 fitted mean difference is 0.2 units at enrollment, \(10.6-8.8=1.8\) units at two years, and \(14.2-10.0=4.2\) units at five years. This widening difference follows from the slope contrast of \(1.20-0.40=0.80\) units per year. It describes model-implied class means; it is not an individual-level treatment effect.

Posterior Assignment and Prevalence

For an individual with observed biomarker history and event information, the posterior probability of class \(k\) is the class-specific likelihood contribution multiplied by the class prevalence, divided by the sum over classes. This follows directly from Bayes' rule:

$$ \tau_{ik}=P(C_i=k\mid\mathbf{Y}_i,\mathbf{t}_i,T_i,\delta_i) =\frac{\pi_k f_k(\mathbf{Y}_i\mid\mathbf{t}_i) \{\lambda_k(T_i)\}^{\delta_i}S_k(T_i)} {\sum_{\ell=1}^2\pi_\ell f_\ell(\mathbf{Y}_i\mid\mathbf{t}_i) \{\lambda_\ell(T_i)\}^{\delta_i}S_\ell(T_i)}. $$

The posterior probabilities sum to one for each participant. A hard assignment chooses the class with the largest posterior probability, but this discards uncertainty. For estimating class prevalence, a soft estimate averages the posterior membership probabilities across participants:

$$ \hat\pi_k^{\,\mathrm{soft}}=\frac{1}{n}\sum_{i=1}^{n}\tau_{ik}. $$

This formula is justified because the conditional expectation of the unobserved indicator \(I(C_i=k)\), given the observed data, is \(\tau_{ik}\). Summing those expected indicators and dividing by \(n\) gives the average expected class membership. In model fitting, the prevalence estimates are obtained jointly with the other parameters; the formula also explains why posterior-weighted counts are informative.

Worked Example: Comparing Hard and Posterior-Weighted Assignments

For four hypothetical participants, suppose the fitted posterior probabilities of class 2 are 0.10, 0.70, 0.85, and 0.40. The corresponding class 1 probabilities are 0.90, 0.30, 0.15, and 0.60.

With hard assignment, participants 2 and 3 go to class 2 because their class 2 probabilities exceed 0.50. The hard-assignment proportion is therefore \(2/4=0.50\).

The posterior-weighted class 2 proportion is

$$ \frac{0.10+0.70+0.85+0.40}{4} =\frac{2.05}{4}=0.5125. $$

Thus the soft estimate for these four participants is 0.5125, while the hard-assignment estimate is 0.50. More importantly, the posterior probabilities show that the assignment for participant 2 (0.70) is less decisive than that for participant 3 (0.85). Neither probability should be described as certainty about a true, directly observed class.

Worked Example: Interpreting Prevalence and Marginal Survival

Suppose the fitted class 1 prevalence is 0.65 with model-based standard error 0.031. A Wald 95% confidence interval is

$$ 0.65\pm1.96(0.031) =0.65\pm0.06076 =(0.5892,\ 0.7108). $$

In repeated samples under the model and its assumptions, intervals constructed this way would cover the class 1 prevalence about 95% of the time. This is an interval for a model-based population mixture proportion, not for the class of any specific participant.

For a survival calculation, suppose the fitted class 1 cumulative baseline hazard by five years is \(\Lambda_0(5)=0.25\), and the class 2 hazard ratio is 2.10. The class-specific survivals are

$$ \hat S_1(5)=\exp(-0.25)=0.7788,\qquad \hat S_2(5)=\exp\{-2.10(0.25)\}=\exp(-0.525)=0.5916. $$

The marginal survival is the prevalence-weighted sum:

$$ \hat S_{\mathrm{marg}}(5) =0.65(0.7788)+0.35(0.5916) =0.50622+0.20706 =0.71328. $$

The fitted marginal event probability by five years is \(1-0.71328=0.28672\), or about 28.7%. This calculation uses the fitted class proportions and survival curves. It is not obtained by averaging the hazards and then treating that average as a single class-specific hazard.

Checks, Alternatives, and Limitations

A case-study interpretation is credible only if the fitted profiles are supported by the data and the model. Check that estimated trajectories match the observed measurement patterns within posterior-weighted classes, that event predictions are compatible with observed event experience, and that class proportions are not driven by a small number of uncertain assignments. Examine posterior probabilities across the cohort rather than reporting only the most likely class. Convergence across suitable starting values and the stability of substantive conclusions are also relevant, particularly in mixture models.

The main alternatives answer somewhat different questions. A single-class joint model describes a common population pattern while allowing individual variation, but may not represent distinct trajectory-risk profiles. Separate longitudinal and survival analyses avoid a shared latent structure, but do not use class membership to connect the two outcomes. Assigning each participant to one class first and then analyzing events treats uncertain assignments as known; that generally understates classification uncertainty. A latent class joint model can represent heterogeneity compactly, but its conclusions depend on the chosen number of classes, trajectory form, survival model, and conditional-independence structure.

Latent classes are model-based summaries of heterogeneity. They need not correspond to biological subgroups, and class-specific associations are not causal effects. The class 2 hazard ratio here describes a model-based contrast, while the shared class structure captures association between biomarker patterns and event risk under the stated assumptions. If important within-class links between the biomarker and event process remain, a model in which survival also depends on individual random effects may be more appropriate; that is a different specification, not something established by this example.

Common pitfall: “The largest posterior probability assigns each person to a known class, so the fraction assigned to class 2 is the class 2 prevalence.” The correction is that the class is latent and assignment can be uncertain. Report posterior probabilities or posterior-weighted prevalence, and label any hard-assignment summary as such.

Check Your Understanding

Answer each question, then compare with the solutions below.

  1. Under the fitted trajectory equations, what is the class 2 minus class 1 mean difference at three years?
  2. A participant has posterior class probabilities 0.45 for class 1 and 0.55 for class 2. What does a hard assignment say, and what uncertainty remains?
  3. If class 1 and class 2 prevalences are 0.65 and 0.35, and their five-year survivals are 0.80 and 0.60, calculate marginal five-year survival.
  4. Why does a class 2 versus class 1 hazard ratio of 2.10 not mean that class 2 participants are 2.10 times as likely to experience the event by five years?

Solutions. (1) The difference is \((8.2+1.20(3))-(8.0+0.40(3))=11.8-9.2=2.6\) biomarker units. (2) Hard assignment selects class 2 because 0.55 is larger, but the assignment is weakly supported: the posterior probability of class 1 is still 0.45. (3) Marginal survival is \(0.65(0.80)+0.35(0.60)=0.52+0.21=0.73\), or 73%. (4) The hazard ratio compares instantaneous hazards under the model, not cumulative event probabilities. Cumulative risk depends on survival over time, including the baseline hazard and the way hazards accumulate.

Clinical Biostats