Tutorials › Joint Modeling of Longitudinal and Time-to-Event Data › The Subject-Specific Hazard Formula

The Basic Joint Model · Tutorial 133 of 697

The Subject-Specific Hazard Formula

Learn to expand and interpret the current-value hazard conditional on a subject’s random effects, including how the latent trajectory changes the hazard over time.

Advanced 11 min read

What You'll Learn

  • Expand the current-value hazard using the latent longitudinal trajectory.
  • Distinguish the baseline hazard, covariate effects, and marker contribution.
  • Interpret random effects as affecting the hazard through the subject’s latent marker value.
  • Calculate a subject-specific hazard and compare two hazards at the same time.
  • Check units, reference values, and common sources of incorrect interpretations.

From a Current Marker Value to a Subject-Specific Hazard

In a shared random-effects joint model, the event hazard is conditional on a subject’s latent trajectory. This distinction matters: the longitudinal measurements are noisy observations of that trajectory, while the hazard formula uses the latent marker value at time \(t\). Expanding the formula makes clear how baseline risk, covariates, and the subject’s evolving marker combine.

The formula describes an instantaneous event rate for a subject who is still at risk at time \(t\), conditional on that subject’s random effects and the covariates in the event model. It is not a probability of experiencing the event at exactly time \(t\). Its units are inverse time.

Definition: In a current-value joint model, the subject-specific hazard is $$ h_i(t\mid b_i,w_i(t))= h_0(t)\exp\{\gamma^\top w_i(t)+\alpha m_i(t)\}, $$ where \(h_0(t)\) is the baseline hazard, \(w_i(t)\) is the vector of event-submodel covariates, \(\gamma\) is their coefficient vector, \(m_i(t)\) is the subject’s latent marker value, and \(\alpha\) is the current-value association parameter. A common longitudinal specification is $$ m_i(t)=x_i(t)^\top\beta+z_i(t)^\top b_i, $$ with fixed-effects design vector \(x_i(t)\), fixed-effects coefficients \(\beta\), random-effects design vector \(z_i(t)\), and subject-specific random-effects vector \(b_i\).

Substitution gives the fully expanded hazard:

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

The hazard has a baseline-hazard factor, \(h_0(t)\), which describes how the reference hazard changes over time; its exponent has two interpretable contributions. The covariate term \(\gamma^\top w_i(t)\) shifts the log hazard according to the event-submodel covariates. The term \(\alpha m_i(t)\) shifts the log hazard according to the current latent marker value. Since the random effects enter \(m_i(t)\), they affect the event hazard through the subject’s trajectory rather than as a separate direct term in this current-value formula.

Assumptions and Interpretation of the Components

The formula is a model specification, not an identity that must hold for every joint model. It assumes that, conditional on the random effects and the included covariates, the event hazard has the stated log-linear dependence on the current latent marker. In particular, the event association is through the current value \(m_i(t)\); past marker values do not enter separately once the current value and covariates are given. The latent trajectory itself must be defined at the event times of interest by the longitudinal submodel.

The baseline hazard \(h_0(t)\) is the hazard when the modeled covariates are at their reference values and the marker value is zero. Zero may be a convenient mathematical reference rather than a clinically typical value; centering covariates or the marker can make the reference easier to interpret. The baseline hazard is nonnegative and has units of inverse time. The exponential multiplier is dimensionless.

The coefficient \(\alpha\) is measured in inverse marker units, so \(\alpha m_i(t)\) is dimensionless. Holding time and covariates fixed, increasing the latent marker by one unit multiplies the hazard by \(\exp(\alpha)\). If \(\alpha\) is positive, higher current marker values correspond to higher conditional hazards; if it is negative, they correspond to lower conditional hazards. This is a conditional association, not a causal effect.

The elements of \(\gamma\) are interpreted on the log-hazard scale. For a one-unit increase in a covariate with coefficient \(\gamma_j\), holding the other covariates and the latent marker fixed, the hazard is multiplied by \(\exp(\gamma_j)\). For a binary covariate, this compares its value of one with its reference value of zero. The covariate’s units and reference category must be stated to make that comparison meaningful.

Worked Example: Expanding the Hazard for One Subject

Suppose time is measured in years, and the longitudinal model for a marker measured in marker units is \(m_i(t)=1.0+0.1t+b_{0i}+b_{1i}t\). At \(t=2\), a hypothetical subject has \(b_{0i}=0.2\) marker units and \(b_{1i}=0.05\) marker units per year. The subject has a binary event covariate \(w_i=1\), with coefficient \(\gamma=0.75\). Let \(\alpha=0.45\) per marker unit and \(h_0(2)=0.080\) per year.

First calculate the latent marker value: $$ m_i(2)=1.0+0.1(2)+0.2+0.05(2)=1.5\ \text{marker units}. $$ The covariate contribution to the exponent is \(0.75(1)=0.75\), and the marker contribution is \(0.45(1.5)=0.675\). Thus the total exponent is \(0.75+0.675=1.425\), and $$ h_i(2\mid b_i,w_i)=0.080\exp(1.425) =0.080(4.158)\approx0.3326\ \text{per year}. $$

This is the subject-specific hazard at year 2, conditional on the specified random effects and covariate. The random intercept and slope contribute by determining the latent value \(m_i(2)\); neither should be added again as an independent event-model term.

Comparing Hazards at the Same Time

At a fixed time \(t\) at which \(h_0(t)>0\), the baseline hazard is common to subjects in the same model and cancels in their hazard ratio. For subjects \(i\) and \(k\), the formula implies

$$ \frac{h_i(t\mid b_i,w_i(t))}{h_k(t\mid b_k,w_k(t))} = \exp\left\{ \gamma^\top[w_i(t)-w_k(t)] +\alpha[m_i(t)-m_k(t)] \right\}. $$

This comparison is conditional on the covariates and random effects used to calculate each latent trajectory. If two subjects differ in both covariates and marker value, both differences contribute to the log hazard ratio. If their marker values change over time, their hazard ratio can change over time as well, even though the association coefficient \(\alpha\) is constant.

Worked Example: Combining Covariate and Marker Differences

At a particular time, suppose two hypothetical subjects share the same baseline hazard. Subject A has \(w_A=0\) and latent marker \(m_A=1.0\) marker unit. Subject B has \(w_B=1\) and \(m_B=1.4\) marker units. Let the covariate coefficient be \(\gamma=0.50\) and the current-value association parameter be \(\alpha=0.60\) per marker unit.

The log hazard ratio for B versus A is $$ \gamma(w_B-w_A)+\alpha(m_B-m_A) =0.50(1-0)+0.60(1.4-1.0) =0.50+0.24=0.74. $$ Therefore, $$ \frac{h_B}{h_A}=\exp(0.74)\approx2.096. $$

At that time, conditional on the specified covariates and random effects, B’s hazard is about 2.10 times A’s hazard. This comparison combines the covariate contrast and the difference in latent marker values; it does not attribute the entire contrast to either one alone.

How Random Effects Shape the Hazard Over Time

For a linear trajectory with a random intercept and slope, a subject’s random effects can change both the marker level and its rate of change. For example, if \(m_i(t)=\beta_0+\beta_1t+b_{0i}+b_{1i}t\), then the contribution to the log hazard from the current value is \(\alpha(\beta_0+\beta_1t+b_{0i}+b_{1i}t)\). The random intercept shifts this contribution across time; the random slope makes that shift grow or shrink with time. The baseline hazard can also change with time, so changes in the hazard need not be attributable to the marker trajectory alone.

Worked Example: Comparing Two Random-Effects Trajectories

Suppose \(m_i(t)=2.0-0.1t+b_{0i}+b_{1i}t\), time is measured in years, \(\alpha=0.40\) per marker unit, and there are no event-model covariates. At year 3, let \(h_0(3)=0.050\) per year. For hypothetical subject A, take \(b_{0A}=0.30\) and \(b_{1A}=0.05\) marker units per year. For hypothetical subject B, take \(b_{0B}=-0.20\) and \(b_{1B}=-0.05\) marker units per year.

Their latent marker values are $$ m_A(3)=2.0-0.1(3)+0.30+0.05(3)=2.15, \qquad m_B(3)=2.0-0.1(3)-0.20-0.05(3)=1.35 $$ marker units. Thus, $$ h_A(3)=0.050\exp\{0.40(2.15)\} =0.050\exp(0.86)\approx0.1182\ \text{per year}, $$ and $$ h_B(3)=0.050\exp\{0.40(1.35)\} =0.050\exp(0.54)\approx0.08580\ \text{per year}. $$ The ratio is \(\exp\{0.40(2.15-1.35)\}=\exp(0.32)\approx1.377\), consistent with the two calculated hazards. At year 3, A’s conditional hazard is about 1.38 times B’s, because A’s latent marker value is higher and \(\alpha\) is positive.

Derivation, Diagnostics, and Alternatives

The expansion follows directly by substituting the longitudinal model into the current-value link. The following logarithmic representation applies where \(h_0(t)>0\); where \(h_0(t)=0\), the hazard is zero and its logarithm is undefined. Taking logarithms makes each contribution explicit:

$$ \begin{aligned} \log h_i(t\mid b_i,w_i(t)) &=\log h_0(t)+\gamma^\top w_i(t)+\alpha m_i(t)\\ &=\log h_0(t)+\gamma^\top w_i(t) +\alpha x_i(t)^\top\beta+\alpha z_i(t)^\top b_i. \end{aligned} $$

Exponentiating recovers the expanded hazard. This algebra also shows why a random effect cannot be interpreted as an additional hazard multiplier without specifying how it enters the longitudinal trajectory: its contribution is \(\alpha z_i(t)^\top b_i\), which depends on the trajectory design and on \(\alpha\).

Several checks help detect errors in interpretation or calculation. Confirm that the time unit for \(h_0(t)\) matches the reported hazard; a hazard per year is not a hazard per month. Check that the exponent is dimensionless and that marker units are consistent between \(m_i(t)\) and \(\alpha\). Verify that the random effects have been included once, inside \(m_i(t)\). Finally, ensure that a hazard comparison is made at the same time if cancelling \(h_0(t)\); hazards at different times generally have different baseline-hazard factors.

The current-value model is one choice of association structure. A model using the marker slope or a summary of the marker history would answer a different question and would have a different hazard formula. Likewise, a hazard based directly on an observed measurement would treat measurement error differently from this latent-trajectory model. Those alternatives should not be silently substituted into the current-value formula. The conditional subject-specific hazard is also not a population-average hazard: obtaining a marginal event-time summary requires accounting for variation in the random effects rather than simply dropping \(b_i\) from the expression.

Common pitfall: “The random intercept is 0.2, so multiply the hazard by \(\exp(0.2)\).” This is generally wrong in a current-value model. The random intercept first changes the latent marker value, and the resulting hazard contribution is \(\exp(\alpha b_{0i})\) only when the random intercept enters that marker value with coefficient one. The association parameter and the longitudinal design must be included.

The formula is useful because it keeps the components of the joint model distinct: \(h_0(t)\) sets the reference time pattern, \(\gamma\) describes the included covariate associations, and \(\alpha m_i(t)\) links the evolving latent marker to the event hazard. Its limitations follow from its assumptions: a current-value link may not capture association through marker slope or earlier history, and a log-linear marker effect may not describe a nonlinear association. The formula also gives a conditional association, not a causal conclusion.

Check Your Understanding

Use the current-value hazard formula to answer the questions. Each solution shows the calculation or reasoning.

  1. If \(h_0(t)=0.04\) per month, \(\gamma w=0.20\), \(\alpha=0.5\) per marker unit, and \(m_i(t)=2\) marker units, calculate the subject-specific hazard.
  2. At the same time, two subjects have identical covariates and marker values that differ by 0.6 units. If \(\alpha=-0.3\) per marker unit, calculate the hazard ratio for the subject with the higher marker value relative to the other.
  3. In \(m_i(t)=1+0.2t+b_{0i}+b_{1i}t\), what is the role of \(b_{1i}\), and how does it affect the hazard formula?
  4. Why is it incorrect to interpret \(\exp(\alpha m_i(t))\) alone as the full subject-specific hazard?

Solutions. 1. The exponent is \(0.20+0.5(2)=1.20\). Thus \(h_i(t)=0.04\exp(1.20)\approx0.1328\) per month. 2. The log hazard ratio is \(\alpha(0.6)=-0.18\), so the ratio is \(\exp(-0.18)\approx0.8353\). The higher-marker subject has about 0.835 times the hazard, conditional on the stated covariates and random effects. 3. \(b_{1i}\) is the subject-specific random slope, in marker units per unit time. At time \(t\), it contributes \(b_{1i}t\) to the latent marker and \(\alpha b_{1i}t\) to the log hazard. 4. The full hazard also includes \(h_0(t)\) and the covariate multiplier \(\exp\{\gamma^\top w_i(t)\}\); omitting either can change its value and units.

Clinical Biostats