Tutorials › Model-Informed Drug Development (MIDD) › Simulating Response-Adaptive Randomization

Clinical Trial Simulation · Tutorial 303 of 596

Simulating Response-Adaptive Randomization

Build a simulation that reproduces the allocation process and outcome delays, then evaluate the trade-offs between response-adaptive and fixed randomization.

Advanced 12 min read

What You'll Learn

  • Define a response-adaptive allocation rule that uses only outcomes available at each assignment.
  • Represent changing enrollment and outcome delays in a trial simulation.
  • Calculate expected allocation and exposure to an inferior treatment arm.
  • Compare simulated power and type I error with fixed randomization.
  • Diagnose delayed-feedback, allocation, and inference problems.

Why Simulate Response-Adaptive Randomization?

In fixed randomization, an allocation ratio is chosen in advance and does not change in response to trial outcomes. Response-adaptive randomization changes future assignment probabilities using accumulating response information. The motivation is to assign more participants to arms that appear to perform better. But an early difference may be chance, and a response may take time to observe. Enrollment rate and outcome delay therefore affect which information can influence each assignment.

Simulation makes these features explicit. A useful comparison asks more than whether adaptation raises the allocation to a promising arm. It asks whether the full design preserves acceptable type I error, achieves adequate power, reduces exposure to an inferior active treatment, and remains workable under plausible enrollment and response-delay patterns.

Definition: In response-adaptive randomization, the probability of assigning a new participant to an arm is updated using response information available at that assignment time. A valid simulation represents the order of enrollment, assignment, response generation, and response availability; information from an outcome that has not yet become available cannot be used.

Specify the Trial and Allocation Rule

Before simulating, define the arms, endpoint, enrollment process, response model, response-delay model, allocation rule, and final analysis. For a two-arm example, let \(C\) denote control and \(T\) an experimental treatment. Suppose the endpoint is binary, with success probabilities \(p_C\) and \(p_T\). The model should specify how each participant's outcome is generated under their assigned arm, as well as when that outcome becomes available for allocation decisions.

The rule below is a simple illustrative algorithm, not a universally preferred design. Let \(s_j\) and \(n_j\) be the numbers of successes and completed outcomes in arm \(j\), among outcomes available at the time of an assignment. Use a smoothed response estimate \(\tilde p_j=(s_j+1)/(n_j+2)\). Then set the probability of assigning the next participant to \(T\) to

$$ q_T=\min\{0.8,\max[0.2,\ 0.5+0.8(\tilde p_T-\tilde p_C)]\}, \qquad q_C=1-q_T. $$

The smoothing keeps an arm's estimate defined even before it has completed outcomes; the probability limits ensure each arm retains at least a 0.2 chance of assignment. The design begins at equal allocation when there is no response information. A real protocol would justify its specific rule, tuning constant, and limits in advance.

Assumptions must match the intended trial. For example, this simple setup assumes each outcome is generated according to the assigned arm and the specified response model, participants do not affect one another's outcomes, and the simulated delay mechanism is plausible. If response probabilities vary over calendar time or by participant characteristics, that variation must also be represented if it could affect allocation or performance. The assignment probabilities must be applied sequentially, using only outcomes already available.

Worked Example: Updating an Allocation Probability With Delayed Outcomes

Suppose that at a particular assignment time, 10 control outcomes are complete, with 6 successes, and 8 treatment outcomes are complete, with 3 successes. Other enrolled participants have not yet reached their response assessment. Calculate the next treatment assignment probability using the rule above.

The smoothed estimates use completed outcomes only:

$$ \tilde p_C=\frac{6+1}{10+2}=\frac{7}{12}=0.5833,\qquad \tilde p_T=\frac{3+1}{8+2}=\frac{4}{10}=0.4000. $$

Thus the unbounded update is \(0.5+0.8(0.4000-0.5833)=0.3533\). This lies between 0.2 and 0.8, so the limits do not change it: \(q_T=0.3533\) and \(q_C=0.6467\). The next participant has a 35.33% assignment probability to treatment. Pending outcomes are not counted, even if those participants have already enrolled.

Simulate the Sequence, Not Just the Final Sample

A trial simulation should reproduce the sequence of events for each participant. One implementation maintains an enrollment calendar and a queue of outcomes that will become available at specified future times. At each enrollment, it first makes available any responses whose delay has elapsed, calculates the current allocation probabilities, randomizes the assignment, and schedules the new outcome for its response time. Enrollment can change over calendar time, and delays can vary across participants or arms if that is plausible.

1
Generate enrollment times.
Represent the planned accrual pattern, including any expected ramp-up, pause, or change in recruitment rate.
2
Update available information.
At each assignment time, include only responses whose outcomes have become available under the simulated delay model.
3
Randomize and generate outcomes.
Apply the prespecified allocation probabilities, generate each response under the assigned arm, and schedule its availability time.
4
Analyze and record the trial.
At the planned end of follow-up, apply the prespecified final analysis and record power, error, allocation, and safety-related design summaries.

Repeat the sequence under a null scenario, where \(p_T=p_C\), and under alternatives of clinical interest. Also vary enrollment and delay assumptions to check whether the design behaves acceptably when feedback is slower or recruitment changes. In every replicate, apply the same analysis planned for the trial; otherwise the simulation evaluates a different design from the one intended.

Worked Example: Expected Exposure Under Changing Enrollment

Consider five successive enrollment cohorts of 8, 8, 12, 16, and 20 participants. Assume treatment is inferior in this scenario and that, because only completed responses can guide adaptation, the treatment probabilities set for these cohorts are 0.50, 0.45, 0.30, 0.25, and 0.20. Calculate the expected number assigned to the inferior treatment arm.

For a cohort of size \(N_k\) assigned with treatment probability \(q_{T,k}\), the expected treatment count is \(N_kq_{T,k}\). Summing over cohorts gives:

$$ 8(0.50)+8(0.45)+12(0.30)+16(0.25)+20(0.20) =4+3.6+3.6+4+4=19.2. $$

The expected total enrollment is \(8+8+12+16+20=64\). Fixed 1:1 randomization would have an expected 32 assignments to treatment; this adaptive schedule has an expected 19.2, or \(19.2/64=0.3000\) of participants. The calculation is an expectation, not a guarantee for any one trial: actual assignments are random. The assumed probabilities also reflect delayed feedback; they should come from the allocation rule applied to the simulated information history, not be chosen after seeing outcomes.

Compare Operating Characteristics

For each design, estimate power as the proportion of simulated alternative-scenario trials that reject \(H_0\) at the prespecified \(\alpha\). Estimate the type I error rate as the proportion of null-scenario trials that reject \(H_0\). Also summarize allocations by arm, including the expected number and proportion assigned to an inferior active arm in scenarios where one exists. Report the scenario, analysis method, number of replicates, and uncertainty in the simulation estimates.

For an estimated rejection proportion \(\hat r\) from \(R\) independent simulation replicates, the Monte Carlo standard error is \(\sqrt{\hat r(1-\hat r)/R}\). It describes simulation uncertainty in the estimated operating characteristic, not uncertainty about the treatment effect in a future clinical trial. For example, estimating a type I error of 0.0500 from 10,000 replicates gives a Monte Carlo standard error of \(\sqrt{0.05(0.95)/10000}=0.00218\).

Worked Example: Reading a Hypothetical Simulation Comparison

Suppose 10,000 trials per scenario were simulated using a fixed 1:1 design and the adaptive rule above. The final analysis in both designs is the same prespecified two-sided score test at \(\alpha=0.05\). The following results are hypothetical and illustrate how to interpret a comparison.

Scenario and measureFixed 1:1Response-adaptive
Null: rejection proportion0.05080.0612
Alternative \(p_C=0.30,\ p_T=0.45\): power0.78100.7420
Harm scenario \(p_C=0.30,\ p_T=0.20\): mean treatment assignments of 20010071

Under the null, the adaptive design's estimated rejection proportion is 0.0612, with Monte Carlo standard error \(\sqrt{0.0612(1-0.0612)/10000}=0.00240\). This is a warning that the stated final test may not maintain the nominal 0.05 error rate under this adaptive design; it is not proof from one simulation that the population error rate is exactly 0.0612. Under the beneficial alternative, estimated power is 0.7420 for the adaptive design versus 0.7810 for fixed allocation. Under the harm scenario, the adaptive design assigns an average of 71 of 200 participants to treatment rather than 100. The results reveal a trade-off, not an automatic improvement: less exposure to the inferior treatment accompanies lower estimated power in the benefit scenario and a concerning null result. The design and its inferential procedure need further evaluation before use.

Diagnostics, Alternatives, and Limitations

Check that the simulation reproduces the intended assignment rule and timing. Useful diagnostics include allocation probabilities over calendar time, realized arm sizes, proportions of outcomes still pending at each assignment, and the frequency with which probability limits are reached. Under the null, inspect estimated type I error and its Monte Carlo uncertainty. If results change substantially when the enrollment rate, delay distribution, or early random variation changes modestly, the design may be sensitive to those assumptions.

A central failure mode is using outcomes as though they were immediately available. If many responses are delayed, the algorithm may repeatedly react to a small, old subset of participants. Treating pending outcomes as observed can make a simulation look more informative than the real trial could be. Another pitfall is assuming that a nominal \(\alpha\)-level test remains valid simply because it is used at the end of every replicate. Data-dependent assignment can affect the distribution of that test statistic; empirical type I error must be evaluated for the complete design and analysis. If it is not acceptable, the inferential procedure or design needs to be revised and simulated again.

Fixed randomization is the main comparison: its allocation probabilities do not respond to accumulating outcomes, making its allocation rule simpler and its arm sizes more predictable. Response adaptation can reduce assignment to an apparently inferior arm, but may increase imbalance and make results more dependent on early responses and feedback delay. Other response-adaptive algorithms differ in how strongly they react and how they constrain allocation. Comparing alternatives is meaningful only when each is simulated with the same enrollment, outcome, delay, and final-analysis assumptions.

No simulation establishes performance beyond the scenarios and models examined. Misspecified response rates, unanticipated delays, or changes in participant mix can alter adaptation and operating characteristics. Simulation results support a design decision; they do not show that assignment to a better-performing arm causes better outcomes for a given participant, nor do they remove the need for ethical and operational review.

Key takeaway: Evaluate response-adaptive randomization as a complete sequential design. Simulate the information actually available at each assignment, then compare power, type I error, and inferior-arm exposure against fixed randomization under the same plausible enrollment and delay scenarios.

Check Your Understanding

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

  1. If outcomes take two weeks to observe, which outcomes may inform an assignment made today?
  2. In 5,000 null simulations, 275 trials reject \(H_0\). What is the estimated type I error rate and its Monte Carlo standard error?
  3. In a harmful-treatment scenario, fixed allocation assigns 60 of 120 participants to treatment on average, while adaptation assigns 42. What can and cannot be concluded from this comparison?
  4. Why is it not sufficient to apply a 0.05 test to every simulated trial and assume type I error is 0.05?

Solutions. (1) Only outcomes that have become available by today's assignment time; pending outcomes cannot be used. (2) The estimate is \(275/5000=0.05500\). Its Monte Carlo standard error is \(\sqrt{0.055(0.945)/5000}=0.003224\). (3) In these simulations, the adaptive design has 18 fewer expected treatment assignments, indicating reduced exposure under the stated harmful-treatment scenario. It does not guarantee fewer assignments in every trial or establish performance under other scenarios. (4) Response-dependent assignment can change the sampling distribution of the final statistic. The type I error rate must be estimated under the null by simulating the entire allocation, delay, and analysis process.