Tutorials › Joint Modeling of Longitudinal and Time-to-Event Data › Worked Example With a Reversing Association Sign

Sensitivity to the Association Structure · Tutorial 242 of 697

Worked Example With a Reversing Association Sign

Learn to trace a sign reversal across association links to the trajectory features and interpret each coefficient on its own scale.

Advanced 12 min read

What You'll Learn

  • Distinguish the current biomarker value from its rate of change as association features.
  • Trace how high stable and high declining trajectories can support opposite coefficient signs.
  • Calculate hazard ratios and confidence intervals from hypothetical fitted coefficients.
  • Separate crude trajectory-group contrasts from joint-model estimates.
  • Diagnose sign reversals caused by trajectory specification, scale, or sparse data.
  • Explain why opposite signs across links do not by themselves establish a contradiction or causal effect.

Why a Sign Reversal Needs Interpretation

A biomarker can carry different information through its level and its trajectory. A high value at a given time may be associated with greater event hazard, while a rapidly declining value may also mark elevated hazard. If alternative models use only one of these features at a time, their estimated association coefficients can have opposite signs without either sign being an arithmetic error.

The point of this constructed example is not to declare one association link correct. It is to identify which observed trajectory features can produce the reversal, check how the coefficients translate into hazard contrasts, and distinguish a descriptive sensitivity finding from evidence about a causal mechanism.

Definition: Let \(m_i(t)\) denote subject \(i\)'s underlying biomarker trajectory at time \(t\), measured in mg/L, and let \(m_i'(t)\) denote its instantaneous rate of change, measured in mg/L per year. A current-value association link places \(m_i(t)\) in the log hazard; a slope association link places \(m_i'(t)\) there. In the models below, \(\alpha_v\) and \(\alpha_s\) are the corresponding association coefficients.

For clarity, consider two separate shared-random-effects joint models. They use the same longitudinal trajectory specification and the same baseline covariates \(w_i\), but use different association features:

$$ h_i(t\mid b_i)=h_0(t)\exp\{\gamma^\mathsf{T}w_i+\alpha_v m_i(t)\}, \qquad h_i(t\mid b_i)=h_0(t)\exp\{\gamma^\mathsf{T}w_i+\alpha_s m_i'(t)\}. $$

Here \(h_i(t\mid b_i)\) is the subject-specific hazard conditional on the random effects \(b_i\), \(h_0(t)\) is the baseline hazard, and \(\gamma\) is the covariate coefficient vector. These are alternative models, not one model containing both features. A positive \(\alpha_v\) means higher current biomarker values correspond to higher hazard, conditional on the specified model. A negative \(\alpha_s\) means more positive slopes correspond to lower hazard; equivalently, more negative slopes correspond to higher hazard.

The interpretation assumes the biomarker scale and time unit are fixed, the longitudinal trajectory is adequately specified, and the event and censoring information are handled under the joint-model assumptions. In particular, the shared-random-effects structure must represent the dependence between repeated measurements and event time well enough for the fitted association to be meaningful. These assumptions do not make the association causal.

A Constructed Pattern Behind the Reversal

Imagine three trajectory groups in a hypothetical cohort. Within a short interval, their current values and slopes are approximately stable, and each group contributes 60 person-years at risk. The following event counts are invented to make the contrasting features visible; they are not results from a real study or fitted joint model.

Trajectory groupCurrent value at the landmark (mg/L)Slope (mg/L per year)Person-yearsEventsCrude rate (events per person-year)
Low, stable306030.050
High, stable806090.150
High, declining8-160150.250

Worked Example: Reading the Two Contrasts

First compare the two stable groups. Their crude rate ratio is \(0.150/0.050=3.00\). The current value differs by \(8-3=5\) mg/L, so the log rate ratio per mg/L in this two-group contrast is

$$ \frac{\log(3.00)}{5} =\frac{1.0986}{5} =0.2197\text{ per mg/L}. $$

This contrast points in a positive direction for a current-value association: the stable group with the higher biomarker value has the higher crude event rate.

Now compare the high, stable group with the high, declining group. Their current values match, but their slopes differ by \(0-(-1)=1\) mg/L per year. For the change from slope \(-1\) to slope \(0\), the crude rate ratio is \(0.150/0.250=0.600\). Its log rate ratio per one-unit increase in slope is

$$ \frac{\log(0.600)}{1} =-0.5108\text{ per (mg/L per year)}. $$

This contrast points in a negative direction for a slope association: the more rapidly declining group has the higher crude rate, despite having the same current value at the landmark. These crude contrasts explain how positive level information and negative slope information can coexist. They are not estimates from the joint models, because they do not adjust for the full time-varying risk sets, longitudinal measurement error, or other model components.

Hypothetical Joint-Model Fits

Suppose that, in a separate hypothetical analysis of constructed longitudinal and event-time data, the two alternative joint models produce the estimates below. The estimates are stipulated as illustrative model output; they are not calculated from the three-group table. Both models use biomarker measurements in mg/L and time in years.

Worked Example: Interpreting Opposite Fitted Signs

Assume the current-value model gives \(\hat{\alpha}_v=0.28\) per mg/L with \(SE=0.11\) per mg/L. Its Wald statistic is \(z=0.28/0.11=2.545\), giving a two-sided \(p\)-value of approximately \(0.0109\). A 95% Wald interval is

$$ 0.28\pm1.96(0.11) =0.28\pm0.2156 =(0.0644,\ 0.4956)\text{ per mg/L}. $$

For a one mg/L higher current value, the estimated hazard ratio is \(\exp(0.28)=1.323\). The interval on the hazard-ratio scale is \((\exp(0.0644),\exp(0.4956))\), or approximately \((1.067,1.641)\). Under this fitted model, the interval corresponds to hazard ratios above 1 for a one mg/L increase in current value. It is a confidence interval for the model parameter, not a statement that there is a 95% probability the fixed parameter lies in this particular interval.

Now assume the slope model gives \(\hat{\alpha}_s=-0.62\) per (mg/L per year), with \(SE=0.25\) per (mg/L per year). Then \(z=-0.62/0.25=-2.480\), with a two-sided \(p\)-value of approximately \(0.0131\). Its 95% Wald interval is

$$ -0.62\pm1.96(0.25) =-0.62\pm0.490 =(-1.110,\ -0.130)\text{ per (mg/L per year)}. $$

For a one mg/L per year increase in slope, the estimated hazard ratio is \(\exp(-0.62)=0.538\). The corresponding interval is approximately \((\exp(-1.110),\exp(-0.130))=(0.330,0.878)\). Thus a one-unit more positive slope is associated with a lower hazard under this model. Conversely, a one mg/L per year more negative slope has an estimated hazard ratio of \(\exp(0.62)=1.859\). The two coefficients have opposite signs, but they refer to different features and different units; their numerical magnitudes should not be compared as if they were on a common scale.

The fitted signs accord with the constructed pattern: among stable groups, higher current values coincide with higher rates; among groups with the same high current value, the declining trajectory coincides with a higher rate. That is a substantive explanation for the reversal, not proof that the data-generating process truly contains both effects. The separate model fits can also be sensitive to measurement error, trajectory assumptions, visit timing, and the distribution of subjects still at risk.

Why Omitting a Trajectory Feature Can Change a Sign

A short approximation makes the role of correlated trajectory features clear. Suppose, for explanation, that the true log hazard contains both features:

$$ \log h_i(t)=\log h_0(t)+\alpha_v m_i(t)+\alpha_s m_i'(t). $$

If a model includes only \(m_i(t)\), the slope contribution is omitted. In a simple local linear projection with the same risk-set weighting, the coefficient for current value would be approximately

$$ \alpha_v^{\ast} \approx \alpha_v+\alpha_s \frac{\operatorname{Cov}(m_i(t),m_i'(t))} {\operatorname{Var}(m_i(t))}. $$

To see why, project the omitted slope onto the included current value: its projection coefficient is \(\operatorname{Cov}(m,m')/\operatorname{Var}(m)\). Multiplying this by the omitted slope effect \(\alpha_s\) gives the approximate contribution added to the current-value coefficient. If current values and slopes are negatively correlated and the slope effect is negative, that added contribution is positive. Conversely, omitting the current value from a slope-only model can shift its slope coefficient according to the risk-set-weighted relationship between slope and value.

This projection argument is a justification for a possible direction of sensitivity, not an exact identity for a fitted joint-model likelihood. In survival data, risk sets change over time, the hazard model is nonlinear, and the longitudinal predictors are estimated rather than observed without error. The actual sign and magnitude must be assessed from the fitted models and the trajectory data.

Worked Example: Comparing Subjects at the Same Current Value

Consider two hypothetical linear trajectories, measured in mg/L, \(m_A(t)=10-t\) and \(m_B(t)=6+t\), with \(t\) in years. At \(t=2\), both have current value \(8\) mg/L, while their slopes are \(-1\) and \(+1\) mg/L per year.

Under the current-value model, the conditional log hazard contrast for A versus B at \(t=2\) is \(0.28(8-8)=0\), so the hazard ratio is \(\exp(0)=1\). Under the slope model, the log hazard contrast is

$$ -0.62\{(-1)-(+1)\} =(-0.62)(-2) =1.24, \qquad HR=\exp(1.24)\approx3.456. $$

Thus the slope model assigns A an estimated hazard about 3.456 times B's at that time, conditional on the model, even though their current values are equal. The calculation isolates the feature responsible for the contrast: their slopes, not their levels. It does not establish that subject A truly has that hazard in a real population.

Diagnostics, Alternatives, and Limits

A sign reversal deserves investigation rather than automatic rejection of either model. First, inspect fitted trajectories over the times when events occur. Check whether high stable and high declining paths are both represented, and whether the sign is driven by a few unusual trajectories or by sparse visits near event times. Second, verify the biomarker and time units, the direction in which the biomarker is coded, and the time origin. A positive rescaling of the biomarker changes coefficient magnitude but not sign; reversing the biomarker scale changes the sign convention. A change of time units rescales a slope coefficient, so report its units explicitly.

Third, examine uncertainty and model stability, not only the signs. Wide intervals, large changes under reasonable trajectory specifications, or a handful of influential subjects can make the reversal weak evidence about the association structure. Compare predicted trajectories and fitted hazards over clinically relevant times. A poor longitudinal fit, implausible random-effects covariance, or systematic residual patterns can make apparent link sensitivity a symptom of trajectory misspecification instead.

The main alternative is to specify both current value and slope in one hazard model. That may separate their conditional contributions, but it can be unstable when the two features are strongly correlated; coefficients can then have large standard errors and be sensitive to modeling choices. A shared-random-effects association is another alternative, but it answers a different question from either single-feature link. These approaches should be compared on scientific interpretability, fit, uncertainty, and predictive behavior rather than by selecting whichever coefficient has the preferred sign or smallest \(p\)-value.

No single fitted sign identifies a causal effect. The models rely on assumptions about the longitudinal mean and covariance, association structure, baseline hazard, and censoring. If important time-varying confounding or informative measurement processes are not represented, the association may not have the intended interpretation. A sign reversal is therefore a prompt to describe which trajectory feature carries the signal and how robust that description is—not a reason to declare one model universally correct.

Common Mistake

  • Wrong reasoning: “The current-value coefficient is positive and the slope coefficient is negative, so one must be wrong.”
  • Correction: The coefficients concern distinct predictors with different units. Higher biomarker level and more rapid decline can both be associated with higher hazard. Check the observed trajectories, event timing, model assumptions, and uncertainty before interpreting the difference.
  • Wrong reasoning: “A negative slope coefficient means declining biomarker levels are protective.”
  • Correction: With \(m_i'(t)\) measured as change per year, \(\alpha_s<0\) means a more positive slope corresponds to lower hazard. A more negative slope corresponds to higher hazard under that model.
Key takeaway: A reversing association sign is interpretable only after identifying the feature in each link, its units, and the trajectories that distinguish subjects at risk. Opposite signs can reflect distinct level and change patterns, but robustness depends on the joint model assumptions and the data supporting those patterns.

Check Your Understanding

Answer each question, then compare your reasoning with the solutions below.

  1. If \(\hat{\alpha}_v=0.20\) per mg/L, what is the estimated hazard ratio for a 2 mg/L higher current value?
  2. A slope coefficient is \(-0.50\) per (mg/L per year). What is the hazard ratio for a one-unit more negative slope?
  3. Why can high stable and high declining trajectories contribute to opposite association signs?
  4. Does a negative slope coefficient show that changing the biomarker would reduce event risk? Explain.

Solutions. (1) The log hazard contrast is \(0.20(2)=0.40\), so \(HR=\exp(0.40)=1.492\). (2) A one-unit more negative slope is a change of \(-1\), so the log hazard contrast is \((-0.50)(-1)=0.50\), giving \(HR=\exp(0.50)=1.649\). (3) High stable paths can support a positive association with current value, while, at similar current values, high declining paths can support a negative coefficient for slope because more negative slopes coincide with higher hazard. (4) No. The coefficient describes a conditional association under a model; it does not by itself identify a causal effect of intervening on the biomarker.

Clinical Biostats