Tutorials › Bayesian Clinical Trials › Simulation Plans That Support Design Review

Regulatory Use of Bayesian Methods · Tutorial 624 of 696

Simulation Plans That Support Design Review

Learn how to turn a proposed Bayesian trial design into a prespecified, reviewable simulation plan with explicit assumptions, scenarios, decision rules and precision checks.

Intermediate 11 min read

What You'll Learn

  • Specify the trial design and Bayesian decision rule before simulating.
  • Distinguish the fitted analysis model from the data-generating assumptions.
  • Construct scenarios that test both acceptable performance and failure modes.
  • Define simulation-based performance measures and design acceptance criteria.
  • Calculate Monte Carlo uncertainty and plan enough replicates to assess it.
  • Identify diagnostics and documentation needed for a reviewable simulation.

Why a Simulation Plan Must Be Reviewable

A Bayesian trial design can depend on more than its sample size. The prior, likelihood, interim or final decision rule, and assumptions about the data-generating process all affect what the design will do. Simulation evaluates those interactions by repeatedly generating hypothetical trial data under specified conditions and applying the proposed analysis and decision rule. Its value for design review depends on whether another statistician can see what was assumed, what was simulated, and how success or failure was judged.

A simulation plan is therefore more than a statement that “many trials will be simulated.” It specifies the design to be evaluated, the scenarios, the analysis to be applied in each replicate, the performance measures, the criteria for judging the design, and checks on computational accuracy. The plan should be fixed before inspecting the simulation results. This makes the evaluation interpretable and helps distinguish a genuine design weakness from an unexamined modeling or coding choice.

Definition: A simulation plan for design review is a prespecified description of the trial design and analysis to be simulated, the data-generating scenarios, the performance measures and criteria used to evaluate the design, and the computational procedures and checks used to produce the results. A scenario is a specific set of assumptions under which hypothetical trial data are generated.

Specify the Design Before Generating Data

The plan should first identify the exact design being evaluated. State the target population and clinical question, the planned enrollment and follow-up, the endpoint and its timing, the analysis model and prior, and the decision rule. If the design includes interim analyses, adaptation, or early stopping, describe the schedule and rules sufficiently to reproduce them. Simulation must apply the proposed rules as written; it must not quietly replace them with a simpler analysis.

Next distinguish the analysis assumptions from the data-generating assumptions. The analysis model is the method applied to each simulated data set. The data-generating assumptions describe how those data arise in a particular scenario. They need not match. Indeed, scenarios that depart from the analysis assumptions can reveal sensitivity to misspecification. State which features are deliberately varied and which are held fixed.

For example, in a single-arm trial with a binary endpoint, a simple analysis might assume independent Bernoulli outcomes with response probability \(p\). A scenario may generate each participant’s outcome independently with a specified true response probability. This setup assumes a fixed sample size, complete endpoint ascertainment, identical response probability across participants, and no dependence between outcomes. If the proposed trial has staggered enrollment, missing outcomes, or multiple interim looks, those features must either be represented in the simulation or explicitly excluded with a rationale. A model that omits a design feature cannot evaluate its consequences.

Scenarios should be chosen to answer the regulatory and clinical question, not merely to make simulation convenient. Include conditions under which the design should not declare success, conditions representing a clinically meaningful benefit, and plausible variations that could undermine performance. For a decision threshold, a scenario at or near the threshold is often especially informative. Scenario assumptions should be clinically interpretable and traceable to stated evidence or judgments; a large number of arbitrary parameter combinations is not a substitute for a justified scenario set.

Worked Example: Writing a Reproducible Single-Arm Design Specification

Consider a hypothetical trial with 40 participants and a binary response endpoint. The analysis uses a \(\operatorname{Beta}(1,1)\) prior for the response probability \(p\) and a binomial likelihood. The proposed final rule declares success if the posterior probability that \(p\) exceeds \(0.20\) is at least \(0.95\). State what the plan must calculate for one data set and verify the rule on a hypothetical outcome.

The model and rule are specified before any data are generated. If \(X=x\) responses are observed among 40 participants, the likelihood is proportional to \(p^x(1-p)^{40-x}\). Combining this likelihood with the uniform prior gives the posterior distribution \(\operatorname{Beta}(x+1,41-x)\). The decision quantity is the posterior tail probability \(P(p>0.20\mid X=x)\), not the posterior mean alone.

Suppose, purely for illustration, that one hypothetical data set has \(x=14\) responses. The posterior is \(\operatorname{Beta}(15,27)\), so the decision quantity is:

$$ P(p>0.20\mid X=14) = P\{\operatorname{Beta}(15,27)>0.20\} \approx 0.9898. $$

Because \(0.9898\geq0.95\), this data set meets the stated success rule. This single result does not evaluate the design’s performance. A simulation plan must generate many data sets under specified true response probabilities and apply exactly this posterior calculation and rule to each one. It must also state whether outcomes are assumed independent, whether all 40 endpoints are observed, and whether the trial has any interim decisions; otherwise, the hypothetical data-generating process is not fully defined.

Choose Scenarios and Performance Measures

A scenario table makes the evaluation auditable. For every scenario, give the values or distributions used to generate relevant variables, the reason the scenario is included, and the design feature it tests. Keep a clear distinction between a parameter value used to generate data and a prior distribution used in the analysis. For example, generating data at a fixed \(p=0.20\) does not mean that the analysis treats \(p\) as known to equal \(0.20\).

Performance measures must match the question being asked. For a binary success decision, one measure is the probability of declaring success under a specified scenario. Under a clinically inadequate response rate, that probability describes false declarations of success relative to the chosen scenario; under a clinically meaningful response rate, it describes the probability of success under that scenario. Other designs may require measures such as probability of stopping early, expected enrollment, or probability of an undesirable safety outcome. Define the event and denominator precisely. A measure called “power” or “false-positive rate” is not self-explanatory unless its scenario and decision event are specified.

The plan should also state design acceptance criteria. These are prespecified standards for judging whether simulated performance is acceptable, such as a maximum tolerated probability of success in an inadequate-response scenario or a minimum probability of success in a target-benefit scenario. Such criteria are contextual design choices, not universal statistical constants. Explain their clinical or regulatory rationale and identify which scenarios each criterion governs. A point estimate near a criterion may be too uncertain to support a firm judgment, so criteria for Monte Carlo precision should be stated as well.

Worked Example: Planning the Replicate Count for a Performance Estimate

Suppose a hypothetical design will be evaluated under a scenario with true response probability \(p=0.35\). For each replicate, simulate 40 independent binary outcomes and record whether the stated Bayesian rule declares success. The performance measure is the proportion of replicates declaring success in this scenario. If 900 of 1,000 hypothetical replicates declare success, estimate the performance and its Monte Carlo standard error.

Let \(Y_r=1\) if replicate \(r\) declares success and \(Y_r=0\) otherwise. With \(R=1{,}000\) independent replicates, the estimate is:

$$ \widehat{\theta} =\frac{1}{R}\sum_{r=1}^{R}Y_r =\frac{900}{1{,}000} =0.900. $$

The replicate-level indicators are Bernoulli with success probability \(\theta\), the performance probability under this scenario. The standard error of their sample mean is approximately estimated by:

$$ \widehat{SE}_{\mathrm{MC}} =\sqrt{\frac{\widehat{\theta}(1-\widehat{\theta})}{R}} =\sqrt{\frac{0.900(0.100)}{1{,}000}} \approx 0.00949. $$

Thus the estimated probability is 0.900, with Monte Carlo standard error about 0.00949. This standard error measures simulation noise, not uncertainty about whether the scenario is clinically realistic. If the plan requires Monte Carlo standard error no larger than 0.005 for a probability estimate, a conservative replicate-count calculation uses the largest possible Bernoulli variance, \(0.25\):

$$ R\geq \frac{0.25}{0.005^2}=10{,}000. $$

This is a planning bound, not a claim that every scenario needs exactly 10,000 replicates. The plan can allocate replicates according to the precision needed for the measures and criteria, while ensuring the chosen number is adequate in scenarios near a decision threshold.

Justify the Simulation Error Calculation

The usual Monte Carlo standard error follows directly from the replicate-level indicators. Suppose the simulation uses independent replicates under one fixed scenario, and \(Y_r\) equals 1 when a defined event occurs and 0 otherwise. Then \(E(Y_r)=\theta\), the event probability, and \(\operatorname{Var}(Y_r)=\theta(1-\theta)\). The simulation estimate \(\widehat{\theta}=R^{-1}\sum_{r=1}^R Y_r\) has variance \(\theta(1-\theta)/R\), because the replicates are independent. Replacing the unknown \(\theta\) with \(\widehat{\theta}\) gives the estimated Monte Carlo standard error used above:

$$ \operatorname{Var}(\widehat{\theta}) =\frac{\theta(1-\theta)}{R}, \qquad \widehat{SE}_{\mathrm{MC}} =\sqrt{\frac{\widehat{\theta}(1-\widehat{\theta})}{R}}. $$

The bound \(\theta(1-\theta)\leq0.25\) follows from \(\theta(1-\theta)=\tfrac14-(\theta-\tfrac12)^2\), so it can be used when the performance probability is not known in advance. This calculation assumes independent simulation replicates generated under the same scenario. If replicates are dependent, or if the simulation uses a more complex sampling scheme, the simple formula may not apply without adjustment.

Worked Example: Interpreting a Borderline Scenario Result

Suppose a hypothetical plan sets a maximum acceptable probability of declaring success of 0.05 when the true response probability is \(p=0.20\). In 1,000 simulated trials under that scenario, 42 meet the Bayesian success rule. Determine what this estimate says and whether it establishes that the criterion is met.

The estimated probability is \(42/1{,}000=0.042\). Its estimated Monte Carlo standard error is:

$$ \widehat{SE}_{\mathrm{MC}} =\sqrt{\frac{0.042(1-0.042)}{1{,}000}} =\sqrt{0.000040236} \approx 0.00634. $$

A rough normal-approximation 95% interval for the simulated event probability is \(0.042\pm1.96(0.00634)\), or approximately \(0.0296\) to \(0.0544\). The point estimate is below 0.05, but this interval extends above 0.05. Therefore, these 1,000 replicates do not establish with this approximate precision that the probability is below the criterion. The plan should prescribe an adequate precision target and, if needed, a larger replicate count. It should not treat the observed simulation estimate as exact or add replicates only because the initial result was inconvenient.

Diagnostics, Reproducibility, and Alternatives

A reviewable plan includes checks capable of finding implementation errors. Specify how the analysis code will be checked against independently calculated cases, such as the posterior update in the first example. Check that simulated outcomes have the intended distributions, that the decision rule is coded with the correct inequality and boundary, and that event counts cannot exceed the number of replicates. For adaptive designs, check that each simulated path follows the stated enrollment, interim, and stopping rules. Run code on small, inspectable test cases before the full simulation.

Record the software and relevant versions, random-number generator, seed or seed-management approach, replicate count, and any numerical integration or convergence settings. A seed helps reproduce a run, but it does not by itself validate the code or guarantee agreement across software environments. Where computation is stochastic, independent reruns or carefully selected test cases can help detect instability. The plan should say what happens if a computation fails, including how failed replicates are identified and handled; silently dropping them can bias an estimate.

Simulation is often preferable to a simple analytic calculation when the trial has complex decision rules, repeated looks, adaptation, or a posterior calculation that makes an exact operating probability difficult to obtain. When a reliable analytic calculation is available, it can be a useful check or a more efficient alternative for the corresponding performance quantity. Simulation complements, rather than replaces, justification of the prior, clinical assumptions, and decision threshold. Sensitivity Analyses for Regulatory Robustness addresses variation in assumptions; the simulation plan should make clear which such variations are represented as scenarios and how they enter the data-generating process.

Common warning signs include a scenario set that omits the decision boundary, a success measure with no defined event, results reported without a replicate count, unexpectedly different results across reruns, and implementation code that does not reproduce simple known cases. Another failure is to generate data from exactly the analysis model in every scenario and then treat that agreement as evidence of robustness. A well-matched scenario tests basic behavior, but deliberately challenging, plausible scenarios are needed to examine departures from the model.

Key takeaway: A useful simulation plan fixes the design, analysis, scenarios, performance measures, decision criteria, and computational checks in advance. Simulation estimates performance under stated assumptions; it cannot establish that those assumptions are true.

Check Your Understanding

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

  1. In a single-arm trial with 40 participants and a \(\operatorname{Beta}(1,1)\) prior, what is the posterior distribution after 12 responses? What must be compared with the decision threshold if the rule concerns \(P(p>0.20\mid X)\)?
  2. A simulation estimates a performance probability of 0.80 from 4,000 independent replicates. Calculate its estimated Monte Carlo standard error.
  3. Why is a scenario with a true response probability exactly at the clinical inadequacy boundary often important?
  4. A design has an estimated false-success probability of 0.047 under an inadequate-response scenario, but its Monte Carlo uncertainty is large enough that values above 0.05 remain plausible. What should the plan or evaluation do?

Solutions. (1) The posterior is \(\operatorname{Beta}(13,29)\), since the posterior parameters are \(1+12\) and \(1+40-12\). Compare the posterior tail probability \(P(p>0.20\mid X=12)\) with the prespecified threshold; the posterior mean is not a substitute for that probability. (2) Use \(\sqrt{0.80(0.20)/4{,}000}=\sqrt{0.00004}\approx0.00632\). (3) It tests behavior at the boundary that separates acceptable from inadequate performance; a design can appear satisfactory away from the boundary while behaving undesirably near it. (4) Do not declare the criterion satisfied from the point estimate alone. Follow the prespecified Monte Carlo precision rule, increase the replicate count if the plan permits, and judge the resulting estimate against the criterion while accounting for simulation uncertainty.

Clinical Biostats