Tutorials › Joint Modeling of Longitudinal and Time-to-Event Data › Putting the Association Structure Into the Hazard

Maximum Likelihood and EM Estimation · Tutorial 250 of 697

Putting the Association Structure Into the Hazard

You will substitute a longitudinal trajectory and its slope into the conditional hazard and identify exactly how each association choice makes the hazard depend on random effects.

Advanced 11 min read

What You'll Learn

  • Write conditional hazards with current-value, current-slope, or combined association terms.
  • Substitute a mixed-effects trajectory into the hazard and isolate its random-effects component.
  • Differentiate a longitudinal mean trajectory to obtain the current-slope term.
  • Interpret association coefficients and hazard ratios with appropriate units.
  • Compare how current-value and current-slope links encode distinct dependence on random effects.
  • Recognize when an assumed trajectory or link makes the hazard interpretation unreliable.

Why the Association Term Belongs in the Hazard

A longitudinal outcome can describe a patient’s changing clinical state, while an event-time outcome records when an event occurs. In a shared-random-effects model, the event hazard is conditional on the same subject-specific random effects that help describe the longitudinal trajectory. The association structure specifies which feature of that trajectory enters the hazard: its current level, its current rate of change, or both.

The distinction is substantive. A current-value association says that the event hazard is related to the subject’s underlying outcome level at that time. A current-slope association instead relates the hazard to the trajectory’s instantaneous rate of change. Substituting the longitudinal model into the hazard makes clear how either choice creates dependence on the random effects.

Definition: For subject \(i\), let \(Y_{ij}\) be a longitudinal measurement at time \(t_{ij}\), and let \(m_i(t)\) be the subject-specific mean trajectory. A common shared-random-effects specification is \(m_i(t)=x_i(t)^\top\beta+z_i(t)^\top b_i\), where \(x_i(t)\) and \(z_i(t)\) are known design vectors, \(\beta\) is a fixed-effects parameter vector, and \(b_i\) is a subject-specific random-effects vector. The current slope is \(m_i'(t)=d m_i(t)/dt\), when that derivative exists.

Putting Current Value or Current Slope Into the Hazard

Write \(h_i(t\mid b_i)\) for subject \(i\)’s event hazard at time \(t\), conditional on the subject’s random effects and observed covariates. A current-value association is commonly written as

$$ h_i(t\mid b_i)=h_0(t)\exp\!\left\{w_i(t)^\top\gamma+\alpha m_i(t)\right\}. $$

Here \(h_0(t)\) is the baseline hazard, \(w_i(t)\) is a vector of event-model covariates, and \(\gamma\) is its coefficient vector. The parameter \(\alpha\) controls the association with the current underlying outcome. Substituting the mixed-effects trajectory gives

$$ h_i(t\mid b_i)=h_0(t)\exp\!\left\{w_i(t)^\top\gamma+\alpha x_i(t)^\top\beta+\alpha z_i(t)^\top b_i\right\}. $$

This expression makes the random-effects dependence explicit: the hazard contains the term \(\alpha z_i(t)^\top b_i\) in its log. If \(\alpha=0\), this particular current-value link contributes no random-effects dependence to the hazard. If \(\alpha\ne 0\), the hazard depends on those components of \(b_i\) that affect \(m_i(t)\).

A current-slope association replaces, or supplements, the current-value term:

$$ h_i(t\mid b_i)=h_0(t)\exp\!\left\{w_i(t)^\top\gamma+\eta m_i'(t)\right\}. $$

Since \(m_i'(t)=x_i'(t)^\top\beta+z_i'(t)^\top b_i\), provided the design functions are differentiable, substitution yields

$$ h_i(t\mid b_i)=h_0(t)\exp\!\left\{w_i(t)^\top\gamma+\eta x_i'(t)^\top\beta+\eta z_i'(t)^\top b_i\right\}. $$

Thus the current-slope link depends on the random effects through the derivative of the random-effects design, \(z_i'(t)^\top b_i\). A combined association can include both trajectory features:

$$ h_i(t\mid b_i)=h_0(t)\exp\!\left\{w_i(t)^\top\gamma+\alpha m_i(t)+\eta m_i'(t)\right\}. $$

The current-value and current-slope coefficients are not interchangeable. They describe associations with different quantities, and their units differ. If the outcome is measured in mg/L and time in years, then \(\alpha\) has units of (mg/L)\(^{-1}\), while \(\eta\) has units of years/(mg/L). Each product in the exponent is dimensionless.

What the Random-Effects Dependence Means

For two possible random-effects values \(b_i^{(A)}\) and \(b_i^{(B)}\), compare their conditional hazards at the same time and the same covariate values. Under the current-value model, the terms not involving \(b_i\) cancel, giving

$$ \frac{h_i(t\mid b_i^{(A)})}{h_i(t\mid b_i^{(B)})} = \exp\!\left\{\alpha\left[m_i(t;b_i^{(A)})-m_i(t;b_i^{(B)})\right]\right\}. $$

Under a current-slope model, the corresponding ratio is

$$ \frac{h_i(t\mid b_i^{(A)})}{h_i(t\mid b_i^{(B)})} = \exp\!\left\{\eta\left[m_i'(t;b_i^{(A)})-m_i'(t;b_i^{(B)})\right]\right\}. $$

These are conditional hazard ratios: they compare hazards at a given time for specified trajectories and shared covariates. They are not ratios of marginal hazards obtained after averaging over the random-effects distribution.

Justification: Taking the logarithm of the current-value hazard gives \(\log h_i(t\mid b_i)=\log h_0(t)+w_i(t)^\top\gamma+\alpha m_i(t;b_i)\). Subtracting this expression for \(b_i^{(B)}\) from the expression for \(b_i^{(A)}\) cancels the common baseline and covariate terms. Exponentiating the difference gives the stated hazard ratio. Replacing \(m_i(t)\) by \(m_i'(t)\) proves the slope version in the same way.

Worked Example: Substituting a Random Intercept and Slope

Suppose a hypothetical biomarker trajectory is \(m_i(t)=8+0.4t+b_{0i}+b_{1i}t\), with time in years and the biomarker in mg/L. At \(t=2\) years, take \(b_{0i}=0.5\) mg/L and \(b_{1i}=-0.2\) mg/L per year. Assume a current-value hazard with \(h_0(t)=0.030\) per year, no additional covariate contribution, and \(\alpha=0.18\) per mg/L. Find the subject’s conditional hazard and compare it with the hazard at \(b_{0i}=b_{1i}=0\).

First substitute the values into the trajectory:

$$ m_i(2)=8+0.4(2)+0.5+(-0.2)(2)=8.9\ \text{mg/L}. $$

The hazard is therefore

$$ h_i(2\mid b_i)=0.030\exp\{0.18(8.9)\} =0.030\exp(1.602) \approx 0.1489\ \text{per year}. $$

For zero random effects, \(m_i(2)=8+0.4(2)=8.8\) mg/L, so the conditional hazard is \(0.030\exp\{0.18(8.8)\}\approx0.1462\) per year. The hazard ratio is \(\exp\{0.18(8.9-8.8)\}=\exp(0.018)\approx1.018\). In this hypothetical calculation, the specified random effects raise the hazard at 2 years by about 1.8% relative to the zero-random-effects trajectory, holding the other terms fixed.

Worked Example: Current Slope and Its Random-Effects Component

Consider a hypothetical trajectory \(m_i(t)=12+0.6t+b_{0i}+b_{1i}t\), where the outcome is in mg/L and time is in years. Let \(b_{1i}=-0.25\) mg/L per year. Use a current-slope hazard with \(h_0(t)=0.040\) per year, no additional covariate contribution, and \(\eta=0.80\) years per mg/L. Calculate the slope and hazard, then compare with the hazard for \(b_{1i}=0\).

Differentiating with respect to time gives

$$ m_i'(t)=0.6+b_{1i}=0.6-0.25=0.35\ \text{mg/L per year}. $$

The hazard for the stated random slope is

$$ h_i(t\mid b_i)=0.040\exp\{0.80(0.35)\} =0.040\exp(0.28) \approx0.05293\ \text{per year}. $$

If \(b_{1i}=0\), the slope is \(0.6\) mg/L per year and the hazard is \(0.040\exp\{0.80(0.6)\}=0.040\exp(0.48)\approx0.06464\) per year. The ratio for the stated random slope relative to zero random slope is \(\exp\{0.80(-0.25)\}=\exp(-0.20)\approx0.8187\). Thus this random slope corresponds to a conditional hazard about 18.1% lower, at the same time and other covariate values. It is the slope coefficient \(b_{1i}\), not the random intercept \(b_{0i}\), that enters the derivative for this linear trajectory.

Worked Example: Combining Current Value and Current Slope

Suppose two hypothetical subjects have the same fixed-effects trajectory, the same event covariates, and random-effects vectors \((b_{0A},b_{1A})=(0.4,0.1)\) and \((b_{0B},b_{1B})=(-0.2,-0.1)\). Let \(m_i(t)=\beta_0+\beta_1t+b_{0i}+b_{1i}t\), with time in years and outcome in mg/L. At \(t=3\) years, use a combined association with \(\alpha=0.10\) per mg/L and \(\eta=0.50\) years per mg/L. Find the conditional hazard ratio for A relative to B.

The fixed-effects terms cancel in the trajectory difference. The current-value difference is

$$ m_A(3)-m_B(3)=(0.4-(-0.2))+(0.1-(-0.1))(3)=0.6+0.6=1.2\ \text{mg/L}. $$

The slope difference is \(m_A'(3)-m_B'(3)=0.1-(-0.1)=0.2\) mg/L per year. Therefore,

$$ \frac{h_A(3)}{h_B(3)} =\exp\{0.10(1.2)+0.50(0.2)\} =\exp(0.22) \approx1.246. $$

At 3 years, subject A’s conditional hazard is about 24.6% higher than subject B’s under this specified model, with baseline hazard and other covariates held equal. The calculation shows that the value and slope contrasts each contribute to the log hazard ratio.

Assumptions and Practical Checks

These substitutions are meaningful only relative to a specified model. In a typical shared-random-effects formulation, the longitudinal mean \(m_i(t)\) is defined conditional on \(b_i\), and the event hazard is also conditional on that same \(b_i\). The model must specify the time scale, trajectory basis, covariates, and association link. A usual assumption is that the longitudinal process and event process are conditionally independent given the shared random effects and modeled covariates; dependence is then represented through their common \(b_i\) and the hazard association term. The random-effects distribution and the longitudinal measurement-error model also need to be specified for likelihood-based estimation, though they do not change the algebraic substitution shown here.

Before interpreting a fitted hazard, check that the trajectory and its derivative match the scientific meaning of the association. For polynomial or spline trajectories, differentiate the fitted mean function with respect to the model’s actual time variable. If time was rescaled or centered, convert the derivative units accordingly. For a piecewise trajectory, the derivative may differ by segment or fail to exist at a knot; a current-slope link then requires a defined convention at that point.

  • Check the sign and scale. A positive \(\alpha\) means a higher current outcome corresponds to a higher conditional hazard, for the stated outcome coding. It does not by itself imply a causal effect.
  • Check random-effects dependence directly. After substitution, identify the coefficient of each component of \(b_i\). For a linear intercept-and-slope model, a current-value link generally uses both random intercept and random slope; a current-slope link uses the random slope.
  • Check units. The exponent must be dimensionless. If the outcome is recoded from mg/L to another scale, the numerical association coefficient changes correspondingly.
  • Check trajectory behavior over the event-time range. Implausible extrapolation or an overly rigid trajectory can make a current value or derivative a poor summary of the underlying process.

Choosing and Comparing Association Structures

Association choiceHazard termRandom-effects dependence after substitutionInterpretation
Current value\(\alpha m_i(t)\)\(\alpha z_i(t)^\top b_i\)Association with the underlying outcome level at time \(t\)
Current slope\(\eta m_i'(t)\)\(\eta z_i'(t)^\top b_i\)Association with the instantaneous rate of change
Combined\(\alpha m_i(t)+\eta m_i'(t)\)\(\alpha z_i(t)^\top b_i+\eta z_i'(t)^\top b_i\)Separate associations with level and rate of change

A current-value link is often natural when the clinical question concerns the patient’s present underlying status. A current-slope link may be motivated when deterioration or improvement is believed to matter beyond the level itself. A combined link is more flexible but adds parameters and can make the two associations difficult to distinguish, particularly when trajectories are observed sparsely or value and slope are strongly related.

These choices are alternatives about how the longitudinal trajectory enters the event hazard, not different ways of substituting the same quantity. A current-value model should not be interpreted as a slope model, and vice versa. Model comparisons and sensitivity analyses can assess how conclusions depend on the chosen association, but a better fit alone does not establish that the chosen link is scientifically correct.

Common Mistakes and Limitations

  • Using the observed measurement in place of the latent trajectory. The association terms above use \(m_i(t)\), the subject-specific underlying mean, not an isolated noisy observation \(Y_{ij}\). Substituting an observed value changes the model and can transmit measurement error directly into the hazard.
  • Claiming the current-slope link always depends on every random effect. It depends on \(z_i'(t)^\top b_i\). In the linear random-intercept-and-slope example, the intercept disappears from the derivative; for other trajectory bases, the components that remain depend on the derivatives of their basis functions.
  • Calling a conditional hazard ratio a marginal hazard ratio. The ratio derived here fixes the random effects and covariates. Averaging over random effects does not generally preserve the same hazard-ratio expression.
  • Reading an association as causation. A nonzero \(\alpha\) or \(\eta\) describes model-based association conditional on specified terms. It does not, without additional causal assumptions and design, show that changing the longitudinal outcome would change event risk.

The chosen link can also be sensitive to how the longitudinal trajectory is modeled. A poorly supported derivative may be especially unstable because differentiation can amplify local noise or modeling choices. Sparse measurement schedules, irregular follow-up, and misspecified time trends can therefore weaken the interpretation of a current-slope association. The hazard specification is a model for conditional event risk, not a direct measurement of an individual’s causal mechanism.

Key takeaway: Substitute \(m_i(t)=x_i(t)^\top\beta+z_i(t)^\top b_i\) into a current-value hazard, and substitute \(m_i'(t)=x_i'(t)^\top\beta+z_i'(t)^\top b_i\) into a current-slope hazard. The resulting terms show exactly which random effects enter the conditional hazard and what trajectory feature each association coefficient describes.

Check Your Understanding

For each question, identify the relevant trajectory feature and show how the stated association acts on the conditional hazard.

  1. For \(m_i(t)=\beta_0+\beta_1t+b_{0i}+b_{1i}t\), which random effects enter a current-value term? Which enter a current-slope term?
  2. If two subjects have a current-value difference of 2 mg/L and \(\alpha=0.15\) per mg/L, what is their conditional hazard ratio when other terms match?
  3. For a slope association, \(\eta=0.4\) years per mg/L and one subject’s current slope is 0.3 mg/L per year higher than another’s. Calculate the conditional hazard ratio.
  4. Why must the derivative in a current-slope link be taken with respect to the model’s time scale?

Solutions. (1) The current value is \(\beta_0+\beta_1t+b_{0i}+b_{1i}t\), so both \(b_{0i}\) and \(b_{1i}\) enter. The derivative is \(\beta_1+b_{1i}\), so only \(b_{1i}\) enters the current slope. (2) The ratio is \(\exp\{0.15(2)\}=\exp(0.30)\approx1.350\); the first subject’s conditional hazard is 35.0% higher. (3) The ratio is \(\exp\{0.4(0.3)\}=\exp(0.12)\approx1.127\); the subject with the higher slope has a conditional hazard about 12.7% higher. (4) The derivative’s value and units depend on the time variable: changing years to months changes its numerical scale. The association coefficient must correspond to that same scale so that the exponent remains dimensionless.

Clinical Biostats