
Bayesian calibration of two-arm one-stage ROPE designs with binary endpoints
Riko Kelter
Institute of Medical Statistics and Computational Biology
Faculty of Medicine
University of Cologne
Cologne, Germany
Institute of Medical Statistics and Computational Biology
Faculty of Medicine
University of Cologne
Cologne, Germany
15 September 2026
Source:vignettes/articles/bfbin2arm-twoarm-onestage-rope.Rmd
bfbin2arm-twoarm-onestage-rope.RmdOverview
This vignette illustrates Bayesian predictive and frequentist calibration of a one-stage, equal-allocation, two-arm ROPE equivalence design for a binary endpoint.
The example is motivated by a historical acute maxillary sinusitis setting in which a short-course treatment and a standard active comparator had cure rates near 0.74. The trial results are reported by Luterman et al. (2003). The objective here is methodological: to compare two different ways of calibrating the same posterior ROPE decision rule.
The treatment effect is the risk difference
where and are the control- and treatment-arm response probabilities. Practical equivalence is defined by the ROPE
with .
The posterior decision has three outcomes:
- Equivalence: .
- Meaningful difference: .
- Inconclusive: neither condition is met.
We retain weak analysis priors in all examples:
Thus, historical information is used for design-stage predictive averaging, not directly as information in the final posterior analysis.
Clinical planning distributions
Equivalence design distribution
A design prior is needed for Bayesian predictive calibration. It describes plausible future data-generating parameter values when the treatments are expected to be practically equivalent.
For this example, let the baseline response probability follow
which has mean . Let the treatment-control risk difference follow
truncated to the ROPE , and define
This joint construction concentrates predictive equivalence scenarios near , rather than treating all risk differences inside the ROPE as equally plausible.
Non-equivalence design distribution
For the Bayesian predictive false-equivalence probability, use the package’s existing truncated product-Beta non-equivalence design prior:
Before truncation, these kernels have means approximately 0.74 and 0.84, respectively. After restriction to , this provides a difficult near-boundary non-equivalence scenario.
Two distinct calibrations
The same posterior ROPE decision rule can be calibrated in different ways.
Bayesian predictive calibration
Bayesian predictive operating characteristics average conditional decision probabilities over design distributions:
and
These are prior-predictive quantities. They answer the question:
Under the specified clinical distributions for equivalence and non-equivalence, how often will this design make each decision?
They do not guarantee pointwise error control at every parameter value outside the ROPE.
Frequentist calibration
Frequentist operating characteristics condition on fixed true response probabilities. For a fixed , the equivalence probability is
In this vignette, frequentist power is evaluated at
and frequentist type-I error is approximated by a grid maximum over both ROPE boundaries:
for .
The frequentist criterion answers a different question:
What is the largest probability of declaring equivalence at the selected fixed boundary scenarios?
Importantly, note that a realistic range of success probabilities for the control arm is selected here. This range is motivated by the historical success rate of about . It is of course possible to use even stricter frequentist assumptions by allowing , though this makes little sense in the current trial setting based on the available historical data.
Bayesian predictive calibration
Design specification
The following design uses and . The equivalence threshold was selected as part of predictive calibration so that the Bayesian predictive false-equivalence probability remains at or below 0.05 while obtaining a practically sized trial.
Running this full search can take several minutes, even though it
should not take longer than about a minute on a regular desktop
computer. With parallel_backend = "psock", candidate sample
sizes are evaluated by independent R worker processes. Runtime depends
on the number of workers, available physical cores, BLAS threading, and
machine load.
design_luterman_bayesian <- design_twoarm_onestage_rope(
nmin = 80,
nmax = 240,
nstep = 1L,
delta = 0.10,
gammaeq = 0.80,
gammadiff = 0.975,
analysis_prior_C = c(1, 1),
analysis_prior_T = c(1, 1),
design_prior_eq = prior_eq_luterman,
design_prior_ne_C = design_prior_ne_C,
design_prior_ne_T = design_prior_ne_T,
calibration = "Bayesian",
targetpower = 0.80,
targettype1 = 0.05,
sustainn = 10L,
integration = "quantile",
quad_nodes = 64L,
parallel = TRUE,
parallel_backend = "psock",
ncores = n_workers,
returngrid = TRUE,
returnmatrices = TRUE,
progress = FALSE
)
design_luterman_bayesianEvaluating 161 candidate per-arm sample sizes using 8 PSOCK worker(s)...
One-stage two-arm ROPE equivalence design
Equal allocation: nC = nT
Search range per arm: 80 to 240 (step 1 )
ROPE half-width delta: 0.1
Thresholds: gammaeq = 0.8 , gammadiff = 0.975
Integration: quantile(quantile quadrature; nodes = 64 )
Calibration: Bayesian
Target predictive power: 0.8
Target predictive type-I error: 0.05
Sustain n: 10
Selected design
nC = 218 , nT = 218 , total N = 436
Predictive equivalence power: 0.8018
Predictive false-equivalence probability: 0.0434
P(meaningful difference | G1): 0.0003
P(inconclusive | G1): 0.1979
P(meaningful difference | G0): 0.3828
P(inconclusive | G0): 0.5738
Visualize the resulting design
plot(design_luterman_bayesian)
Figure 1: Visualization of the Bayesian calibrated two-arm one-stage ROPE design for a binary endpoint.
The top left panel shows the different operating characteristics for calibration, including the Bayesian power and type-I-error. The middle panel in the top row shows the posterior ROPE probability as a function of the number of successes in the control and in the treatment arm. The top right panel provides a textual summary of the design. The bottom row panels provide an overview about the analysis and design priors.
We can also plot the operating characteristics, the design priors or the heatmap separately:
plot(design_luterman_bayesian, type = "prior")
plot(design_luterman_bayesian, type = "heatmap")Interpretation
The Bayesian predictive calibration selects an equal-allocation design with
Thus, the planned trial randomizes 436 participants in total, with 218 participants assigned to each treatment arm. The final analysis uses weak analysis priors for both response probabilities, so the posterior decision is driven primarily by the trial data rather than by the historical information used to construct the design distributions.
Decision rule at the selected sample size
For the selected design, practical equivalence is declared when the posterior probability that the treatment-control risk difference lies in the ROPE is at least 0.80:
In clinical terms, the study declares equivalence only when the observed data provide at least 80% posterior probability that the absolute difference in cure probabilities is below 10 percentage points.
A meaningful difference is declared only when the posterior probability of being outside the ROPE is at least 0.975:
All remaining outcome combinations lead to an inconclusive result. Hence, the design has three possible conclusions: equivalence, meaningful non-equivalence, or inconclusive evidence.
Predictive probability of equivalence
Under the equivalence design distribution , the selected design has Bayesian predictive equivalence power
This means that, before observing the new trial data and under the specified planning distribution for clinically equivalent treatments, the trial has an approximately 80.2% probability of declaring equivalence.
The predictive probability is calculated by averaging over both sources of uncertainty represented in :
- uncertainty in the control-arm cure probability, centred near 0.74; and
- uncertainty in the treatment-control risk difference, concentrated near zero and restricted to the ROPE.
Therefore, 0.8018 is not the probability of declaring equivalence at one fixed pair . Instead, it is the expected probability of an equivalence declaration across the clinically plausible equivalence scenarios encoded by .
The design also has
and
The three probabilities approximately sum to one:
Thus, when the treatments are practically equivalent according to the planning distribution, the design is very unlikely to incorrectly declare a meaningful difference. Its main limitation under is not a false difference conclusion, but an inconclusive result: this occurs in about 19.8% of plausible equivalence scenarios.
Predictive false-equivalence probability
Under the non-equivalence design distribution , the selected design has Bayesian predictive false-equivalence probability
This is below the prespecified target of 0.05. In other words, for the clinically relevant non-equivalence scenarios represented by , the prior-predictive probability that the trial nevertheless declares equivalence is approximately 4.3%.
This quantity is a Bayesian predictive type-I-error analogue. It is an average over the non-equivalence design distribution, which in this example is restricted to and concentrates on difficult near-boundary scenarios. It should therefore be interpreted as protection against false equivalence under the prespecified clinical non-equivalence scenarios, rather than as a maximum error probability at every individual parameter value outside the ROPE.
Under , the selected design has
and
Again, these probabilities partition the possible trial decisions:
Consequently, when the treatments are meaningfully different under the specified scenarios, the design most often returns an inconclusive result rather than a positive difference conclusion. This is a direct consequence of the stringent 0.975 threshold for declaring meaningful difference. The design is therefore deliberately conservative in making a difference claim.
Practical interpretation
The selected design is appropriate if the primary development objective is to support a positive equivalence conclusion when the two treatments are expected to have similar cure probabilities and when the planning distributions and are accepted as clinically reasonable.
In particular, the design implies the following prospective commitments:
If practical equivalence is true in scenarios represented by , there is about an 80% predictive chance that the trial will conclude equivalence.
If the treatments differ by at least 10 percentage points in scenarios represented by , the predictive chance of incorrectly declaring equivalence is about 4%.
The design has a substantial probability of an inconclusive outcome, especially under . This is expected because the rule requires very strong posterior evidence to label a difference as meaningful.
A declaration of equivalence does not mean that the two cure probabilities are identical. It means that the posterior probability of an absolute risk difference smaller than 10 percentage points is at least 0.80.
An inconclusive result does not establish non-equivalence. It means that the observed data do not reach either the equivalence threshold or the stringent meaningful-difference threshold.
Scope of the Bayesian guarantee
The calibration is conditional on the ROPE, posterior thresholds, analysis priors, and design distributions used here. In particular, the 0.0434 false-equivalence probability is a prior-weighted predictive average under . It does not imply that
for every fixed parameter pair satisfying .
That stronger pointwise claim is a frequentist calibration objective and is examined separately below. Accordingly, this Bayesian design is best understood as a design optimized for predictive decision performance under explicit, clinically motivated equivalence and non-equivalence scenarios.
The frequentist calibration below will show, however, that a strict frequentist notion of the type-I-error can become very pricy in terms of the required number of patients.
Frequentist calibration
Why the threshold differs
The Bayesian predictive design above controls a prior-weighted average false-equivalence probability under . It does not control the largest fixed-parameter false-equivalence probability along the ROPE boundary.
For the same sample size and , the frequentist boundary type-I error can be much higher than the Bayesian predictive type-I error. Therefore, a more stringent equivalence threshold is used for frequentist calibration.
Here we use:
The planned pointwise frequentist equivalence scenario is . The type-I-error boundary grid uses .
Coarse frequentist-calibration search
We first run a coarse calibration by increasing the sample size by
patients via nstep = 10 as the function parameter. This
serves to find a suitable sample size range based on which we can refine
the calibration sample size range next:
design_luterman_frequentist_coarse <- design_twoarm_onestage_rope(
nmin = 100,
nmax = 500,
nstep = 10L,
delta = 0.10,
gammaeq = 0.975,
gammadiff = 0.975,
analysis_prior_C = c(1, 1),
analysis_prior_T = c(1, 1),
design_prior_eq = prior_eq_luterman,
design_prior_ne_C = design_prior_ne_C,
design_prior_ne_T = design_prior_ne_T,
calibration = "frequentist",
freq_pC = 0.74,
freq_delta = 0,
targetfreqpower = 0.80,
targetfreqtype1 = 0.05,
freq_pC_range = c(0.60, 0.85),
freq_grid_n = 201L,
sustainn = 1L,
integration = "quantile",
quad_nodes = 64L,
parallel = TRUE,
parallel_backend = "psock",
ncores = n_workers,
returngrid = TRUE,
returnmatrices = TRUE,
progress = FALSE
)
design_luterman_frequentist_coarseEvaluating 41 candidate per-arm sample sizes using 8 PSOCK worker(s)...
Sample-size search completed in 00:30.
One-stage two-arm ROPE equivalence design
Equal allocation: nC = nT
Search range per arm: 100 to 500 (step 10 )
ROPE half-width delta: 0.1
Thresholds: gammaeq = 0.975 , gammadiff = 0.975
Integration: quantile(quantile quadrature; nodes = 64 )
Calibration: frequentist
Target frequentist power: 0.8
Target frequentist type-I error: 0.05
Sustain n: 1
Selected design
nC = 410 , nT = 410 , total N = 820
Predictive equivalence power: 0.6645
Predictive false-equivalence probability: 0.0028
P(meaningful difference | G1): 0.0001
P(inconclusive | G1): 0.3354
P(meaningful difference | G0): 0.5063
P(inconclusive | G0): 0.4909
Pointwise frequentist equivalence probability: 0.8128
Boundary-grid frequentist type-I error: 0.0266
The results indicate that for in each trial arm, the frequentist constraints on power and type-I-error are satisfied.
Local integer search
After locating the first feasible coarse region, perform an integer
search around it. The following bounds are deliberately broad; adjust
them using the coarse result if necessary. Importantly, we use
nstep = 1 intead of nstep = 10 now, so every
sample size between our chosen nmin = 390 and
nmax = 420 is analyzed:
design_luterman_frequentist_local <- design_twoarm_onestage_rope(
nmin = 390,
nmax = 420,
nstep = 1L,
delta = 0.10,
gammaeq = 0.975,
gammadiff = 0.975,
analysis_prior_C = c(1, 1),
analysis_prior_T = c(1, 1),
design_prior_eq = prior_eq_luterman,
design_prior_ne_C = design_prior_ne_C,
design_prior_ne_T = design_prior_ne_T,
calibration = "frequentist",
freq_pC = 0.74,
freq_delta = 0,
targetfreqpower = 0.80,
targetfreqtype1 = 0.05,
freq_pC_range = c(0.60, 0.85),
freq_grid_n = 401L,
sustainn = 5L,
integration = "quantile",
quad_nodes = 64L,
parallel = TRUE,
parallel_backend = "psock",
ncores = n_workers,
returngrid = TRUE,
returnmatrices = TRUE,
progress = FALSE
)
design_luterman_frequentist_localEvaluating 31 candidate per-arm sample sizes using 8 PSOCK worker(s)...
Sample-size search completed in 00:30.
One-stage two-arm ROPE equivalence design
Equal allocation: nC = nT
Search range per arm: 390 to 420 (step 1 )
ROPE half-width delta: 0.1
Thresholds: gammaeq = 0.975 , gammadiff = 0.975
Integration: quantile(quantile quadrature; nodes = 64 )
Calibration: frequentist
Target frequentist power: 0.8
Target frequentist type-I error: 0.05
Sustain n: 5
Selected design
nC = 401 , nT = 401 , total N = 802
Predictive equivalence power: 0.6541
Predictive false-equivalence probability: 0.0028
P(meaningful difference | G1): 0.0001
P(inconclusive | G1): 0.3458
P(meaningful difference | G0): 0.5020
P(inconclusive | G0): 0.4952
Pointwise frequentist equivalence probability: 0.8005
Boundary-grid frequentist type-I error: 0.0267
If no feasible design is found in the local range, enlarge
nmax. Do not infer frequentist feasibility from Bayesian
predictive feasibility.
We plot the design:
plot(design_luterman_frequentist_local)
Figure 2: Visualization of the frequentist calibrated two-arm one-stage ROPE design for a binary endpoint.
Interpretation of the frequentist-calibrated design
The local integer search selects an equal-allocation design with
Thus, the frequentist-calibrated design requires 401 participants in each treatment arm, for a total of 802 randomized participants. This is substantially larger than the Bayesian predictive design, which selected participants. The increase reflects the more demanding frequentist calibration objective: the design must satisfy fixed-parameter operating-characteristic constraints rather than only prior-weighted predictive-average constraints.
The posterior decision rule remains Bayesian. In particular, equivalence is declared when
The key difference is therefore not the posterior model used to analyze the trial data, but the criterion used to select the sample size and equivalence threshold during design.
Pointwise frequentist power
The selected design is calibrated at the fixed equivalence scenario
for which the true risk difference is
At this parameter point, the probability of declaring equivalence is
Thus, if both treatments truly have a cure probability of 0.74, the planned trial has approximately 80.1% frequentist power to conclude equivalence. This meets the prespecified target of 80%.
This is a conditional, fixed-parameter statement. It does not average over a distribution of plausible response probabilities or treatment effects. The result answers the specific question:
If the true cure probabilities are both 0.74, how often would repeated trials of this design declare equivalence?
The answer is approximately 80 times in 100 repeated trials.
Boundary-grid false-equivalence probability
The frequentist type-I-error calculation evaluates scenarios on both boundaries of the ROPE:
and
over the clinically motivated control-rate range
These are the parameter configurations at which the true risk difference is exactly at the practical-equivalence boundary:
At these boundary scenarios, declaring equivalence is a false-equivalence decision under the frequentist null hypothesis. The selected design has maximum boundary-grid false-equivalence probability
This is below the prespecified target of 0.05. Therefore, within the evaluated grid of boundary scenarios, the probability of incorrectly declaring equivalence is at most approximately 2.7%.
The reported value is conservative relative to the target: it is
materially smaller than 0.05 because the sample size is determined
jointly by the power requirement, integer sample-size constraints, and
the requirement that five consecutive candidate sample sizes satisfy the
feasibility criteria (sustainn = 5L).
Meaning of sustainn = 5
The local search uses
sustainn = 5Lrather than accepting the first single feasible candidate sample size. A sample size is selected only when it is the first member of a run of five consecutive evaluated sample sizes that all meet the frequentist feasibility criteria.
This requirement reduces the chance that a design is selected solely because of an isolated numerical irregularity or a local non-monotonicity in the computed operating characteristics. Consequently, the chosen design should be interpreted as a stable feasible region in the local integer search, not merely as the first individual value that happens to cross the target.
Relation to the Bayesian operating characteristics
Although the sample size was selected using frequentist constraints, the function also reports Bayesian predictive operating characteristics for the same posterior decision rule. At , these are
and
The predictive equivalence probability of 0.6541 is lower than the 0.80 frequentist target because the two quantities address different design questions.
The frequentist power calculation fixes the true scenario at
In contrast, the Bayesian predictive calculation averages across the full equivalence design distribution , including values of and throughout the ROPE. Some of these values lie close to the ROPE boundaries, where an equivalence declaration is more difficult. Therefore, a frequentist power of approximately 80% at need not imply a Bayesian predictive equivalence probability of 80%.
Similarly, the Bayesian predictive false-equivalence probability of 0.0028 is an average over the specified non-equivalence distribution , whereas the frequentist result of 0.0267 is a maximum over the selected fixed boundary grid. The maximum is expected to be larger than a prior-weighted average when the design distribution gives appreciable weight to non-boundary scenarios.
Practical implications
The frequentist-calibrated design provides the following operating commitments under the specified design assumptions:
If the true cure probabilities are , the probability of declaring equivalence is approximately 80.1%.
If the true treatment-control difference lies on either ROPE boundary, , and the control cure probability lies in , the estimated probability of falsely declaring equivalence is no larger than approximately 2.7% on the evaluated grid.
The equivalence conclusion requires stronger posterior evidence than in the Bayesian predictive design because , rather than .
The stricter threshold and conditional error-control objective increase the required total sample size from 436 to 802 participants.
A conclusion of equivalence still does not mean that the treatment effects are exactly identical. It means that the observed data provide at least 97.5% posterior probability that the absolute difference in cure probabilities is less than 10 percentage points.
Scope of the frequentist guarantee
The reported false-equivalence probability is a numerical maximum over the specified finite boundary grid:
It is therefore an approximation to worst-case boundary error control over that clinically chosen range, rather than a formal proof of a global supremum over every possible response probability in .
The validity and relevance of this calibration depend on prespecifying:
- the ROPE half-width ;
- the equivalence threshold ;
- the fixed power scenario ;
- the control-rate range ;
- the boundary-grid density (
freq_grid_n = 401L); and - the target frequentist power and type-I-error levels.
Accordingly, this design is appropriate when the principal objective is frequentist protection against false equivalence at clinically credible ROPE boundary scenarios, while retaining a Bayesian posterior-probability decision rule for the final analysis.
Bayesian calibration with a PCE(H0) requirement
The initial Bayesian-predictive design was calibrated to achieve a high probability of declaring practical equivalence under , while limiting the predictive probability of falsely declaring equivalence under . This is appropriate when the principal objective is an equivalence claim.
However, a design can satisfy those two requirements while still having a substantial probability of an inconclusive outcome when meaningful non-equivalence is true. In the original Bayesian design with , the predictive probability of declaring meaningful non-equivalence under was only
Thus, under the non-equivalence planning distribution, the original design had only about a 38% probability of obtaining compelling evidence that the treatments differ by at least the ROPE half-width. Most of the remaining probability corresponded to an inconclusive result rather than to a false equivalence conclusion.
The targetpce_h0 argument allows this operating
characteristic to become an explicit Bayesian calibration criterion.
Under the notation used here,
denotes meaningful non-equivalence, whereas
denotes practical equivalence. The probability of compelling evidence for is therefore
Equivalently, PCE(H0) is the Bayesian predictive
probability of declaring a meaningful difference when the
non-equivalence design distribution
holds.
In the following calibration, we retain the original Bayesian requirements
and
but additionally require
The resulting design is therefore required to have at least a 50% prior-predictive probability of reaching a compelling correct non-equivalence conclusion under .
design_luterman_bayesian_pce_h0 <- design_twoarm_onestage_rope(
nmin = 80L,
nmax = 450L,
nstep = 1L,
delta = 0.10,
gammaeq = 0.80,
gammadiff = 0.975,
analysis_prior_C = c(1, 1),
analysis_prior_T = c(1, 1),
design_prior_eq = prior_eq_luterman,
design_prior_ne_C = design_prior_ne_C,
design_prior_ne_T = design_prior_ne_T,
calibration = "Bayesian",
targetpower = 0.80,
targettype1 = 0.05,
targetpce_h0 = 0.50,
sustainn = 10L,
integration = "quantile",
quad_nodes = 64L,
parallel = TRUE,
parallel_backend = "psock",
ncores = n_workers,
returngrid = TRUE,
returnmatrices = TRUE,
progress = FALSE
)
design_luterman_bayesian_pce_h0Evaluating 371 candidate per-arm sample sizes using 11 PSOCK worker(s)...
Sample-size search completed in 05:44.
One-stage two-arm ROPE equivalence design
Equal allocation: nC = nT
Search range per arm: 80 to 450 (step 1 )
ROPE half-width delta: 0.1
Thresholds: gammaeq = 0.8 , gammadiff = 0.975
Integration: quantile(quantile quadrature; nodes = 64 )
Calibration: Bayesian
Target PCE(H1): 0.8000
Maximum predictive false-equivalence probability: 0.0500
Target PCE(H0): 0.5000
Sustain n: 10
Selected design
nC = 397 , nT = 397 , total N = 794
PCE(H1), practical equivalence: 0.9174
Predictive false-equivalence probability: 0.0325
P(meaningful difference | G1): 0.0001
P(inconclusive | G1): 0.0825
PCE(H0), meaningful non-equivalence: 0.5004
P(inconclusive | G0): 0.4671
PCE(H0) target satisfied: TRUE
Interpretation
Adding a minimum probability of compelling evidence for changes the purpose of the Bayesian calibration. The design is no longer required only to support an equivalence conclusion when practical equivalence holds and to avoid false equivalence when meaningful non-equivalence holds. It is also required to have a substantial probability of reaching a compelling correct non-equivalence conclusion when holds.
In this vignette, the hypotheses are defined as
which represents meaningful non-equivalence, and
which represents practical equivalence.
The additional criterion is the predictive probability of compelling evidence for :
Equivalently, is the Bayesian predictive probability of declaring meaningful non-equivalence when the non-equivalence design distribution applies.
The new calibration requires
and additionally
The selected design has
Thus, 397 participants are allocated to each arm, for a total sample size of 794 participants.
Under the equivalence design distribution , the selected design has
Therefore, when practical equivalence holds according to the clinically specified equivalence planning distribution, the trial has approximately a 91.7% predictive probability of declaring equivalence. This exceeds the required minimum predictive equivalence probability of 80%.
The selected design also has a very small predictive probability of incorrectly declaring meaningful non-equivalence under :
The remaining probability under corresponds to an inconclusive trial result:
Hence, under the equivalence planning distribution, the design is expected to declare equivalence in most trials, is extremely unlikely to make a compelling but incorrect non-equivalence conclusion, and produces an inconclusive result in approximately 8.3% of trials.
Under the non-equivalence design distribution , the predictive probability of falsely declaring equivalence is
This remains below the prespecified maximum of 0.05. Thus, even after adding the PCE(H0) requirement, the design retains the desired predictive protection against a false equivalence conclusion.
Most importantly, the selected design achieves
Therefore, when meaningful non-equivalence scenarios represented by hold, the trial has approximately a 50.0% predictive probability of producing compelling posterior evidence for . This satisfies the target
The remaining predictive probability under is primarily attributable to an inconclusive result:
The predictive decision probabilities under therefore partition as
or numerically,
The additional PCE(H0) criterion has an important practical consequence. A design can obtain a low false-equivalence probability partly by returning many inconclusive results whenever meaningful non-equivalence is true. Such a design is conservative about declaring equivalence, but it may not be very informative in the opposite direction.
Requiring
prevents the design from meeting the false-equivalence target merely by being inconclusive. It requires the trial to have a meaningful chance of delivering a decisive and correct non-equivalence conclusion when the treatments differ by at least the clinically relevant margin.
This additional decisiveness increases the required sample size. The original Bayesian-predictive calibration selected
and had
It therefore controlled predictive false equivalence but did not meet a minimum PCE(H0) target of 0.50. Adding the PCE(H0) requirement increases the selected design to
The larger sample size reflects the fact that the design must now be informative in both directions:
It should provide compelling evidence for practical equivalence when holds.
It should avoid falsely declaring equivalence when holds.
It should also provide compelling evidence for meaningful non-equivalence with at least 50% predictive probability when holds.
The PCE(H0)-constrained Bayesian design remains distinct from the frequentist calibration. Its guarantees are predictive averages over the clinically specified design distributions and . In particular, it does not guarantee that the conditional probability of falsely declaring equivalence is below 0.05 at every fixed parameter point on the ROPE boundary.
Nevertheless, this criterion is a useful strength of the Bayesian design framework. It allows trial planning to directly target the probability of a scientifically compelling conclusion under both practical equivalence and meaningful non-equivalence, rather than treating a large probability of inconclusive trials as acceptable by default.
AURIEL-PsO: a smaller binary-endpoint equivalence example
The AURIEL-PsO study was a randomized, double-blind phase-III equivalence trial comparing the adalimumab biosimilar MSB11022 with reference adalimumab in patients with moderate-to-severe chronic plaque psoriasis. The primary efficacy endpoint was a binary response indicator: achievement of at least 75% improvement in the Psoriasis Area and Severity Index at week 16 (PASI 75).
The per-protocol analysis included 203 participants in the MSB11022 group and 191 participants in the reference-adalimumab group. PASI-75 response was observed in 182/203 participants (89.7%) receiving MSB11022 and 175/191 participants (91.6%) receiving reference adalimumab. The observed response difference was therefore
where treatment is MSB11022 and control is reference adalimumab.
The original equivalence analysis used an absolute response-rate equivalence margin of . The resulting 90% confidence interval for the treatment-control difference, , was contained in that margin. Therefore, the original study concluded that no meaningful efficacy difference was demonstrated on the PASI-75 endpoint (Hercogová et al. 2020).
For the ROPE-based design illustration, we use the same clinically motivated absolute margin:
Thus, represents meaningful non-equivalence and represents practical equivalence. This is a natural fit for the two-arm beta-binomial ROPE model because the endpoint is binary and the equivalence estimand is an absolute risk difference.
Historical response data
n_msb11022 <- 203L
y_msb11022 <- 182L
n_adalimumab <- 191L
y_adalimumab <- 175L
p_msb11022 <- y_msb11022 / n_msb11022
p_adalimumab <- y_adalimumab / n_adalimumab
observed_difference <- p_msb11022 - p_adalimumab
data.frame(
treatment = c(
"MSB11022",
"Reference adalimumab"
),
responders = c(
y_msb11022,
y_adalimumab
),
nonresponders = c(
n_msb11022 - y_msb11022,
n_adalimumab - y_adalimumab
),
total = c(
n_msb11022,
n_adalimumab
),
response_probability = c(
p_msb11022,
p_adalimumab
)
)
#> treatment responders nonresponders total response_probability
#> 1 MSB11022 182 21 203 0.8965517
#> 2 Reference adalimumab 175 16 191 0.9162304
observed_difference
#> [1] -0.01967864The observed PASI-75 response probabilities are approximately
with an observed treatment-control difference of approximately . The historical results are used here to motivate planning distributions. They are not used as analysis priors: the final trial analysis retains weak priors in both arms.
Planning distributions
The PASI-75 response rate for reference adalimumab was approximately 0.916 in the per-protocol analysis. For the equivalence design distribution , we centre the control response probability near 0.90 and centre the treatment-control risk difference at zero.
The beta distribution
has mean
Its effective sample size of 51 is deliberately smaller than the historical per-protocol reference-arm sample size. This discounts historical information when constructing a prospective planning distribution.
For the treatment-control difference under practical equivalence, we use
truncated to the ROPE . This places most planning weight near no response-rate difference while allowing clinically small deviations within the prespecified equivalence margin.
prior_eq_auriel <- list(
type = "baseline_difference",
baseline = list(
family = "beta",
shape1 = 46,
shape2 = 5
),
difference = list(
family = "normal",
mean = 0,
sd = 0.06,
truncation = c(-0.18, 0.18)
)
)For the non-equivalence distribution , we use an illustrative near-boundary scenario in which the reference-adalimumab response probability remains high but the MSB11022 response probability is meaningfully lower.
Before truncation, these beta kernels have means
Hence, before the explicit non-equivalence restriction, the treatment-control difference is centred approximately at
Restricting the product-Beta distribution to
therefore creates a difficult non-equivalence planning distribution close to the lower ROPE boundary. This choice should be regarded as an illustrative planning scenario and should be varied in sensitivity analyses.
Bayesian predictive calibration
The following calculation uses the posterior thresholds
The design is required to have at least 80% predictive probability of declaring practical equivalence under and no more than 5% predictive probability of falsely declaring equivalence under .
design_auriel_bayesian <- design_twoarm_onestage_rope(
nmin = 20L,
nmax = 350L,
nstep = 1L,
delta = 0.18,
gammaeq = 0.80,
gammadiff = 0.975,
analysis_prior_C = c(1, 1),
analysis_prior_T = c(1, 1),
design_prior_eq = prior_eq_auriel,
design_prior_ne_C = design_prior_ne_C_auriel,
design_prior_ne_T = design_prior_ne_T_auriel,
calibration = "Bayesian",
targetpower = 0.80,
targettype1 = 0.05,
sustainn = 10L,
integration = "quantile",
quad_nodes = 64L,
parallel = TRUE,
parallel_backend = "psock",
ncores = n_workers,
returngrid = TRUE,
returnmatrices = TRUE,
progress = FALSE
)
design_auriel_bayesianOne-stage two-arm ROPE equivalence design
Equal allocation: nC = nT
Search range per arm: 20 to 250 (step 1 )
ROPE half-width delta: 0.18
Thresholds: gammaeq = 0.8 , gammadiff = 0.975
Integration: quantile(quantile quadrature; nodes = 64 )
Calibration: Bayesian
Target PCE(H1): 0.8000
Maximum predictive false-equivalence probability: 0.0500
Sustain n: 10
Selected design
nC = 172 , nT = 172 , total N = 344
PCE(H1), practical equivalence: 0.9798
Predictive false-equivalence probability: 0.0494
P(meaningful difference | G1): 0.0001
P(inconclusive | G1): 0.0201
PCE(H0), meaningful non-equivalence: 0.3355
P(inconclusive | G0): 0.6151
The search range begins at 20 participants per arm because the ROPE
is wider than in the sinusitis example and the PASI-75 response
probability is high. The upper bound of 350 participants per arm is
nearly exhausted here, as 344 patients are required. If no feasible
design is found, increase nmax; if the selected design
occurs well inside the range, rerun a narrower local search to verify
the result.
plot(design_auriel_bayesian)
Figure 4: Visualization of the two-arm single-stage ROPE design’s operating characteristics for the AURIEL trial example.
Bayesian calibration with PCE(H0)
The ordinary Bayesian calibration controls the predictive probability of a false equivalence declaration under . It does not, by itself, require a high probability of reaching a compelling correct non-equivalence conclusion when holds.
To require informative decisions in both directions, add the criterion
Also, we use a more informative non-equivalence prior here. This is relevant insofar as the earlier prior under non-equivalence was very close to the ROPE boundary. This makes it difficult for the ROPE to express meaningful non-equivalence under that prior. Thus, centering the prior at clearer non-equivalence scenarios allows to obtain a smaller trial sample size, even when adding the constraint on meaningful non-equivalence.
design_prior_ne_C_auriel <- c(
46,
5
)
design_prior_ne_T_auriel_clear <- c(
33,
18
)
design_auriel_bayesian_pce_h0_clear <- design_twoarm_onestage_rope(
nmin = 20L,
nmax = 300L,
nstep = 1L,
delta = 0.18,
gammaeq = 0.80,
gammadiff = 0.975,
analysis_prior_C = c(1, 1),
analysis_prior_T = c(1, 1),
design_prior_eq = prior_eq_auriel,
design_prior_ne_C = design_prior_ne_C_auriel,
design_prior_ne_T = design_prior_ne_T_auriel_clear,
calibration = "Bayesian",
targetpower = 0.80,
targettype1 = 0.05,
targetpce_h0 = 0.50,
sustainn = 10L,
integration = "quantile",
quad_nodes = 64L,
parallel = TRUE,
parallel_backend = "psock",
ncores = n_workers,
returngrid = TRUE,
returnmatrices = TRUE,
progress = FALSE
)
design_auriel_bayesian_pce_h0_clearOne-stage two-arm ROPE equivalence design
Equal allocation: nC = nT
Search range per arm: 20 to 300 (step 1 )
ROPE half-width delta: 0.18
Thresholds: gammaeq = 0.8 , gammadiff = 0.975
Integration: quantile(quantile quadrature; nodes = 64 )
Calibration: Bayesian
Target PCE(H1): 0.8000
Maximum predictive false-equivalence probability: 0.0500
Target PCE(H0): 0.5000
Sustain n: 10
Selected design
nC = 146 , nT = 146 , total N = 292
PCE(H1), practical equivalence: 0.9749
Predictive false-equivalence probability: 0.0268
P(meaningful difference | G1): 0.0001
P(inconclusive | G1): 0.0251
PCE(H0), meaningful non-equivalence: 0.5016
P(inconclusive | G0): 0.4716
PCE(H0) target satisfied: TRUE
Thus, patients per trial arm suffice. Note that the PCE(H0)-constrained calibration asks the design to satisfy all three predictive requirements:
and
The third requirement prevents a design from controlling false equivalence mainly by producing inconclusive outcomes under .
Sensitivity of PCE(H0) to the non-equivalence design distribution
The preceding ordinary Bayesian calibration selected a design with
using the near-boundary non-equivalence design distribution. This design was calibrated to achieve high predictive probability of declaring practical equivalence under and to control the predictive probability of falsely declaring equivalence under . It did not impose a minimum probability of compelling evidence for meaningful non-equivalence.
For that design, the predictive probability of compelling evidence for was
Thus, although the ordinary Bayesian design controls predictive false equivalence at the prespecified 5% level, it has only about a 33.6% predictive probability of declaring meaningful non-equivalence under the near-boundary distribution. Most remaining scenarios produce an inconclusive result.
The targetpce_h0 argument allows the probability of
compelling evidence for
to become an explicit calibration requirement. This extension is
particularly informative because it reveals how the required sample size
depends on the clinical non-equivalence scenarios encoded by
.
In both sensitivity analyses below, the ROPE and posterior decision thresholds are held fixed:
The PCE(H0)-constrained calibration requires all of the following:
and
The two sensitivity analyses differ only in the non-equivalence planning distribution .
Near-boundary non-equivalence
The first non-equivalence design distribution is centred close to the lower ROPE boundary. Its marginal means are approximately
and
The corresponding approximate treatment-control difference is
This is only slightly outside the lower ROPE boundary:
Under this near-boundary specification, no sustained feasible design was found in the search range from 20 to 300 participants per arm when requiring
The limiting criterion was PCE(H0), rather than PCE(H1) or predictive false-equivalence control. The first sample sizes satisfying each individual criterion were:
| Criterion | Requirement | First qualifying per-arm sample size |
|---|---|---|
| PCE(H1): declare practical equivalence under | 31 | |
| Predictive false equivalence under | 169 | |
| PCE(H0): declare meaningful non-equivalence under | Not reached by |
At sample size ,
the predictive operating characteristics were
and
Therefore, the near-boundary design meets the PCE(H1) and predictive false-equivalence requirements but does not achieve the desired 50% probability of compelling evidence for . Only for does the design meet the target constraints on the probability of compelling evidence for .
This is scientifically expected. A difference that lies only marginally outside the ROPE is difficult to distinguish from practical equivalence. Because the meaningful-non-equivalence decision requires posterior probability at least 0.975 outside the ROPE, a substantial proportion of repeated trials remain inconclusive under such near-boundary scenarios.
Clearly non-equivalent planning distribution
The second analysis retains the same ROPE, posterior thresholds, equivalence design distribution , and PCE(H0) target. It changes only the non-equivalence design distribution to represent a more clearly clinically important loss of efficacy.
The control response probability remains centred near 0.90:
The MSB11022 response probability is now centred near 0.65:
The approximate treatment-control difference is consequently
This difference is clearly outside the lower ROPE boundary of . It represents an anticipated PASI-75 response-rate loss of about 25 percentage points relative to reference adalimumab, rather than a difference that is only just beyond the clinically acceptable margin.
Under this specification, the PCE(H0)-constrained Bayesian calibration selects
The selected design satisfies all three predictive calibration requirements:
| Operating characteristic | Value | Requirement |
|---|---|---|
| PCE(H1): declare practical equivalence under | 0.9749 | |
| Predictive false-equivalence probability under | 0.0268 | |
| PCE(H0): declare meaningful non-equivalence under | 0.5016 |
The remaining predictive decision probabilities are
and
The selected sample size is primarily determined by the PCE(H0) requirement: the chosen design is the first sustained feasible sample-size region for which the probability of compelling evidence for reaches the prespecified 50% target.
Implications for Bayesian design priors
These results show that the non-equivalence design distribution is a substantive clinical input, not merely a technical component of the calculation. It specifies the non-equivalence scenarios in which the trial is expected to provide compelling evidence that the treatments differ by at least the clinically meaningful margin.
The near-boundary specification asks:
Can the trial reliably distinguish practical equivalence from a treatment difference that is only marginally larger than the accepted clinical equivalence margin?
The clearly non-equivalent specification asks:
Can the trial reliably identify an efficacy difference that is clearly beyond the accepted clinical equivalence margin?
Both questions are scientifically relevant, but they lead to markedly different sample-size requirements. A high target PCE(H0) is costly when concentrates close to the ROPE boundary because many trials will reasonably remain inconclusive. In contrast, a distribution centered further from the boundary corresponds to a more distinguishable clinically meaningful difference and can yield a substantially smaller calibrated design.
The selected design has total sample size
which is smaller than the 394 participants in the AURIEL-PsO per-protocol analysis. This comparison should not be interpreted as showing that 292 participants would reproduce or replace the original trial’s frequentist equivalence calculation. Rather, is the sample size selected by the present Bayesian ROPE decision rule under the explicitly stated planning distributions, posterior thresholds, and predictive calibration targets.
The sensitivity analysis illustrates a central advantage of the Bayesian design framework: it allows the trial to be calibrated not only to limit a wrong equivalence conclusion, but also to target a clinically meaningful probability of compelling correct evidence for non-equivalence. The price of that additional decisiveness depends directly on the non-equivalence scenarios that investigators regard as clinically plausible.
Calibration modes
The function supports four modes. They differ only in which constraints determine feasibility; the posterior decision rule is unchanged for a fixed , , , and analysis priors.
| Mode | Required criteria |
|---|---|
"Bayesian" |
power >= targetpower and
type1 <= targettype1
|
"frequentist" |
freqpower >= targetfreqpower and
freqtype1 <= targetfreqtype1
|
"hybrid" |
power >= targetpower and
freqtype1 <= targetfreqtype1
|
"full" |
All Bayesian and frequentist criteria |
In the present example:
- The Bayesian mode with prioritizes predictive decision performance under the prespecified and distributions.
- The frequentist mode with prioritizes pointwise power and approximate worst-case boundary error control.
- The hybrid mode would require predictive Bayesian power and frequentist boundary type-I-error control.
- The full mode would require all four targets simultaneously and is expected to be the most demanding.
Boundary-error visualization
A useful additional diagnostic plots the fixed-parameter probability
of declaring equivalence on the two ROPE boundaries. The code below uses
the decision matrices retained in
fit_luterman_gamma80_full.
fit_luterman_gamma80_full <- bfbin2arm:::.evaluate_twoarm_rope_design(
nC = 218L,
nT = 218L,
delta = 0.10,
gammaeq = 0.80,
gammadiff = 0.975,
analysis_prior_C = c(1, 1),
analysis_prior_T = c(1, 1),
design_prior_eq = prior_eq_luterman,
design_prior_ne_C = design_prior_ne_C,
design_prior_ne_T = design_prior_ne_T,
integration = "quantile",
quad_nodes = 64L,
compute_freq_power = TRUE,
freq_pC = 0.74,
freq_delta = 0,
compute_freq_type1 = TRUE,
freq_grid_n = 401L,
freq_pC_range = c(0.60, 0.85),
return_matrices = TRUE
)
boundary_luterman_gamma80The following code shows the frequentist type-I-error probability on the ROPE boundaries and as a function of the control arm success probability .
boundary_luterman_gamma80 <- bfbin2arm:::.freq_type1_boundary_twoarm(
nC = fit_luterman_gamma80_full$nC,
nT = fit_luterman_gamma80_full$nT,
delta = 0.10,
equivalence_matrix = fit_luterman_gamma80_full$equivalence,
difference_matrix = fit_luterman_gamma80_full$difference,
grid_n = 401L,
pC_range = c(0.60, 0.85)
)
lower_grid <- boundary_luterman_gamma80$grid_lower
upper_grid <- boundary_luterman_gamma80$grid_upper
plot_values <- c(
lower_grid$probability,
upper_grid$probability
)
ylim <- c(
0,
max(0.05, max(plot_values, na.rm = TRUE)) * 1.05
)
plot(
lower_grid$pC,
lower_grid$probability,
type = "l",
lwd = 2.5,
col = "#D55E00",
ylim = ylim,
xlim = range(c(lower_grid$pC, upper_grid$pC)),
xlab = expression(p[C]),
ylab = "P(declare equivalence)",
main = "Frequentist false-equivalence probability on ROPE boundaries"
)
lines(
upper_grid$pC,
upper_grid$probability,
lwd = 2.5,
col = "#0072B2"
)
abline(
h = 0.05,
lty = 3,
lwd = 1.2,
col = "grey35"
)
legend(
"topright",
legend = c(
expression(p[T] == p[C] - 0.10),
expression(p[T] == p[C] + 0.10),
"Type-I error target = 0.05"
),
col = c("#D55E00", "#0072B2", "grey35"),
lty = c(1, 1, 3),
lwd = c(2.5, 2.5, 1.2),
bty = "n"
)
Figure 3: Visualization of the frequentist false-equivalence probability (a type-I-error) on the ROPE boundaries for the two-arm one-stage ROPE design for a binary endpoint.
Interpretation of the boundary-error diagnostic
Figure 3 evaluates the Bayesian-predictive design at
under a frequentist conditional-error perspective. The figure displays the probability of declaring equivalence when the true treatment-control risk difference lies exactly on either ROPE boundary:
or
for control-arm response probabilities in the clinically motivated interval
At every point on these curves, the true absolute risk difference equals the ROPE half-width:
Therefore, a declaration of equivalence at any of these parameter values is a false-equivalence decision under the frequentist null hypothesis.
The diagnostic shows that the probability of declaring equivalence can be much larger than 0.05 on the ROPE boundaries. For the present Bayesian-predictive design, the maximum boundary-grid probability is approximately
More specifically, the largest value on the lower boundary is approximately
at
whereas the largest value on the upper boundary is approximately
at approximately
Thus, under some fixed parameter configurations that lie exactly on the practical-equivalence boundary, about 21% of repeated trials would declare equivalence using the Bayesian-predictive design.
This does not contradict the Bayesian predictive false-equivalence probability of 0.0434 reported for the same design. The two quantities answer different questions:
The Bayesian predictive false-equivalence probability averages the conditional probability of declaring equivalence over the non-equivalence design distribution .
The boundary diagnostic evaluates the conditional probability of declaring equivalence at individual fixed parameter configurations and reports a maximum over the selected boundary grid.
A prior-weighted average can be small even when the conditional error probability is appreciably larger at particular parameter values. In this example, the non-equivalence design distribution does not assign all of its probability mass to the worst-case boundary configurations. As a result, averaging over yields a predictive false-equivalence probability below 0.05, whereas the maximum fixed-parameter boundary probability is about 0.21.
The figure therefore makes the calibration trade-off explicit. The Bayesian-predictive design is efficient when the design objective is good average decision performance under the clinically specified planning distributions. It is not designed to provide a conventional frequentist upper bound of 0.05 on the conditional false-equivalence probability at every ROPE-boundary value.
If pointwise frequentist boundary protection is required, the more stringent frequentist calibration described above should be used. In the present example, that approach increases the required sample size to participants and uses the stricter equivalence threshold .
Take-away
The two designs answer different questions:
- Bayesian predictive calibration at seeks a practical sample size while controlling the prior-weighted false-equivalence probability under a clinically specified non-equivalence design distribution.
- Frequentist calibration at seeks pointwise power at a fixed equivalence scenario and low maximum false-equivalence probability over a grid on the ROPE boundaries.
Neither calibration is universally preferable. The appropriate choice depends on whether the trial objective is framed as a predictive development decision under explicit clinical scenarios or as a design requiring pointwise frequentist error protection. The selected calibration criterion, design priors, ROPE, posterior thresholds, and all reported operating characteristics should be prespecified.