Tutorials › Bayesian Clinical Trials › Hierarchical Survival Models For Time-To-Event Baskets

Hierarchical Models and Basket Trials · Tutorial 475 of 696

Hierarchical Survival Models For Time-To-Event Baskets

You will specify a hierarchical model for basket-specific log-hazard ratios, calculate conditional shrinkage, and assess when borrowing is compatible with time-to-event data.

Advanced 11 min read

What You'll Learn

  • Define a basket-specific treatment effect as a log-hazard ratio under proportional hazards.
  • State the survival and exchangeability assumptions required for hierarchical borrowing.
  • Use a normal approximation to subgroup log-hazard-ratio estimates and their standard errors.
  • Derive and calculate the conditional normal-normal shrinkage update.
  • Distinguish conditional shrinkage calculations from inference that also estimates hyperparameters.
  • Recognize sparse-event, censoring, and proportional-hazards problems that can undermine the model.

Why Model Time to Event Across Baskets?

In a basket trial, several clinically defined subgroups may receive the same intervention, but each subgroup can have relatively few events. Separate survival analyses avoid borrowing across subgroups, yet their treatment-effect estimates can be imprecise. A hierarchical model offers a middle ground: it allows each subgroup its own treatment effect while representing those effects as related through a distribution. Subgroups with limited information can then be pulled toward the distribution's center, while subgroups with stronger evidence are less affected.

For a time-to-event endpoint, this borrowing must be defined on a scale that retains the survival interpretation. Here the subgroup parameter is a log-hazard ratio, so exponentiating it gives a hazard ratio. The model concerns relative instantaneous event rates among patients still at risk; it does not directly model differences in survival probabilities or median survival times.

Definition: Let \(j=1,\ldots,J\) index baskets and let \(A_{ij}\) equal 1 for a patient assigned to treatment and 0 for control. Under a proportional-hazards model, \(\beta_j\) is the treatment log-hazard ratio in basket \(j\), and \(\exp(\beta_j)\) is its hazard ratio. A hierarchical model assigns the basket effects a shared distribution, commonly \(\beta_j\mid\mu_\beta,\tau\sim N(\mu_\beta,\tau^2)\). Here \(\mu_\beta\) is the distribution's mean and \(\tau\) describes between-basket variation in log-hazard ratios.

A Survival Model and Its Assumptions

One useful specification is a stratified proportional-hazards model:

$$ h_{ij}(t\mid A_{ij})=h_{0j}(t)\exp(A_{ij}\beta_j). $$

The baseline hazard \(h_{0j}(t)\) may differ across baskets. Within basket \(j\), however, the treatment hazard is assumed to be proportional to the control hazard over time, with ratio \(\exp(\beta_j)\). The hierarchical distribution relates the \(\beta_j\) values; it does not require patients in different baskets to share the same baseline hazard.

A standard analysis also needs randomization or appropriate control of confounding for the treatment comparison, a correctly defined event and time origin, and censoring that is independent of the event time conditional on modeled treatment and covariates. The proportional-hazards assumption means the treatment hazard ratio does not change with time within a basket. If it does change, one constant \(\beta_j\) can be a misleading summary. The hierarchical assumption adds a different requirement: the basket effects are adequately represented by a common distribution. In particular, that distribution should be clinically defensible for the baskets being combined.

Often, each basket first supplies an estimate \(y_j\) of its log-hazard ratio and an estimated standard error \(s_j\). When the number of events is adequate and the estimator is approximately normal, the sampling model is

$$ y_j\mid\beta_j\ \dot{\sim}\ N(\beta_j,s_j^2). $$

The dot indicates an approximation. For example, \(y_j\) may be a stratified Cox estimate from the basket's randomized comparison. A normal likelihood is convenient and makes the borrowing mechanism visible, but it can be poor with very sparse events, extreme estimates, or separation-like behavior. A fully specified survival likelihood is then preferable to relying on a normal approximation.

Worked Example: Obtaining a Basket Log-Hazard-Ratio Estimate

Suppose a hypothetical basket has 18 observed events during 120 person-years in the treatment arm and 24 events during 110 person-years in the control arm. For illustration, assume constant hazards within each arm and independent event counts with person-time exposures. Also assume censoring is noninformative for this rate calculation. These assumptions give a simple rate-based estimate; they are not a substitute for checking proportional hazards in a more general survival analysis.

The estimated treatment and control event rates are \(18/120=0.1500\) and \(24/110=0.2182\) events per person-year. Their ratio estimates the hazard ratio:

$$ \widehat{\mathrm{HR}}_j= \frac{18/120}{24/110}=0.6875, \qquad y_j=\log(0.6875)\approx -0.3747. $$

For independent Poisson event counts with fixed exposures, the usual large-sample approximation to the variance of the log rate ratio is \(1/d_T+1/d_C\), where \(d_T\) and \(d_C\) are the event counts in the two arms. Thus:

$$ s_j\approx\sqrt{\frac{1}{18}+\frac{1}{24}} =\sqrt{\frac{7}{72}}\approx 0.3118. $$

The estimate is below zero on the log scale, corresponding to a hazard ratio below 1 and a lower estimated event hazard in the treatment arm. It is imprecise: the standard error is about 0.312 log-hazard-ratio units. This calculation estimates a relative rate, not an absolute survival benefit, and its constant-hazard approximation should not be interpreted as evidence that the proportional-hazards assumption holds in actual data.

How the Hierarchical Model Shrinks an Estimate

Conditional on fixed values of \(\mu_\beta\) and \(\tau\), combine the normal sampling model with the normal distribution for \(\beta_j\). The posterior distribution for one basket effect is normal. Its variance is the reciprocal of the sum of the data precision and prior precision; its mean is a precision-weighted average of the observed estimate and the distribution mean.

$$ V_j=\left(\frac{1}{s_j^2}+\frac{1}{\tau^2}\right)^{-1}, \qquad E(\beta_j\mid y_j,\mu_\beta,\tau) =V_j\left(\frac{y_j}{s_j^2}+\frac{\mu_\beta}{\tau^2}\right). $$

Equivalently, the posterior mean is \((1-w_j)\mu_\beta+w_jy_j\), where \(w_j=\tau^2/(\tau^2+s_j^2)\). A small standard error gives a larger \(w_j\), so the basket estimate retains more of its own information. A large standard error gives a smaller \(w_j\), so the posterior mean lies closer to \(\mu_\beta\). If \(\tau\) is large relative to \(s_j\), effects are allowed to differ substantially and shrinkage is weaker. If \(\tau\) approaches zero, the model approaches a common treatment effect, subject to how \(\mu_\beta\) is estimated.

This update is conditional: it treats the hyperparameters as known. In a complete Bayesian analysis, uncertainty about \(\mu_\beta\) and \(\tau\) is represented by hyperpriors and integrated into the posterior. That uncertainty can widen posterior intervals and alter shrinkage. Plugging in a single estimated heterogeneity value and reporting the conditional normal interval alone can therefore understate uncertainty.

Justification: The conditional posterior density is proportional to the product of the normal likelihood and normal prior. Collecting the terms involving \(\beta_j\), its exponent is \(-\frac{1}{2}\{(y_j-\beta_j)^2/s_j^2+(\beta_j-\mu_\beta)^2/\tau^2\}\). The coefficient of \(\beta_j^2\) is \(1/s_j^2+1/\tau^2\), and the linear coefficient is \(y_j/s_j^2+\mu_\beta/\tau^2\). Completing the square gives the variance \(V_j\) and mean displayed above. This derivation explains why the update weights are precisions, not sample sizes directly.

Worked Example: Conditional Shrinkage for One Basket

Consider a hypothetical basket with \(y_j=-0.511\) and sampling variance \(s_j^2=0.0900\). For illustration, condition on \(\mu_\beta=-0.20\) and \(\tau=0.25\), so \(\tau^2=0.0625\). These are fixed hyperparameter values for this calculation, not estimates from the example data.

The conditional posterior variance and mean are:

$$ V_j=\left(\frac{1}{0.0900}+\frac{1}{0.0625}\right)^{-1} =\frac{9}{244}\approx 0.03689, $$
$$ E(\beta_j\mid y_j,\mu_\beta,\tau) =\frac{9}{244}\left(\frac{-0.511}{0.0900} +\frac{-0.20}{0.0625}\right) =\frac{-799}{2440}\approx -0.3275. $$

The observed estimate \(-0.511\) is pulled toward the distribution mean \(-0.20\), yielding a conditional posterior mean of about \(-0.3275\). The conditional posterior standard deviation is \(\sqrt{9/244}\approx0.1921\). A conditional 95% normal credible interval is:

$$ -0.327459\pm1.96(0.192055) \approx[-0.7039,\ 0.0490]. $$

Conditional on the stated hyperparameters and model, this interval contains 95% posterior probability for \(\beta_j\). It includes zero, so it does not indicate a clearly nonzero log-hazard ratio at this interval level. Exponentiating the posterior mean gives a hazard ratio of about \(\exp(-0.3275)=0.7207\), but this is not the same as the posterior mean hazard ratio. The interval on the hazard-ratio scale is obtained by exponentiating its endpoints, approximately \([0.4946,1.050]\).

Updating the Shared Mean

The common center also reflects the observed baskets. Conditional on \(\tau\), the marginal model for an estimate is \(y_j\mid\mu_\beta,\tau\sim N(\mu_\beta,\tau^2+s_j^2)\). With a normal prior on \(\mu_\beta\), this gives a normal conditional posterior. The basket estimates contribute according to their marginal variances, which include both sampling uncertainty and between-basket variation.

Worked Example: Updating the Hierarchical Center

Suppose two hypothetical basket estimates are \(y_1=-0.511\) and \(y_2=0.0953\). Conditional on a fixed \(\tau=0.20\), let their sampling variances be \(0.0625\) and \(0.0900\), respectively. Their marginal variances are therefore \(0.1025\) and \(0.1300\). Take the prior \(\mu_\beta\sim N(0,0.30^2)\).

The posterior variance is the reciprocal of the prior precision plus the two marginal precisions:

$$ V_\mu=\left(\frac{1}{0.30^2}+\frac{1}{0.1025}+\frac{1}{0.1300}\right)^{-1} \approx 0.03501. $$

The posterior mean is:

$$ E(\mu_\beta\mid y_1,y_2,\tau) =V_\mu\left(\frac{0}{0.30^2} +\frac{-0.511}{0.1025}+\frac{0.0953}{0.1300}\right) \approx 0.0350146(-4.25229) \approx -0.1489. $$

The conditional posterior standard deviation is about \(\sqrt{0.03501}=0.1871\). The two estimates pull in opposite directions, and the more precise estimate has the greater marginal precision. This calculation still conditions on \(\tau\); it does not account for posterior uncertainty in between-basket heterogeneity.

Diagnostics, Alternatives, and Limits

Before interpreting posterior borrowing, inspect whether the model's assumptions are plausible and whether the data contain enough event information to support the chosen likelihood. Relevant checks include:

  • Proportional hazards: compare time-specific patterns, inspect suitable residual diagnostics, and consider whether treatment effects appear to change over follow-up. A single log-hazard ratio can conceal crossing or strongly time-varying hazards.
  • Censoring and follow-up: assess whether censoring could depend on prognosis or treatment beyond what the model accounts for. Differential follow-up can distort a simple rate comparison and can also compromise survival likelihood inference.
  • Event sparsity: very few events can make normal approximations to \(y_j\) unreliable. Extremely large estimates or standard errors are warnings to examine the event data and consider a patient-level survival likelihood.
  • Basket compatibility: borrowing presumes a defensible common distribution for the effects. Clinical differences or distinct treatment mechanisms may make exchangeability implausible, regardless of whether the computations converge.
  • Hyperparameter sensitivity: with few baskets, the data may provide limited information about \(\tau\). Check whether posterior conclusions are materially affected by plausible hyperprior choices and by whether the hyperparameters are estimated jointly.

An independent analysis estimates each \(\beta_j\) without borrowing. It avoids the common-distribution assumption but can be unstable when a basket has few events. Complete pooling imposes a single effect across baskets and can be efficient if effects truly agree, but it does not preserve genuine between-basket variation. A hierarchical model is between these approaches: it estimates basket-specific effects and allows partial borrowing. A patient-level survival model can use the event and censoring times more directly than a normal approximation to subgroup estimates, but still requires appropriate assumptions about hazards, censoring, and how basket effects are related.

Borrowing changes the treatment-effect estimate, not the meaning of the time scale or the hazard ratio. It does not by itself establish an effect on survival probability at a particular time, nor does a favorable hazard ratio guarantee a clinically important absolute benefit. To report survival probabilities or restricted mean survival time, those quantities must be derived from a model that specifies or estimates the relevant baseline survival information.

Common Mistakes

  • Calling a log-hazard ratio a survival-time difference. The parameter \(\beta_j\) is the logarithm of a relative hazard, not a difference in median survival or months lived.
  • Reading the conditional update as a full posterior. The normal calculation above assumes fixed \(\mu_\beta\) and \(\tau\). Jointly estimating them adds uncertainty and may change the result.
  • Assuming shrinkage proves similarity. Pulling an estimate toward a shared center is a consequence of the model, not evidence that the baskets are biologically interchangeable.
  • Treating a non-significant or interval-crossing estimate as no effect. An interval containing zero for \(\beta_j\) represents uncertainty about the effect; it does not establish that the hazard ratio is exactly 1.
  • Ignoring time-varying effects. If the hazard ratio changes materially over time, a single \(\beta_j\) may not summarize the treatment effect adequately, even if the hierarchical calculations are performed correctly.
Key takeaway: A hierarchical survival model represents basket-specific log-hazard ratios as related but not necessarily identical. Borrowing is strongest for imprecise basket estimates and depends on the survival model, exchangeability, and heterogeneity assumptions—not merely on the fact that baskets appear in the same trial.

Check Your Understanding

Answer each question, then compare your reasoning with the solutions.

  1. If \(\beta_j=-0.40\), what is the hazard ratio, and how should it be interpreted?
  2. For fixed \(\tau\), does an estimate with a smaller \(s_j\) receive more or less weight in the conditional posterior mean? Explain.
  3. Why can a conditional posterior interval understate uncertainty in a full hierarchical analysis?
  4. Name one assumption that makes a single basket log-hazard ratio inadequate and explain why.

Solutions. (1) The hazard ratio is \(\exp(-0.40)\approx0.6703\): under proportional hazards, the treatment hazard is about 0.6703 times the control hazard in that basket. (2) It receives more weight because \(w_j=\tau^2/(\tau^2+s_j^2)\) increases as \(s_j^2\) decreases. (3) The conditional interval treats \(\mu_\beta\) and \(\tau\) as known, omitting uncertainty about these hyperparameters. (4) If the treatment hazard ratio changes over time, one constant \(\beta_j\) may conceal that variation and fail to summarize the treatment effect appropriately.

Clinical Biostats