Tutorials › Joint Modeling of Longitudinal and Time-to-Event Data › Conditional and Marginal Cause-Specific Hazards

Competing Risks and Recurrent Events · Tutorial 399 of 697

Conditional and Marginal Cause-Specific Hazards

Learn how latent-effect conditioning and selection among event-free subjects change cause-specific hazards, and how to calculate the corresponding marginal hazards.

Advanced 11 min read

What You'll Learn

  • Define conditional and marginal cause-specific hazards in a shared-random-effects competing-risks model.
  • Derive why marginal hazards average over the random-effect distribution among current survivors.
  • Calculate conditional hazards from a specified random-effect value.
  • Compute survivor-weighted marginal hazards for a discrete latent-effect distribution.
  • Distinguish population averaging from averaging conditional on observed longitudinal data.
  • Recognize selection, interpretation, and numerical-integration pitfalls.

Why Conditioning Changes the Hazard

A joint model can describe each cause-specific event hazard as depending on a subject’s latent random effects. Conditional on those effects, the hazard describes the instantaneous event rate for a subject with a specified latent profile. A population-level question is different: among subjects who have remained free of every event up to time \(t\), what is the instantaneous rate of a particular cause when the latent effects are not observed? The answer is generally not the average of the conditional hazards under the original random-effects distribution.

The difference arises because remaining event-free is informative about latent risk. If subjects with some random-effect values tend to experience events earlier, fewer of them remain in the risk set at later times. Thus, the distribution of random effects among current survivors may differ from the distribution at study entry. The distinction matters when describing individual-level model parameters, reporting population-level rates, or interpreting an effect averaged over a population.

Definition: Let \(K\) be the number of competing causes, let \(T\) be time to the first event, and let \(J\in\{1,\ldots,K\}\) denote its cause. Let \(\mathbf b\) be a latent random-effects vector with population distribution \(F_{\mathbf b}\). The conditional cause-specific hazard for cause \(k\) is \[ \lambda_k(t\mid\mathbf b)=\lim_{\Delta t\downarrow0}\frac{P(t\leq T<t+\Delta t,\ J=k\mid T\geq t,\mathbf b)}{\Delta t}. \] The marginal cause-specific hazard is the corresponding rate among subjects event-free at \(t\), after integrating over the random effects rather than conditioning on their values.

For a shared-random-effects model, one possible specification is \(\lambda_k(t\mid\mathbf b)=\lambda_{0k}(t)\exp(\boldsymbol\alpha_k^\mathsf{T}\mathbf b)\), where \(\lambda_{0k}(t)\) is the cause-specific baseline hazard and \(\boldsymbol\alpha_k\) describes how the latent effects enter that cause’s hazard. “Shared” means the same latent vector can contribute to multiple cause-specific hazards; its coefficients need not be identical across causes. The competing events are treated as mutually exclusive first events, and, conditional on \(\mathbf b\), the total event hazard is the sum of the cause-specific hazards: \[ \lambda_{\mathrm{all}}(t\mid\mathbf b)=\sum_{k=1}^K\lambda_k(t\mid\mathbf b). \]

Deriving the Marginal Hazard

Write \(S(t\mid\mathbf b)=P(T\geq t\mid\mathbf b)\) for conditional event-free survival. Under the cause-specific hazard model, if the hazards are integrable, \(S(t\mid\mathbf b)=\exp\{-\int_0^t\sum_{j=1}^K\lambda_j(u\mid\mathbf b)\,du\}\). The marginal survival probability is the population average of this conditional survival: \(\bar S(t)=E_{\mathbf b}\{S(t\mid\mathbf b)\}\). The crucial step is to calculate the cause-\(k\) event rate in the population still at risk, not in the population at entry.

$$ \begin{aligned} P(t\leq T<t+\Delta t,\ J=k) &\approx E_{\mathbf b}\{S(t\mid\mathbf b)\lambda_k(t\mid\mathbf b)\}\Delta t,\\ P(T\geq t)&=E_{\mathbf b}\{S(t\mid\mathbf b)\}. \end{aligned} $$

The first line follows because, conditional on \(\mathbf b\) and being event-free at \(t\), the probability of a cause-\(k\) event in a short interval is \(\lambda_k(t\mid\mathbf b)\Delta t+o(\Delta t)\). Multiplying by the probability \(S(t\mid\mathbf b)\) of reaching that interval event-free and averaging over \(\mathbf b\) gives the population event probability. Divide the first line by \(\Delta t\,P(T\geq t)\) and take the limit as \(\Delta t\) decreases to zero. This yields

$$ \bar\lambda_k(t) = \frac{E_{\mathbf b}\{S(t\mid\mathbf b)\lambda_k(t\mid\mathbf b)\}} {E_{\mathbf b}\{S(t\mid\mathbf b)\}} = E_{\mathbf b\mid T\geq t}\{\lambda_k(t\mid\mathbf b)\}. $$

The last expectation is over the random-effect distribution among subjects who have survived event-free to \(t\). In fact, this distribution is proportional to \(S(t\mid\mathbf b)dF_{\mathbf b}(\mathbf b)\). This survivor weighting is the reason that \(\bar\lambda_k(t)\) generally differs from \(E_{\mathbf b}\{\lambda_k(t\mid\mathbf b)\}\). At entry, when \(S(0\mid\mathbf b)=1\), the two agree if the target distribution is the population distribution at entry. Later, they need not.

Worked Example: A Conditional Hazard at a Specified Latent Profile

Suppose there are two causes, time is measured in years, and the conditional hazards at a particular time are \(\lambda_1(t\mid b)=0.03\exp(0.8b)\) and \(\lambda_2(t\mid b)=0.02\exp(-0.3b)\), in events per year. For a subject with \(b=0.5\), calculate both conditional hazards, the total hazard, and the fraction of that total due to cause 1.

For cause 1, \(0.8b=0.8(0.5)=0.4\), so \(\lambda_1(t\mid0.5)=0.03e^{0.4}=0.04475\) events per year. For cause 2, \(-0.3b=-0.15\), so \(\lambda_2(t\mid0.5)=0.02e^{-0.15}=0.01721\) events per year.

The conditional total hazard is \(0.04475+0.01721=0.06197\) events per year. The cause-1 share of this instantaneous total rate is \(0.04475/0.06197=0.7222\), or about 72.22%. This is a conditional calculation for the specified latent value; it is not the population’s hazard share unless the population has that same latent profile.

Survivor Weighting in a Two-Group Population

A finite mixture makes the distinction transparent. Suppose half the population has latent type L and half type H. Their conditional cause-specific hazards are constant over time: type L has hazards \(0.2\) and \(0.6\) per year for causes 1 and 2, while type H has hazards \(0.8\) and \(1.0\) per year. Conditional survival to time \(t\) is therefore \(e^{-0.8t}\) for type L and \(e^{-1.8t}\) for type H. The higher-risk type H is depleted from the event-free group more quickly.

Worked Example: Marginal Hazards After One Year

Using the two-type population just described, calculate the marginal cause-specific hazards at \(t=1\) year and compare them with the averages at entry.

At one year, the conditional survivals are \(S(1\mid L)=e^{-0.8}=0.449329\) and \(S(1\mid H)=e^{-1.8}=0.165299\). Thus, the marginal event-free survival is \(\bar S(1)=0.5(0.449329)+0.5(0.165299)=0.307314\).

For cause 1, the survivor-weighted numerator is \(0.5(0.449329)(0.2)+0.5(0.165299)(0.8)=0.111052\). Consequently, \(\bar\lambda_1(1)=0.111052/0.307314=0.3614\) events per year. For cause 2, the numerator is \(0.5(0.449329)(0.6)+0.5(0.165299)(1.0)=0.217448\), giving \(\bar\lambda_2(1)=0.217448/0.307314=0.7076\) events per year. The total marginal hazard is \(0.3614+0.7076=1.069\) events per year. The fraction of that marginal rate due to cause 1 is \(0.3614/1.069=0.3381\), approximately 33.81%.

At entry, the population-average cause-specific hazards are \(0.5(0.2)+0.5(0.8)=0.5\) and \(0.5(0.6)+0.5(1.0)=0.8\) events per year. The cause-1 share at entry is \(0.5/(0.5+0.8)=0.3846\). At one year, both the marginal rates and their cause-1 share have changed because the risk set is no longer an equal mixture of types. Averaging the conditional hazards under the original 50:50 distribution at one year would miss that selection.

Which Distribution Is Being Averaged?

The target distribution must be stated. A population marginal hazard uses the random-effects distribution at entry, updated by event-free survival as time passes. When a subject’s longitudinal measurements \(Y\) are available, prediction for subjects with those measurements instead starts from a distribution such as \(F_{\mathbf b\mid Y}\). If the prediction also conditions on being event-free to time \(t\), survival updates that distribution as well: \[ \bar\lambda_k(t\mid Y,T\geq t) = \frac{E_{\mathbf b\mid Y}\{S(t\mid\mathbf b)\lambda_k(t\mid\mathbf b)\}} {E_{\mathbf b\mid Y}\{S(t\mid\mathbf b)\}}. \] This is a marker-informed, survivor-specific rate. It is not generally the same as a population rate or a conditional hazard evaluated at a single estimated random effect.

Worked Example: Averaging Given Longitudinal Information

Suppose longitudinal information gives a posterior probability of \(0.8\) for latent type L and \(0.2\) for type H in the two-type model above. At entry, conditional on this information, the cause-1 hazard is \(0.8(0.2)+0.2(0.8)=0.32\) events per year, and the cause-2 hazard is \(0.8(0.6)+0.2(1.0)=0.68\) events per year. These differ from the population entry averages, \(0.5\) and \(0.8\), because the marker-informed distribution is not 50:50.

At one year, first weight each type by its conditional survival and its marker-informed probability. The denominator is \(0.8e^{-0.8}+0.2e^{-1.8}=0.392523\). For cause 1 the numerator is \(0.8e^{-0.8}(0.2)+0.2e^{-1.8}(0.8)=0.098340\), so the marker-informed marginal hazard is \(0.098340/0.392523=0.2505\) events per year. For cause 2 the numerator is \(0.8e^{-0.8}(0.6)+0.2e^{-1.8}(1.0)=0.248738\), giving \(0.248738/0.392523=0.6337\) events per year. The calculation first uses the distribution given the marker data, then updates it for surviving event-free to one year.

Interpretation, Diagnostics, and Limitations

Conditional hazards answer a subject-specific, latent-profile question: what is the instantaneous cause-\(k\) rate at a specified \(\mathbf b\), given that the subject remains event-free? Marginal hazards answer a risk-set question: what is the instantaneous cause-\(k\) rate among the target group still event-free, after integrating over its current distribution of latent effects? A coefficient in a conditional hazard model therefore need not describe the change in a marginal hazard by the same amount. Even when conditional hazards have a simple proportional form, changing composition of the event-free group can make marginal hazards vary over time.

The formula relies on a coherent distribution for \(\mathbf b\), valid conditional cause-specific hazards, and a survival function generated by their sum for the mutually exclusive first events. For a marker-informed calculation, the conditional distribution of \(\mathbf b\) given the observed longitudinal information must also be appropriate. These are model-based quantities: misspecification of the random-effects distribution, hazard forms, or longitudinal model can distort the resulting marginal rates. Numerical integration may be necessary for continuous random effects; it should be checked by increasing integration accuracy and confirming that the marginal hazard is stable.

A useful diagnostic is to compare the original random-effects distribution with the implied distribution among survivors at several times. If high-risk latent profiles become rare among modeled survivors, marginal hazards should reflect that depletion. Unexpectedly unchanged marginal hazards in a strongly heterogeneous model, or numerical estimates that vary substantially with quadrature settings, warrant investigation. Also check that cause-specific hazards are nonnegative and that the summed hazard and survival calculations use all competing causes.

A common mistake is to calculate \(E_{\mathbf b}\{\lambda_k(t\mid\mathbf b)\}\) at every time and call it the marginal cause-specific hazard. That averages over the entry distribution, not the distribution among subjects still event-free at \(t\). The correction is to weight each conditional hazard by \(S(t\mid\mathbf b)\) and divide by \(E_{\mathbf b}\{S(t\mid\mathbf b)\}\). Another mistake is to read the cause-specific hazard share as a probability of eventually experiencing that cause. It is a share of instantaneous rates among those currently event-free, not a cumulative event probability. Cause-specific and subdistribution hazards are distinct quantities, as established in the earlier material on cause-specific and subdistribution hazards.

Marginalization does not remove dependence on modeling choices: it depends on the target population, the random-effects distribution, and—when relevant—the longitudinal information used to condition that distribution. Marginal hazards are also not interchangeable with conditional hazards for estimating subject-level associations. The appropriate quantity depends on the scientific question; neither is universally preferable.

Check Your Understanding

Answer each question, then compare with the brief solutions below.

  1. Why is a marginal cause-specific hazard generally not the average conditional hazard under the entry distribution at a later time?
  2. In a two-type model, suppose the types have equal entry proportions, conditional survival to \(t\) of \(0.4\) and \(0.1\), and cause-1 hazards of \(0.2\) and \(0.8\) events per year. Calculate the marginal cause-1 hazard at \(t\).
  3. What distribution should be used when calculating a hazard conditional on observed longitudinal measurements and remaining event-free?
  4. If the marginal cause-1 and cause-2 hazards at time \(t\) are \(0.3\) and \(0.7\) events per year, what does \(0.3/(0.3+0.7)\) describe, and what does it not describe?

Solutions. (1) Event-free survival changes the latent-effect composition of the risk set, so the correct average is weighted by \(S(t\mid\mathbf b)\). (2) The denominator is \(0.5(0.4)+0.5(0.1)=0.25\); the numerator is \(0.5(0.4)(0.2)+0.5(0.1)(0.8)=0.08\). The marginal hazard is \(0.08/0.25=0.32\) events per year. (3) Start with the distribution of random effects conditional on the longitudinal measurements, then weight it by conditional event-free survival to \(t\) and normalize. (4) It is the fraction of the total instantaneous cause-specific rate due to cause 1 among those event-free at \(t\); it is not the probability of eventually experiencing cause 1.

Clinical Biostats