Tutorials › Joint Modeling of Longitudinal and Time-to-Event Data › Latent Classes as Unobserved Trajectory Subpopulations

Latent Class Joint Models · Tutorial 441 of 697

Latent Classes as Unobserved Trajectory Subpopulations

Learn to interpret a latent class joint model as discrete, unobserved trajectory-and-event subpopulations, and distinguish its classes from recorded groups and continuous random effects.

Advanced 10 min read

What You'll Learn

  • Define latent class membership and class-specific joint distributions for longitudinal and event outcomes.
  • Interpret mixture weights as population proportions rather than observed group labels.
  • Derive the marginal mean trajectory and survival curve from class-specific quantities.
  • Explain why a mixture hazard generally is not a fixed weighted average of class hazards.
  • Distinguish discrete latent classes from continuous subject-level random effects.
  • Recognize assumptions, diagnostics, and limitations of a finite-mixture representation.

Why Represent Trajectory Heterogeneity With Latent Classes?

A single longitudinal trajectory can summarize an average pattern while concealing important differences between people. For example, one subpopulation might show a gradual increase in a biomarker, while another shows a decline. If those patterns are also associated with different event-time distributions, modeling the longitudinal outcome and event outcome together may require representing more than one kind of subject.

A latent class joint model represents this heterogeneity with a finite set of unobserved subpopulations. Each subject belongs to one class, and that class determines a joint distribution for the subject’s longitudinal measurements and event outcome. The class is not directly recorded; it is a model-based description of recurring patterns in the data.

Definition: Let \(C_i\) be the latent class of subject \(i\), taking one of \(G\) values \(1,\ldots,G\). Let \(Y_i(t)\) denote the subject’s longitudinal outcome at time \(t\), and let \(T_i\) denote the event time. A latent class joint model specifies class probabilities \(\pi_g=P(C_i=g)\), where \(\pi_g\geq 0\) and \(\sum_{g=1}^G\pi_g=1\), together with a class-specific joint distribution of the longitudinal outcome and event time. The population distribution is the mixture of those class-specific joint distributions, weighted by \(\pi_g\).

The word joint matters: the model represents the longitudinal process and event outcome together within each class. This definition does not, by itself, require that the two outcomes be independent given class membership. Their relationship within a class is part of the class-specific joint distribution. A latent class model therefore makes a different claim from a model that simply fits separate trajectory and survival summaries and treats them as unrelated.

What a Class Means—and What It Does Not Mean

A class is a discrete, unobserved category in the statistical model. Its membership is not the same thing as a recorded grouping variable such as treatment assignment, clinic, or disease subtype. Those groups have observed labels. A latent class does not: the model describes how likely different trajectory-and-event patterns are in the population without asserting that each subject’s class is directly known.

Nor does a class mean that every subject in it has identical measurements or event times. Class-specific trajectories and event distributions describe patterns, not exact individual outcomes. Measurement variation and other subject-to-subject variation can remain within a class. In a model with only discrete classes, the classes are the model’s representation of heterogeneity; a model may also include continuous subject-level random effects, but those are a distinct modeling component.

A continuous random effect, such as a subject-specific intercept or slope, represents a graded deviation drawn from a distribution. A latent class instead assigns subjects to a finite number of categories with different distributions or patterns. For example, “higher and increasing” versus “lower and decreasing” can be represented as two discrete classes; a random slope represents continuous variation in the rate of change. Neither representation automatically implies the other, and a class should not be interpreted as a measured biological type merely because its fitted trajectory has a convenient label.

Worked Example: A Population Mean From Two Trajectory Classes

Suppose a hypothetical population has two latent trajectory classes. Class 1 has proportion \(\pi_1=0.60\) and mean trajectory \(m_1(t)=10+2t\). Class 2 has proportion \(\pi_2=0.40\) and mean trajectory \(m_2(t)=16-t\). The outcome is measured in units, and \(t\) is in years. Find the population mean trajectory at years 0, 1, and 2.

The marginal mean is the class-proportion-weighted mean:

$$ E\{Y_i(t)\}=\pi_1m_1(t)+\pi_2m_2(t). $$

At year 0, the class means are \(m_1(0)=10\) and \(m_2(0)=16\), so the population mean is \(0.60(10)+0.40(16)=6+6.4=12.4\) units.

At year 1, the class means are \(m_1(1)=12\) and \(m_2(1)=15\), giving \(0.60(12)+0.40(15)=7.2+6=13.2\) units.

At year 2, the class means are \(m_1(2)=14\) and \(m_2(2)=14\), giving \(0.60(14)+0.40(14)=8.4+5.6=14.0\) units. The population mean rises at each of these times, although the second class’s mean trajectory declines. The marginal average alone therefore does not describe every class’s pattern.

Mixtures for Event-Time Outcomes

The same mixture idea applies to event-time distributions. Write \(S_g(t)=P(T_i>t\mid C_i=g)\) for the survival probability in class \(g\), and \(S(t)=P(T_i>t)\) for the population survival probability. If class membership is fixed and the class proportions describe the target population, then survival at time \(t\) is the weighted average of class-specific survival probabilities.

$$ S(t)=\sum_{g=1}^{G}\pi_g S_g(t). $$

This is a population-level summary, not a class assignment for any particular subject. It also shows why class-specific event patterns matter: a mixture population can contain subjects with substantially different risks even when a single population survival curve can be calculated.

Worked Example: Marginal Survival in a Two-Class Mixture

Consider a hypothetical population with \(\pi_1=0.70\) and \(\pi_2=0.30\). Suppose the class-specific probabilities of surviving beyond one year are \(S_1(1)=0.90\) and \(S_2(1)=0.60\). At three years, they are \(S_1(3)=0.65\) and \(S_2(3)=0.20\). Calculate the population survival probabilities and event risks.

At one year, \(S(1)=0.70(0.90)+0.30(0.60)=0.63+0.18=0.81\). Thus the population probability of surviving beyond one year is 0.810, and the probability of experiencing the event by one year is \(1-0.81=0.19\), or 19.0%.

At three years, \(S(3)=0.70(0.65)+0.30(0.20)=0.455+0.060=0.515\). The population probability of surviving beyond three years is 0.515, so the probability of experiencing the event by three years is \(1-0.515=0.485\), or 48.5%.

These calculations use the same baseline class proportions at each time. They average class-specific survival probabilities; they do not average event times or assign each subject to the class with the larger survival probability.

Why the Mixture Hazard Changes Over Time

A further consequence is that the population hazard is generally not a fixed average of the class-specific hazards. Let \(\lambda_g(t)\) be the hazard in class \(g\), and suppose the class-specific survival functions are differentiable. The hazard is the instantaneous event rate among subjects still event-free at time \(t\). By the definition of a hazard, the population hazard is the negative derivative of population survival divided by population survival.

$$ \lambda(t) =-\frac{S'(t)}{S(t)} =\frac{\sum_{g=1}^{G}\pi_g S_g(t)\lambda_g(t)} {\sum_{g=1}^{G}\pi_g S_g(t)}. $$

The second equality follows because \(S_g'(t)=-S_g(t)\lambda_g(t)\), so differentiating \(S(t)=\sum_g\pi_gS_g(t)\) gives \(S'(t)=-\sum_g\pi_gS_g(t)\lambda_g(t)\). Dividing its negative by \(S(t)\) yields the displayed expression. The effective weights at time \(t\) are proportional to \(\pi_gS_g(t)\), not just to the baseline proportions \(\pi_g\). Classes with greater survival contribute more subjects to the event-free population at later times.

Worked Example: Comparing a Mixture Hazard With a Fixed Weighted Average

At a particular time \(t\), suppose two hypothetical classes have baseline proportions \(\pi_1=0.70\), \(\pi_2=0.30\); survival probabilities \(S_1(t)=0.90\), \(S_2(t)=0.50\); and hazards \(\lambda_1(t)=0.10\) and \(\lambda_2(t)=0.40\) per year. Calculate the population hazard.

The numerator of the mixture-hazard formula is \(0.70(0.90)(0.10)+0.30(0.50)(0.40)=0.063+0.060=0.123\). The denominator is \(0.70(0.90)+0.30(0.50)=0.63+0.15=0.78\). Therefore, \(\lambda(t)=0.123/0.78=0.1577\) per year.

The fixed baseline-weighted average of the two hazards would instead be \(0.70(0.10)+0.30(0.40)=0.19\) per year. That is not the mixture hazard here, because the classes contribute different proportions to the subjects still event-free at time \(t\). The calculated 0.1577 per year is the instantaneous rate for the remaining population at that time, not a probability of an event during a year.

Observed Groups and Latent Classes Are Different

An observed group can be used to describe or stratify a population, but it is not itself a latent class. The distinction remains important even if the observed groups have different mixtures of latent trajectory patterns. A difference in group averages might reflect different class composition, different class-specific trajectories, or both. Those possibilities are not interchangeable, and a mixture description alone does not establish a causal effect of group membership.

Worked Example: Recorded Groups With Different Class Compositions

Suppose two hypothetical recorded groups, A and B, contain the same two latent trajectory patterns as in the earlier example: their class means at year 0 are 10 and 16 units. Assume, for illustration, that Group A has class proportions 0.80 and 0.20, while Group B has proportions 0.30 and 0.70. Calculate each group’s mean at year 0.

For Group A, the weighted mean is \(0.80(10)+0.20(16)=8+3.2=11.2\) units. For Group B, it is \(0.30(10)+0.70(16)=3+11.2=14.2\) units. The difference in these illustrative means is \(14.2-11.2=3.0\) units.

A and B are observed group labels; the classes are unobserved trajectory patterns. This calculation shows how different class compositions alone can produce different group averages under the stated assumptions. It does not show that group membership caused the difference, nor does it determine how class membership should be modeled in an analysis.

Assumptions, Diagnostics, and Limitations

A finite latent class representation is useful only when its assumptions are defensible for the scientific question and data. In its basic form, it assumes that each subject belongs to one of \(G\) mutually exclusive and exhaustive classes, with class membership stable over the observation period. It also assumes that the chosen class-specific joint distributions provide a reasonable description of longitudinal and event outcomes within each class. The class proportions refer to the population being modeled; they need not describe a different population with a different composition.

Observed data may be censored or may have incomplete longitudinal measurements. The model’s assumptions about how those observations arise must be appropriate for the study design; the mixture definition does not make censoring or missingness ignorable. Likewise, representing outcomes jointly does not automatically guarantee that all sources of dependence have been captured.

Useful checks include comparing observed longitudinal patterns with the fitted class-specific trajectories, examining whether class-specific event patterns are compatible with the observed event experience, and checking whether important systematic patterns remain unexplained. Nearly identical class trajectories or event distributions may suggest that the proposed categories are not meaningfully distinct. A class supported by very little data can yield unstable summaries. These observations are warnings to investigate the specification and data support, not automatic tests that prove a class model is right or wrong.

A finite mixture is also an approximation: the population may have continuously varying trajectories rather than a small number of distinct subpopulations. Classes can sometimes make a continuous distribution look artificially discrete, and their interpretation can depend on how the model is specified. A single-population joint model with continuous random effects is an alternative way to represent heterogeneity. Recorded-group analyses answer a different question when group labels are observed. The choice among these approaches should reflect the scientific target and the patterns the model is meant to describe; the existence of fitted classes alone does not establish real, sharply separated subpopulations.

Common Mistakes

  • Treating a latent class as an observed group. A class is unobserved and inferred through a model; a treatment arm or clinic label is directly recorded. They may be related, but they are not the same variable.
  • Calling a class a continuous random effect. A finite class label describes discrete categories. A continuous random effect describes graded subject-level deviation. One cannot be substituted for the other without changing the model.
  • Assuming class membership makes outcomes independent. The joint distribution within a class need not factor into separate longitudinal and event distributions. Independence would be an additional assumption.
  • Averaging class hazards with baseline proportions at every time. The population hazard weights classes by their contributions to the event-free population at that time, as well as by their baseline proportions.
  • Interpreting a mixture as proof of biological types or causation. Classes are model-based summaries of heterogeneity. Their labels and fitted patterns do not by themselves establish biological categories or causal effects.
Key takeaway: A latent class joint model represents the population as a finite mixture of unobserved subpopulations, each with its own joint longitudinal-and-event distribution. Class membership is a discrete model component—not a recorded group and not a continuous random effect.

Check Your Understanding

Answer each question, then compare with the solutions below.

  1. A two-class model has \(\pi_1=0.25\) and \(\pi_2=0.75\). The class mean outcome at a given time is 8 units in Class 1 and 12 units in Class 2. What is the population mean?
  2. At one year, class-specific survival probabilities are 0.80 and 0.50, with class proportions 0.60 and 0.40. What is the population survival probability and event risk by one year?
  3. In one sentence, distinguish a recorded study group from a latent class.
  4. Why is the population hazard generally not the baseline-proportion-weighted average of class-specific hazards?

Solutions. 1. The population mean is \(0.25(8)+0.75(12)=2+9=11\) units. 2. Survival is \(0.60(0.80)+0.40(0.50)=0.48+0.20=0.68\); event risk by one year is \(1-0.68=0.32\), or 32.0%. 3. A recorded group has an observed label, whereas a latent class is an unobserved category in the model. 4. The class weights among subjects still event-free depend on class-specific survival, so they generally change over time.

Clinical Biostats