Why Compare Event Associations Across Classes?
A latent class joint model can describe groups with different longitudinal trajectories and different event risks. A further question is whether the longitudinal marker relates to the event hazard in the same way in every class. For example, a one-unit increase in a marker level might correspond to a stronger hazard increase in one class than in another. Testing this difference is not the same as testing whether the classes have different overall risks: baseline hazards and other class-specific features can differ even when the marker association is shared.
The comparison is meaningful only after specifying what is held fixed. The shared-association and class-specific-association models should use the same number of classes, the same membership model, the same longitudinal model, the same covariates, and the same baseline-hazard structure. They differ only in whether the coefficient linking the longitudinal feature to the event hazard is constrained to be common across classes.
Model and Hypotheses
The hazard ratio for a one-unit increase in a scalar \(m_{ik}(t;b_i)\), holding the other terms fixed within class \(k\), is \(\exp(\alpha_k)\). Thus \(\alpha_k\) describes an association on the log-hazard scale, not a causal effect. When the feature has units, \(\alpha_k\) has reciprocal units; for example, if the feature is measured in milligrams per liter, its coefficient is per milligram per liter.
For a scalar association and \(K\) classes, the hypotheses are
For a \(q\)-dimensional association vector, the null equates every component across classes: \(\alpha_1=\cdots=\alpha_K\). This is a joint test; it does not identify which class or feature accounts for a difference.
Conditional on class and random effects, the event contribution is \(h_{ik}(T_i\mid b_i)^{\delta_i}S_{ik}(T_i\mid b_i)\), where \(S_{ik}\) is the corresponding event-free survival function. A typical subject's observed-data likelihood contribution has the form
The integral is omitted if there are no random effects. The likelihood sums over class membership rather than treating an estimated or most likely class assignment as known. This expression presumes the model's conditional factorization of longitudinal and event outcomes given class and random effects, and an appropriate noninformative censoring assumption conditional on the modeled information. In particular, censoring must not carry additional information about the event time after conditioning on that information.
Likelihood-Ratio Comparison and Its Justification
Fit both models by maximum likelihood. Let \(\ell_0\) be the maximized log likelihood under the shared-association null and \(\ell_1\) the maximized log likelihood under the class-specific alternative. Because the null imposes equality constraints, it is nested in the alternative, and the likelihood under the alternative cannot be smaller when both fits are optimized over the same remaining model structure.
The degrees of freedom follow by counting parameters. The alternative has \(K\) scalar association coefficients, while the null has one common coefficient, so the difference in dimension is \(K-1\). With \(q\) features, the alternative has \(Kq\) coefficients and the null has \(q\), giving \(Kq-q=q(K-1)\). Wilks' chi-square result uses this dimension difference when the model is locally identifiable, the true parameter is interior to its parameter space, the likelihood is sufficiently smooth, and the information matrix is nonsingular. It also requires the other nuisance parameters to be estimated within a comparable, correctly specified model under both hypotheses.
The label switching inherent in mixture models creates equivalent likelihood maxima under permutations of class labels. It does not, by itself, invalidate the likelihood-ratio statistic: relabeling leaves the likelihood and the equality restriction unchanged. But one must fit the models reliably, using consistent labeling conventions or multiple starts, so that a local maximum is not mistaken for the maximum likelihood.
Worked Example: Two Classes With a Scalar Association
Suppose a hypothetical two-class model uses a marker measured in units of 10 units. After checking multiple starting values, the shared-association fit has \(\ell_0=-412.6\), and the class-specific fit has \(\ell_1=-409.9\). Assume both fits converge, the estimated class proportions are safely above zero, the class-specific model is locally identifiable, and no other parameter is on a boundary.
The test statistic is $$ D=2\{\ell_1-\ell_0\}=2\{-409.9-(-412.6)\}=2(2.7)=5.40. $$
Here \(K=2\) and the association is scalar, so \(df=K-1=1\). The chi-square upper-tail probability is \(P(\chi^2_1\ge 5.40)\approx 0.0201\). At \(\alpha=0.05\), reject \(H_0\): the data provide evidence that the marker-hazard association differs between the two classes, subject to the model assumptions. This test does not establish which class has the stronger association; that requires examining the estimates and their uncertainty. The coefficient units are per 10 units of the marker.
When Mixture Boundaries Complicate the Test
A crucial distinction is that equality of unrestricted association coefficients is not, on its own, a boundary constraint. If every class has positive probability, the classes are distinguishable, and the association coefficients can vary freely over the real line, the null value of a common coefficient is ordinarily an interior value. In that regular setting, the fact that the model is a mixture does not automatically prevent the usual chi-square likelihood-ratio approximation.
Mixture likelihoods can nevertheless fail the regularity conditions. A class probability may be zero or approach zero. If a class has zero probability, its class-specific association parameter cannot be learned from the observed data: changing that parameter does not change the likelihood. Parameters can also become unidentified when classes effectively merge, or the information for separating classes can become nearly singular. In such cases, the null or alternative may include nuisance parameters that are unidentified under a relevant boundary configuration. The likelihood-ratio statistic need not then have the usual chi-square distribution with the parameter-count degrees of freedom.
The association coefficient itself may also be constrained in some applications, for example to be nonnegative. If the null places a parameter at the edge of that constraint, standard interior-point calibration is not justified. The reference distribution depends on the precise constraints and identification structure; it should not be replaced by a guessed chi-square distribution.
Worked Example: Three Classes and Two Association Features
Consider a hypothetical three-class model with two association features, current marker level and marker slope. The shared model has one coefficient for each feature; the alternative allows separate coefficients for both features in each class. Suppose the optimized log likelihoods are \(\ell_0=-701.8\) and \(\ell_1=-699.9\). Assume that all class probabilities are interior, class parameters are identifiable, and the other regularity conditions hold.
The likelihood-ratio statistic is $$ D=2\{-699.9-(-701.8)\}=2(1.9)=3.80. $$
There are \(q(K-1)=2(3-1)=4\) constraints, so the reference distribution is \(\chi^2_4\). Its upper-tail probability is $$ P(\chi^2_4\ge 3.80)=e^{-3.80/2}\left(1+\frac{3.80}{2}\right) =e^{-1.9}(2.9)\approx 0.434. $$
At the 0.05 significance level, do not reject the shared-association null. This is not evidence that the associations are exactly equal; it means this joint test does not find a statistically significant departure from equality. The four-degree-of-freedom test also does not separately test either feature or pinpoint a class contrast.
Diagnostics and an Alternative Calibration
Before interpreting a test, check that it is comparing the intended models and that the numerical fits are credible. The following checks are especially important in a latent class likelihood:
- Verify that the models differ only in the association constraints. Changing the baseline hazards or other structures at the same time makes the comparison answer a different question.
- Use multiple starting values and compare attained log likelihoods. Mixture likelihoods can have local maxima; a lower alternative-model maximum can indicate failed optimization rather than evidence for the null.
- Inspect estimated class probabilities and parameter estimates for near-boundary values, huge standard errors, or unstable changes across starts. These can indicate weak identification or a class that contributes little information.
- Confirm that the association feature has adequate variation within classes and that the chosen hazard and longitudinal specifications are plausible. A significant test does not repair model misspecification.
- Check censoring and conditional-independence assumptions. If they fail, the likelihood comparison may not target the intended association.
When boundary or identification concerns make the chi-square reference questionable, a parametric bootstrap can approximate the null distribution for the fitted design. Fit the shared model, simulate data under it while preserving the sample structure and the assumed censoring mechanism, refit both models to each simulated data set, and calculate the same likelihood-ratio statistic each time. The refitting step matters: it reproduces the estimation and optimization behavior that contributes to the statistic.
Worked Example: Bootstrap Calibration Near a Boundary
In a hypothetical analysis, one estimated class probability under the shared model is \(0.015\), raising concern that the regular approximation may be unreliable. The observed likelihood-ratio statistic is \(D=4.60\). Under the fitted shared model, the analyst generates \(999\) data sets and refits both models using the same multiple-start procedure. In \(19\) simulations, the resulting statistic is at least \(4.60\).
Using the usual plus-one estimate, the bootstrap tail probability is $$ \hat p_{\mathrm{boot}}=\frac{19+1}{999+1}=\frac{20}{1000}=0.0200. $$
This calibrated result is evidence against the shared-association model at the 0.05 level, conditional on the fitted null model and simulation scheme. It is not a universal solution to nonregularity: a bootstrap based on a poorly specified null, or one that fails to reproduce the boundary behavior, can also miscalibrate the test. Report how the simulations and refits were performed, and treat the result as approximate.
How This Test Differs From Other Comparisons
| Approach | Question answered | Main consideration |
|---|---|---|
| Likelihood-ratio test | Does allowing class-specific associations improve fit enough to reject equality? | Needs reliable nested-model fits and suitable reference calibration. |
| Wald test of coefficient contrasts | Are estimated association contrasts large relative to their estimated uncertainty? | Can be unstable when mixture parameters are weakly identified or estimates have large uncertainty. |
| Information criteria | Which fitted model offers a preferred fit-complexity tradeoff? | They are model-selection summaries, not tests of the equality null and do not provide a null-hypothesis p-value. |
A Wald test may be convenient when the covariance matrix of the class-specific estimates is trustworthy, but it is not a remedy for boundary problems. Information criteria can help compare candidate models, but their output should not be phrased as a significance test. Conversely, a likelihood-ratio rejection does not show that class-specific associations are scientifically important; examine coefficient estimates, uncertainty, and scale in context.
Common Pitfall and Scope
The test concerns equality of the specified marker-event association parameters within a chosen latent class model. It does not test whether the number of classes is correct, whether the classes have distinct trajectories, or whether the longitudinal feature is measured without error. Nor does a class-specific association imply a causal mechanism. Conclusions remain conditional on the class structure, event model, longitudinal specification, censoring assumptions, and quality of the likelihood optimization.
Check Your Understanding
Answer each question, then compare with the solutions.
- For four classes and a scalar association coefficient, how many equality constraints are tested?
- A three-class model has two association features. What is the usual likelihood-ratio degrees of freedom under regularity conditions?
- Why does an estimated class probability near zero raise concern about ordinary chi-square calibration?
- In a bootstrap test with \(B=499\) simulated statistics and \(b=14\) at least as large as the observed statistic, calculate the plus-one tail estimate.
Solutions. (1) There are \(K-1=4-1=3\) constraints. (2) There are \(q(K-1)=2(3-1)=4\) constraints, hence \(df=4\) if regularity holds. (3) A class with zero probability contributes no observations to identify its association parameter; boundary and nonidentification can invalidate the ordinary chi-square approximation. (4) The estimate is \((b+1)/(B+1)=(14+1)/(499+1)=15/500=0.0300\).