Tutorials › Joint Modeling of Longitudinal and Time-to-Event Data › Deriving Conditional Survival From the Hazard

The Basic Joint Model · Tutorial 134 of 697

Deriving Conditional Survival From the Hazard

Learn how a subject-specific hazard determines conditional survival through the negative integrated hazard, and how to calculate and interpret that survival for a given random-effects profile.

Advanced 11 min read

What You'll Learn

  • State the assumptions needed to obtain conditional survival from a hazard.
  • Derive the survival formula by solving the hazard-based differential equation.
  • Integrate hazards that are constant or vary with the latent trajectory.
  • Interpret the integrated hazard and conditional survival in context and with units.
  • Diagnose errors involving time variation, random effects, and numerical integration.
  • Distinguish conditional survival from a survival probability averaged over random effects.

From a Subject-Specific Hazard to Survival

In a shared random-effects joint model, a subject’s event hazard depends on the latent trajectory and on the random effects that also help describe that trajectory. Once those random effects and the covariates are fixed, the hazard describes the subject-specific instantaneous event rate over time. The corresponding event-free survival probability is determined by accumulating that hazard from the time origin to the time of interest.

This conversion is essential for interpretation: a hazard is an instantaneous rate, not a probability of having an event over an interval. Conditional survival gives the probability that the event time exceeds a specified time, for a subject with a specified random-effects profile and covariate values.

Definition: Let \(T_i\) be subject \(i\)’s event time, \(b_i\) their shared random effects, and \(w_i\) their event-submodel covariates. The conditional survival function is \(S_i(t\mid b_i,w_i)=P(T_i>t\mid b_i,w_i)\). The conditional cumulative hazard is \(H_i(t\mid b_i,w_i)=\int_0^t\lambda_i(u\mid b_i,w_i)\,du\), where \(\lambda_i(u\mid b_i,w_i)\) is the subject-specific hazard at time \(u\), conditional on the random effects and covariates.

For the current-value shared-random-effects model, the hazard can be written \(\lambda_i(t\mid b_i,w_i)=\lambda_0(t)\exp\{\gamma^\mathsf{T}w_i+\alpha m_i(t;b_i)\}\). Here \(\lambda_0(t)\) is the baseline hazard, \(\gamma\) is the event-submodel covariate coefficient vector, \(\alpha\) is the current-value association parameter, and \(m_i(t;b_i)\) is the latent longitudinal mean at time \(t\) for the specified random effects. The exponential form ensures a nonnegative hazard. Conditional on \(b_i\), the latent trajectory is specified, so the hazard can be treated as a function of time.

Deriving the Conditional Survival Formula

Assume that, on the time range being considered, \(S_i(t\mid b_i,w_i)\) is locally absolutely continuous and satisfies \(S_i'(t\mid b_i,w_i)=-\lambda_i(t\mid b_i,w_i)S_i(t\mid b_i,w_i)\) almost everywhere, with a nonnegative, locally integrable conditional hazard. Assume also that there is no point mass at time zero. The time origin is the start of the risk period, so \(S_i(0\mid b_i,w_i)=1\).

For almost every \(t\), as \(\Delta t\) decreases to zero, the conditional probability of an event over an interval of length \(\Delta t\), given that the subject is event-free at time \(t\), is \(\lambda_i(t\mid b_i,w_i)\Delta t+o(\Delta t)\). Thus, up to a term negligible relative to \(\Delta t\), survival at \(t+\Delta t\) equals survival at \(t\) multiplied by one minus that conditional event probability. This gives the differential equation below, which holds almost everywhere.

$$ \frac{d}{dt}S_i(t\mid b_i,w_i) =-\lambda_i(t\mid b_i,w_i)S_i(t\mid b_i,w_i), \qquad S_i(0\mid b_i,w_i)=1. $$

For positive survival, divide by \(S_i(t\mid b_i,w_i)\) and integrate from 0 to \(t\). The initial condition determines the integration constant.

$$ \begin{aligned} \frac{d}{dt}\log S_i(t\mid b_i,w_i) &=-\lambda_i(t\mid b_i,w_i),\\ \log S_i(t\mid b_i,w_i)-\log S_i(0\mid b_i,w_i) &=-\int_0^t\lambda_i(u\mid b_i,w_i)\,du,\\ S_i(t\mid b_i,w_i) &=\exp\left\{-\int_0^t\lambda_i(u\mid b_i,w_i)\,du\right\} =\exp\{-H_i(t\mid b_i,w_i)\}. \end{aligned} $$
Theorem: Under the stated absolute-continuity and integrability assumptions, conditional survival is the exponential of the negative integrated conditional hazard. Because the hazard is nonnegative, \(H_i(t\mid b_i,w_i)\) is nondecreasing and \(S_i(t\mid b_i,w_i)\) is nonincreasing, with values between 0 and 1.

The cumulative hazard is dimensionless: a hazard measured in events per year is integrated over time measured in years. The result is not itself an event probability. Instead, the conditional probability of an event by time \(t\) is \(1-S_i(t\mid b_i,w_i)\), provided the event time is defined from the same time origin.

Worked Calculations

Worked Example: Constant Subject-Specific Hazard

Suppose a hypothetical subject has a constant baseline hazard of \(0.04\) per year and a constant event-submodel linear predictor of \(0.5\). Calculate the conditional probability of remaining event-free for three years.

The conditional hazard is constant: \(\lambda_i(t\mid b_i,w_i)=0.04\exp(0.5)\) per year. Since \(\exp(0.5)\approx1.64872\), this is approximately \(0.06595\) per year. The cumulative hazard over three years is \(H_i(3\mid b_i,w_i)=\int_0^3 0.04\exp(0.5)\,du=3(0.04)(1.64872)=0.19785\).

Therefore, \(S_i(3\mid b_i,w_i)=\exp(-0.19785)\approx0.8205\). For this specified random-effects profile and covariate value, the model assigns about an 82.05% probability of remaining event-free beyond three years. The corresponding probability of an event by three years is \(1-0.8205=0.1795\), or about 17.95%.

Worked Example: Integrating a Time-Varying Current-Value Hazard

Consider a hypothetical subject with conditional hazard \(\lambda_i(u\mid b_i,w_i)=0.02\exp(1+0.12u)\) per year for \(0\leq u\leq2\) years. Calculate conditional survival at two years. Here \(u\) is measured in years, and \(0.12\) has units of inverse years so the exponent is dimensionless.

The integrated hazard is \(H_i(2\mid b_i,w_i)=\int_0^2 0.02\exp(1+0.12u)\,du\). Factor out the constant \(\exp(1)\), then integrate the exponential function:

$$ \begin{aligned} H_i(2\mid b_i,w_i) &=0.02e\left[\frac{e^{0.12u}}{0.12}\right]_0^2\\ &=\frac{0.02e}{0.12}(e^{0.24}-1)\\ &\approx\frac{0.02(2.71828)}{0.12}(1.271249-1)\\ &\approx0.1229. \end{aligned} $$

Thus \(S_i(2\mid b_i,w_i)=\exp(-0.1229)\approx0.8844\). The subject’s conditional probability of remaining event-free beyond two years is about 88.44%. The hazard increases over time in this example, so the integrated hazard must account for its value throughout the interval rather than using only its value at time two.

Worked Example: A Linear Latent Trajectory

Suppose a hypothetical subject’s latent trajectory is \(m_i(t;b_i)=1+0.5t\), the baseline hazard is constant at \(0.03\) per year, and \(\alpha=0.4\). Let the covariate contribution \(\gamma^\mathsf{T}w_i\) equal zero. Calculate conditional survival at four years.

Substituting the latent trajectory into the hazard gives \(\lambda_i(u\mid b_i,w_i)=0.03\exp\{0.4(1+0.5u)\}=0.03\exp(0.4+0.2u)\) per year. Integrating from zero to four years,

$$ \begin{aligned} H_i(4\mid b_i,w_i) &=\int_0^4 0.03e^{0.4+0.2u}\,du\\ &=\frac{0.03e^{0.4}}{0.2}(e^{0.8}-1)\\ &\approx0.15(1.49182)(1.22554)\\ &\approx0.2742. \end{aligned} $$

The conditional survival is \(\exp(-0.2742)\approx0.7601\). For this random-effects profile, the model therefore gives about a 76.01% probability of remaining event-free beyond four years. The calculation uses the latent trajectory in the hazard; it does not replace that trajectory with a noisy observed biomarker measurement.

Checking the Calculation and Its Assumptions

A valid conditional survival curve must start at one, remain in the interval from zero to one, and never increase with time. These properties follow directly from \(H_i(0\mid b_i,w_i)=0\), the nonnegative hazard, and \(S_i(t\mid b_i,w_i)=\exp\{-H_i(t\mid b_i,w_i)\}\). They are useful checks on algebra and numerical integration. A computed survival above one or an increasing survival curve signals an error, such as a sign mistake in the exponent or a negative cumulative hazard.

The time scale and units must also agree. If time is in years, a hazard stated per month cannot be integrated against years without conversion. The exponent in the hazard model must be dimensionless, and the integrated hazard must be dimensionless. For a time-varying hazard, integrating the function over the interval is necessary; multiplying its endpoint value by the interval length is generally incorrect.

The formula is a conditional result: \(b_i\) and \(w_i\) are held fixed. It does not, by itself, provide survival averaged over the population distribution of random effects. That marginal survival requires averaging the conditional survival over that distribution, a different operation from calculating survival for one specified profile. Nor does the formula require a censoring assumption as a mathematical identity; censoring assumptions matter when estimating the model from observed follow-up.

Common Pitfalls, Alternatives, and Limitations

  • Using the hazard as if it were a probability. A hazard has units of inverse time and can exceed one. Conditional survival comes from exponentiating the negative integral, not from subtracting a hazard value from one.
  • Ignoring time variation. When the latent trajectory changes, the current-value hazard can change too. Use the integral over the full interval, analytically when possible or with a suitable numerical integration method.
  • Using the observed biomarker in place of the latent trajectory. The shared-random-effects event submodel conditions on the latent process specified by the model. A noisy observed measurement is not automatically the same quantity.
  • Confusing conditional and marginal survival. Survival for fixed random effects is not generally equal to survival evaluated at average random effects. In general, averaging \(\exp\{-H_i(t\mid b_i,w_i)\}\) over \(b_i\) is not the same as exponentiating the cumulative hazard calculated at an average profile.

A constant hazard permits the shortcut \(H_i(t)=t\lambda_i\). For a changing hazard, direct integration is the defining method; numerical quadrature may be needed if the baseline hazard or latent trajectory has no convenient antiderivative. Numerical integration should be checked by refining the integration grid or comparing with an independent calculation when feasible.

The result depends on the specified hazard model and its conditioning assumptions. Misspecification of the baseline hazard, the latent trajectory, or the association structure can produce a mathematically correct integral of a scientifically inadequate hazard. Conditional survival also does not account automatically for uncertainty in estimated parameters or random effects; plugging in estimates yields a fitted conditional curve, not a complete uncertainty interval.

Check Your Understanding

Answer each question, then compare with the solutions below.

  1. If a conditional hazard is constant at \(0.01\) per year for five years, what are the cumulative hazard and conditional survival at five years?
  2. Why is \(\lambda_i(t\mid b_i,w_i)t\) generally not the cumulative hazard when the hazard changes with time?
  3. For a nonnegative conditional hazard, should conditional survival increase, decrease, or remain constant over time? Explain.
  4. Why is survival calculated at the mean random-effects profile generally not equal to population-average survival?

Solutions. (1) \(H_i(5)=5(0.01)=0.05\), so \(S_i(5)=e^{-0.05}\approx0.9512\). (2) That product treats the hazard as constant at its value at time \(t\); the cumulative hazard is \(\int_0^t\lambda_i(u\mid b_i,w_i)\,du\), which accounts for all values over the interval. (3) It cannot increase, because its derivative is \(-\lambda_i(t\mid b_i,w_i)S_i(t\mid b_i,w_i)\leq0\); it is constant only where the hazard is zero. (4) The exponential transformation is nonlinear, so averaging conditional survival over random effects generally differs from evaluating survival at an average random-effects profile.

Clinical Biostats