Tutorials › Bayesian Clinical Trials › Worked Example: Time-to-Event Response Adaptation

Adaptive and Platform Designs · Tutorial 572 of 696

Worked Example: Time-to-Event Response Adaptation

Work through a Bayesian allocation update for a time-to-event endpoint, including the contribution of censored follow-up and checks on the assumptions behind the rule.

Advanced 12 min read

What You'll Learn

  • Form the exponential event-time likelihood from event counts and total observed follow-up.
  • Update Gamma event-rate priors when participants have different follow-up times or are right-censored.
  • Calculate posterior predictive event-free survival at a chosen horizon.
  • Convert predictive scores into randomized allocation probabilities with an exploration component.
  • Diagnose event coding, exposure accounting, and model assumptions that can distort an update.

Why follow-up matters at an interim

A time-to-event outcome is not summarized adequately by counting how many participants have had an event by the interim. Participants who have not yet had an event may have very different amounts of follow-up: one might have been observed for two months and another for ten. Both are event-free at the interim, but they provide different amounts of information about the event rate. A participant whose follow-up ends without an event is right-censored; that participant contributes observed event-free time, not an observed event.

This worked example constructs an allocation update at a prespecified interim using event counts and total follow-up. To keep the calculation transparent, it uses a constant-hazard exponential model and a Gamma prior. The chosen adaptation rule rewards arms with greater posterior predictive event-free survival at a specified horizon. That is appropriate when the event is undesirable. If the event is a desirable response, the score must instead be defined to reward the clinically desirable outcome, such as the probability of response by a horizon.

Definition: In a time-to-event study, an observed event contributes its event time to the participant's follow-up and increments the event count. A right-censored participant contributes the time from randomization to censoring, but does not increment the event count. Under a constant event hazard \(\lambda\), total observed follow-up \(T\) and event count \(d\) determine the likelihood contribution \(L(\lambda)\propto \lambda^d e^{-\lambda T}\), conditional on the censoring pattern.

Model and allocation rule

For each treatment arm \(j\), suppose event times have an exponential distribution with constant hazard \(\lambda_j>0\). The hazard is the instantaneous event rate among participants who have not yet experienced the event; its units are events per unit of time. The model assumes independent participants within an arm, a common hazard for participants in that arm, and independent, non-informative censoring conditional on the model. In particular, censoring times must not selectively reveal information about a participant's event risk that is absent from the model. The exponential assumption also rules out a changing hazard over time.

Use a Gamma prior with shape \(a_j\) and rate \(b_j\), written \(\lambda_j\sim\operatorname{Gamma}(a_j,b_j)\). The rate parameterization has density proportional to \(\lambda_j^{a_j-1}e^{-b_j\lambda_j}\); \(b_j\) has units of time. With \(d_j\) observed events and \(T_j\) total observed follow-up time, the posterior is \(\operatorname{Gamma}(a_j+d_j,b_j+T_j)\). Censored observations enter \(T_j\) in exactly the same way as event observations, but only event observations enter \(d_j\).

Let \(U_j(\tau)\) be the posterior predictive probability that a new participant assigned to arm \(j\) remains event-free through horizon \(\tau\). Conditional on \(\lambda_j\), this probability is \(e^{-\lambda_j\tau}\). Averaging over the posterior gives a predictive score. In this example, allocation uses a prespecified exploration mixture: with probability \(1-\epsilon\), use scores proportionally, and with probability \(\epsilon\), allocate uniformly across the \(K\) available arms. This guards against assigning zero probability to an arm.

$$ U_j(\tau)=E\{e^{-\lambda_j\tau}\mid\text{data}\} =\left(\frac{b_j+T_j}{b_j+T_j+\tau}\right)^{a_j+d_j}, \qquad \pi_j=(1-\epsilon)\frac{U_j(\tau)}{\sum_{k=1}^{K}U_k(\tau)}+\frac{\epsilon}{K}. $$

The score is a predictive survival probability, not the posterior probability that an arm is best. The allocation rule is a design choice, not a universal consequence of Bayesian updating. Its horizon, exploration fraction, model, and clinical interpretation should be chosen before using interim outcomes to change assignment.

Worked allocation update

Worked Example: Two Arms at a Fixed Interim

Consider a hypothetical two-arm trial comparing treatment A with control C. Time is measured in months, and the event is a clinically undesirable event. At a prespecified interim, eight participants have entered each arm. In A, two participants experienced events after 10 and 20 months; the other six are right-censored after 8, 10, 12, 12, 13, and 15 months of observation. Thus the event count is \(d_A=2\) and total follow-up is \(T_A=10+20+8+10+12+12+13+15=100\) person-months. In C, four events occurred after 10, 20, 30, and 40 months, and four participants were censored after 20, 25, 25, and 30 months. Thus \(d_C=4\) and \(T_C=10+20+30+40+20+25+25+30=200\) person-months. These records represent a snapshot at the same fixed interim; the censored times end at that snapshot or at another censoring time.

Give each arm the same hypothetical prior \(\operatorname{Gamma}(1,100)\), and assess event-free survival through \(\tau=12\) months. The posterior parameters follow by adding events to the shape and exposure to the rate:

$$ \lambda_A\mid\text{data}\sim\operatorname{Gamma}(1+2,100+100) =\operatorname{Gamma}(3,200),\qquad \lambda_C\mid\text{data}\sim\operatorname{Gamma}(1+4,100+200) =\operatorname{Gamma}(5,300). $$

For A, substitute the posterior shape, rate, and horizon into the predictive survival formula:

$$ U_A(12)=\left(\frac{200}{200+12}\right)^3 =\left(\frac{50}{53}\right)^3 \approx 0.8396. $$

For C, the corresponding calculation is:

$$ U_C(12)=\left(\frac{300}{300+12}\right)^5 =\left(\frac{25}{26}\right)^5 \approx 0.8219. $$

Take \(\epsilon=0.20\) and \(K=2\). The probability of assigning the next participant to A is:

$$ \pi_A=0.80\left(\frac{0.839619}{0.839619+0.821927}\right)+0.10 \approx 0.5043. $$

The probability for C is \(1-\pi_A\approx0.4957\). Thus the rule gives A a slight allocation advantage, while retaining substantial randomization. The conclusion is about this specified predictive-score rule, not strong evidence that A is superior: the scores are close, and the allocation probability is close to one half.

Why the posterior update has this form

The likelihood contribution can be seen directly. An event observed at time \(t\) has exponential density \(\lambda e^{-\lambda t}\). A participant censored after \(c\) units contributes the probability of remaining event-free through \(c\), namely \(e^{-\lambda c}\). Multiplying the contributions over participants gives one factor of \(\lambda\) for each observed event and an exponential involving the sum of all observed times. Hence \(L(\lambda)\propto\lambda^d e^{-\lambda T}\). Multiplying this by the Gamma prior density yields a kernel proportional to \(\lambda^{a+d-1}e^{-(b+T)\lambda}\), the kernel of \(\operatorname{Gamma}(a+d,b+T)\).

To obtain the predictive formula, integrate the conditional survival probability against that posterior. A Gamma distribution with shape \(a+d\) and rate \(b+T\) has Laplace transform \(E(e^{-s\lambda})=((b+T)/(b+T+s))^{a+d}\) for \(s\geq0\). Setting \(s=\tau\) gives \(U(\tau)\). This derivation shows precisely where censoring enters: it increases \(T\), and therefore updates the posterior rate, while leaving the posterior shape unchanged unless an event is observed.

1
Freeze the interim data.
Use the prespecified interim date and include only event or censoring times observed by that date.
2
Audit each arm's records.
Count observed events for \(d_j\), then add all observed event and censored follow-up times to obtain \(T_j\).
3
Update and score.
Calculate the Gamma posterior and predictive survival \(U_j(\tau)\) for the prespecified horizon.
4
Randomize using the rule.
Normalize scores, apply the exploration mixture, and verify the resulting probabilities sum to one.

Worked Example: What a Censored Participant Contributes

Worked Example: What a Censored Participant Contributes

Suppose an additional hypothetical A participant is followed for 9 months and is event-free at the fixed interim. The participant is right-censored at 9 months. Starting from the posterior in the preceding example, this observation changes the total follow-up from 100 to 109 person-months but leaves the event count at two. The updated posterior is \(\operatorname{Gamma}(3,209)\), not \(\operatorname{Gamma}(4,209)\).

At a 12-month horizon, the new predictive score is:

$$ U_A(12)=\left(\frac{209}{209+12}\right)^3 =\left(\frac{209}{221}\right)^3 \approx 0.8458. $$

This score is slightly higher than before because the additional event-free follow-up shifts the posterior toward lower hazards. It does not mean the participant is known to remain event-free for 12 months after randomization; the participant was observed event-free for 9 months, and the remaining uncertainty is represented in the posterior predictive calculation.

Worked Example: Changing the Prediction Horizon

Worked Example: Changing the Prediction Horizon

As a separate hypothetical calculation, suppose an arm has posterior \(\operatorname{Gamma}(5,200)\) and the design evaluates event-free survival through 10 months. Then:

$$ U(10)=\left(\frac{200}{200+10}\right)^5 =\left(\frac{20}{21}\right)^5 \approx 0.7835. $$

The horizon is part of the rule: it must be stated in time units and selected in advance. A score at 10 months is not interchangeable with a score at 12 months. Longer horizons generally produce lower event-free survival scores, though the effect on relative allocation between arms depends on their posterior distributions.

Checks, alternatives, and limitations

Before acting on an update, inspect the data and the model rather than treating the computed probabilities as self-validating. Confirm that the event definition and time origin are the same across arms, that time units are consistent, and that person-time is summed once per participant. Check that each event increments \(d_j\) exactly once and that each participant without an event contributes only the follow-up actually observed. A negative exposure, an impossible event time, or a sum that excludes censored participants indicates a data-processing error.

The exponential model is convenient, but its constant-hazard assumption may be implausible when event risk changes over time. Plotting event-time patterns or comparing observed rates across follow-up intervals can reveal warning signs, although sparse interim data may not diagnose the shape reliably. Informative censoring, major differences in case mix across arms, or time-varying hazards can also undermine the interpretation of the simple posterior scores. If these concerns are material, the model and allocation rule need a more suitable prespecified survival model; the calculation here should not be applied unchanged.

This method differs from several common alternatives. Equal randomization does not use interim outcomes and can be preferable when simplicity or a stable concurrent comparison is paramount. Allocating in proportion to raw event-free fractions ignores unequal follow-up and treats a short censoring time like a long one. Using the observed event rate \(d_j/T_j\) as a plug-in score does use exposure, but it does not average predictive survival over uncertainty in the hazard. The Gamma-exponential rule performs that averaging explicitly. None of these allocation choices alone establishes treatment benefit or replaces the trial's planned clinical and inferential analyses.

A common mistake is to count every participant without an event as an event-free success and ignore how long that participant was observed. The correction is to record that participant as censored at the observed follow-up time: add that time to \(T_j\), but do not add one to \(d_j\). Another mistake is to interpret \(\pi_A\approx0.5043\) as a 50.43% posterior probability that A is the better treatment. It is instead the probability of assignment to A under the specified randomized allocation rule.

Key takeaway: At a fixed interim, observed events update both the event count and total follow-up; right-censored participants update total follow-up only. The resulting predictive score depends on the posterior model and horizon, while the allocation probability also depends on the chosen randomization rule.

Check Your Understanding

Try each problem, then compare your reasoning with the solutions below.

  1. With a \(\operatorname{Gamma}(1,50)\) prior, an arm has one event and 30 person-months of total follow-up. State the posterior distribution.
  2. An event-free participant is censored after 6 months. What changes in the event count and total follow-up?
  3. For a posterior \(\operatorname{Gamma}(2,100)\), calculate predictive event-free survival at 10 months.
  4. With two arms, equal predictive scores, and \(\epsilon=0.20\), what is each arm's allocation probability under the mixture rule?
  5. Explain why the allocation probability for an arm is not the posterior probability that it is the best arm.

Solutions. (1) Add one event to the shape and 30 months to the rate: \(\operatorname{Gamma}(2,80)\). (2) The event count does not change; total follow-up increases by 6 person-months. (3) \(U(10)=(100/(100+10))^2=(10/11)^2\approx0.8264\). (4) Equal scores give a normalized score of \(0.5\) per arm, so each receives \(0.80(0.5)+0.20/2=0.50\). (5) The allocation probability is defined by the normalized predictive scores and exploration mixture. It is a probability generated by the design's assignment mechanism, not a posterior probability about which arm has the better outcome.

Clinical Biostats