Tutorials › Joint Modeling of Longitudinal and Time-to-Event Data › Deriving the Cumulative Effect of a Marker Trajectory

Association Structures · Tutorial 195 of 697

Deriving the Cumulative Effect of a Marker Trajectory

Learn to integrate latent marker trajectories over time and translate differences in their accumulated exposure into conditional hazard contrasts.

Advanced 11 min read

What You'll Learn

  • Define cumulative marker exposure as the integral of a subject’s latent trajectory over a specified interval.
  • Integrate polynomial and exponential trajectories, keeping track of time and marker units.
  • Substitute exposure areas into a cumulative-association hazard model.
  • Calculate and interpret hazard ratios for two subjects with the same covariates.
  • Check integration, sign, and model assumptions before interpreting a contrast.

From a Marker Trajectory to Accumulated Exposure

A cumulative-association model uses more than the marker value at one instant. It links the event hazard to the marker’s accumulated trajectory up to that time. To use the model for a particular subject, we must first turn the specified latent trajectory into an area: the integral of the marker level across time. We can then compare two subjects by taking the difference in their areas and applying the association parameter.

This tutorial works through that calculation. The emphasis is on deriving the area from a given trajectory and carrying it correctly into the hazard model. The earlier material on Cumulative Association: Definition and Hazard Ratio introduced the general interpretation; here we make the trajectory-to-hazard calculation explicit.

Model, Notation, and Conditions

Let \(m_i(s;b_i)\) be subject \(i\)’s latent marker value at time \(s\), conditional on that subject’s random effects \(b_i\). For a fixed lower limit of zero and a comparison time \(t\), define the cumulative marker exposure \(A_i(t)\) as the area under this latent trajectory from zero to \(t\).

$$ A_i(t)=\int_0^t m_i(s;b_i)\,ds $$

Consider the cumulative-association hazard model

$$ \lambda_i(t\mid b_i,w_i) = \lambda_0(t)\exp\left\{\gamma^\mathsf{T}w_i+\alpha A_i(t)\right\}, $$

where \(\lambda_0(t)\) is the baseline hazard, \(w_i\) is a vector of covariates, \(\gamma\) is its coefficient vector, and \(\alpha\) is the cumulative-association parameter. The hazard is conditional on the subject’s latent trajectory, represented by \(b_i\), and the covariates. In this model, a one-unit increase in cumulative exposure changes the log hazard by \(\alpha\), holding the covariates and other terms fixed.

Definition: In this model, \(A_i(t)\) is the integral of subject \(i\)’s specified latent marker trajectory over the interval from zero to \(t\). A cumulative-association contrast between subjects A and B at time \(t\), when their covariates are equal, is \(\alpha\{A_A(t)-A_B(t)\}\) on the log-hazard scale.

The calculation requires the trajectory to be defined over the full integration interval and the cumulative link to be the model being used. The units must also be coherent: if \(m_i(s)\) is measured in marker units and time in years, \(A_i(t)\) is in marker-years, so \(\alpha\) is in inverse marker-years. Comparisons that use the same baseline hazard and equal covariates allow those terms to cancel. If covariates differ, their contribution must be retained. These are conditional hazard comparisons, not causal effects.

Why the Difference in Areas Gives the Hazard Ratio

For two subjects with the same covariates, divide their conditional hazards at time \(t\). The common baseline hazard and covariate term cancel. Taking the logarithm then gives the log-hazard contrast directly.

1
Write each conditional hazard.
For subject \(i\), the hazard is \(\lambda_0(t)\exp\{\gamma^\mathsf{T}w_i+\alpha A_i(t)\}\).
2
Form the ratio.
When \(w_A=w_B\), cancel the shared baseline hazard and covariate factor to obtain \(\lambda_A(t)/\lambda_B(t)=\exp\{\alpha[A_A(t)-A_B(t)]\}\).
3
Interpret the result.
The exponent is the log-hazard contrast; exponentiating it gives the conditional hazard ratio at time \(t\).

More generally, if the subjects have different covariates, the ratio is

$$ \frac{\lambda_A(t\mid b_A,w_A)}{\lambda_B(t\mid b_B,w_B)} = \exp\left\{ \gamma^\mathsf{T}(w_A-w_B) +\alpha[A_A(t)-A_B(t)] \right\}. $$

This derivation concerns the instantaneous hazard at the specified time. The ratio is not a ratio of survival probabilities or cumulative hazards. Its value can change with \(t\), because the accumulated areas can change with time.

Integrating a Polynomial Trajectory

Suppose a trajectory is given as a polynomial, \(m_i(s)=\sum_{k=0}^{K}\beta_{ik}s^k\). Integrating each term gives

$$ A_i(t)=\sum_{k=0}^{K}\beta_{ik}\frac{t^{k+1}}{k+1}. $$

The key is to integrate with respect to the trajectory’s time argument \(s\), and then evaluate the resulting expression at the comparison time \(t\). For a contrast, integrate both trajectories over the same interval before subtracting their areas.

Worked Example: Comparing Two Polynomial Trajectories

Hypothetical data. Time is measured in years and the marker in marker units. At time \(t=3\), suppose subject A has latent trajectory \(m_A(s)=2+0.5s-0.1s^2\), while subject B has \(m_B(s)=1.5+0.2s\). Assume equal covariates and an estimated cumulative-association parameter \(\alpha=-0.08\) per marker-year. Calculate the conditional hazard ratio for A versus B at year 3.

First integrate each specified trajectory:

$$ A_A(3)=\int_0^3(2+0.5s-0.1s^2)\,ds =\left[2s+0.25s^2-\frac{0.1}{3}s^3\right]_0^3 =6+2.25-0.90=7.35\text{ marker-years}, $$
$$ A_B(3)=\int_0^3(1.5+0.2s)\,ds =\left[1.5s+0.1s^2\right]_0^3 =4.50+0.90=5.40\text{ marker-years}. $$

The area difference is \(7.35-5.40=1.95\) marker-years. Thus the log-hazard ratio is \((-0.08)(1.95)=-0.156\), and the hazard ratio is \(\exp(-0.156)=0.8556\). Conditional on the specified trajectories and equal covariates, A’s hazard at year 3 is about 0.856 times B’s, or about 14.44% lower. This is a comparison of hazards at year 3, not a comparison of their event probabilities by year 3.

An Exponential Trajectory and a Nonlinear Area

The same procedure applies when the trajectory is not polynomial. For an exponential term, use its antiderivative and evaluate at both interval boundaries. The resulting area need not be linear in time, so the hazard contrast may evolve at a nonlinear rate.

Worked Example: Decaying Marker Difference

Hypothetical data. Suppose two subjects have trajectories \(m_A(s)=2+1.2\exp(-0.5s)\) and \(m_B(s)=2+0.6\exp(-0.5s)\), with time in years and marker values in marker units. At year 3, their covariates are equal and \(\alpha=0.25\) per marker-year. Find the hazard ratio for A versus B.

The shared constant part of the trajectories cancels in the area difference. Integrating the remaining difference gives

$$ A_A(3)-A_B(3) =\int_0^3 0.6\exp(-0.5s)\,ds =\left[-1.2\exp(-0.5s)\right]_0^3 =1.2(1-\exp(-1.5)) \approx 0.9322\text{ marker-years}. $$

The log-hazard ratio is \(0.25(0.9322)=0.2331\). Therefore, the hazard ratio is \(\exp(0.2331)=1.262\). Under the stated conditional model, A’s hazard at year 3 is about 1.26 times B’s, or about 26.2% higher. The positive direction is consistent with both a positive association parameter and A’s larger accumulated marker exposure.

A Contrast With an Exact Area Difference

Small differences in the integrated areas can matter when multiplied by the association parameter. Keep adequate precision through the multiplication and exponentiation, then round the final result. The following calculation illustrates why the percentage interpretation should be computed from the hazard ratio rather than rounded prematurely.

Worked Example: A Lower Hazard From Greater Cumulative Exposure

Hypothetical data. Let \(m_A(s)=1.5+0.2s\) and \(m_B(s)=0.6+0.0675s\), with time in years. Compare them at year 2 with equal covariates and \(\alpha=-0.12\) per marker-year.

Integrate the two trajectories:

$$ A_A(2)=\int_0^2(1.5+0.2s)\,ds =3.0+0.4=3.40\text{ marker-years}, $$
$$ A_B(2)=\int_0^2(0.6+0.0675s)\,ds =1.2+0.135=1.335\text{ marker-years}. $$

Therefore, \(A_A(2)-A_B(2)=3.40-1.335=2.065\) marker-years. The log-hazard ratio is \((-0.12)(2.065)=-0.2478\), so

$$ \frac{\lambda_A(2)}{\lambda_B(2)} =\exp(-0.2478) \approx 0.7805. $$

A’s conditional hazard at year 2 is about 0.7805 times B’s, or \((1-0.7805)\times100\%=21.95\%\) lower. The negative association parameter makes the larger cumulative exposure correspond to a lower hazard in this model. That direction is a consequence of the assumed coefficient sign, not a general property of cumulative exposure.

Checking the Calculation and Its Limits

A sound calculation has two distinct parts: the area implied by the trajectory, and the hazard contrast implied by that area and \(\alpha\). Check them separately. For an analytic integral, differentiate the antiderivative to recover the original trajectory. For a numerical integral, compare the result with a finer numerical approximation when feasible. In either case, verify that the area has marker-times-time units, while \(\alpha A_i(t)\) is dimensionless, as required inside an exponential.

The contrast also depends on the model assumptions. The trajectory used must represent the latent marker path over the interval, rather than an arbitrary substitute that changes the quantity being integrated. The comparison must account for covariate differences, and the interpretation is conditional on the specified trajectories and model. If trajectories or model parameters are estimated, a contrast calculated from point estimates alone does not express its uncertainty. Confidence intervals or other uncertainty summaries must incorporate relevant estimation uncertainty.

This cumulative link differs from the current-value and slope links covered earlier: those use the marker level or its rate of change at a particular time, whereas this model uses an integral over the trajectory. These alternatives answer different modeling questions. A good fit cannot be established merely by obtaining a plausible area or hazard ratio; model adequacy and trajectory plausibility need to be assessed separately.

  • Wrong: “A’s marker is higher at year 3, so its cumulative exposure must be higher.” A value at one instant does not determine the area over the entire interval. Correction: integrate each trajectory over the specified interval and compare the resulting areas.
  • Wrong: subtract the trajectories at time \(t\) and call that the cumulative contrast. Correction: subtract the integrals, \(\int_0^t m_A(s)\,ds-\int_0^t m_B(s)\,ds\).
  • Wrong: interpret a hazard ratio of 0.7805 as a 0.7805% reduction. Correction: the percentage lower is \((1-0.7805)\times100\%=21.95\%\).
  • Wrong: treat the conditional hazard ratio as a survival-probability ratio or a causal effect. Correction: it is a model-based ratio of instantaneous hazards conditional on the stated covariates and latent trajectories.
Key takeaway: Integrate each specified latent trajectory over the model’s stated interval, subtract the areas to form the exposure contrast, and multiply by \(\alpha\) on the log-hazard scale. Exponentiation then gives the conditional hazard ratio, with its direction determined by both the area difference and the sign of \(\alpha\).

Check Your Understanding

Work each problem using the same sequence: find the area or area difference, apply the association parameter, and interpret the resulting contrast.

  1. For \(m(s)=1.2+0.3s\), find the cumulative exposure from zero to year 4.
  2. Two subjects have an area difference \(A_A(2)-A_B(2)=-1.5\) marker-years. If \(\alpha=0.20\) per marker-year and covariates are equal, find the hazard ratio for A versus B and state the direction of the contrast.
  3. If two subjects’ covariates differ, can their hazard ratio generally be calculated from the area difference and \(\alpha\) alone? Explain.
  4. For \(m_A(s)=3+0.4\exp(-s)\) and \(m_B(s)=3+0.1\exp(-s)\), calculate the area difference at year 1.

Solutions. (1) \(\int_0^4(1.2+0.3s)\,ds=[1.2s+0.15s^2]_0^4=4.8+2.4=7.20\) marker-years. (2) The log-hazard ratio is \(0.20(-1.5)=-0.30\), so the ratio is \(\exp(-0.30)=0.7408\). A’s conditional hazard is about 25.92% lower than B’s because A’s area is smaller and \(\alpha\) is positive. (3) No. The log ratio also includes \(\gamma^\mathsf{T}(w_A-w_B)\), so the covariate contribution is needed. (4) The common constant cancels, giving \(\int_0^1 0.3\exp(-s)\,ds=[-0.3\exp(-s)]_0^1=0.3(1-\exp(-1))\approx0.1896\) marker-years.

Clinical Biostats