Tutorials › Multi-Arm Multi-Stage (MAMS) Designs › Stress-Testing Boundary Cases

Simulation and Software · Tutorial 454 of 499

Stress-Testing Boundary Cases

Learn to specify and verify MAMS decision behavior at edge cases that ordinary simulated replicates may rarely exercise.

Intermediate 13 min read

What You'll Learn

  • Define edge-case states for interim MAMS decisions
  • Check behavior when every arm continues or no arm continues
  • Resolve statistic ties and validate decision-boundary ordering
  • Test minimum sample sizes against the statistic’s requirements
  • Use deterministic boundary tests alongside simulation
  • Diagnose common edge-case failures without confusing them with trial results

Why Boundary Cases Need Direct Tests

A simulation can run for many replicates without ever reaching an unusual decision state. That does not show that the decision code handles such states correctly. A rare exact tie, an empty set of continuing arms, or a stage at its minimum allowed sample size may expose a defect that ordinary random draws do not reveal. Boundary testing supplies these states deliberately and checks the design’s specified behavior.

The focus here is not to estimate operating characteristics. It is to verify that a MAMS decision rule and its software behave coherently at the edges of their inputs. The central requirement is to translate the protocol into explicit rules before testing: which comparisons are strict or inclusive, what happens if no experimental arm continues, and what sample sizes make each calculation defined.

Decision States and Assumptions

For a generic interim decision, suppose there are \(K\) experimental arms and a shared control. At a stage, the code calculates a statistic \(Z_k\) for each experimental arm \(k\), oriented so larger values favor that arm over control. Let \(c_f\) be a futility boundary and \(c_e\) an efficacy boundary, with \(c_f<c_e\). This tutorial uses the following illustrative rule: stop an arm for futility when \(Z_k\le c_f\), declare efficacy when \(Z_k\ge c_e\), and continue the arm otherwise. A real protocol may use different statistics, boundaries, or actions; tests must encode that protocol rather than assume this example’s rule is universal.

Definition: A boundary case is an input or state at the edge of a decision rule’s defined operating range, or one that tests a transition between actions. Examples include a statistic exactly on a boundary, equal statistics for two arms, the minimum permitted sample size, or a stage at which zero arms continue. A boundary test supplies such a case deliberately and checks the expected output.

For the numerical illustrations, assume the interim outcomes are independent and normally distributed within arms, with a known common standard deviation \(\sigma\), and that each arm and control has \(n\) observations at the interim. For an arm-versus-control contrast, use \(Z_k=(\bar{x}_k-\bar{x}_0)/SE\), where \(SE=\sigma\sqrt{1/n+1/n}\). These assumptions make the examples’ calculations transparent; they are not requirements for every MAMS design. If a protocol uses a different model or statistic, its own assumptions and valid sample-size range govern the tests.

A decision implementation should keep distinct statuses distinct. An arm stopped for futility is not the same as an arm declared efficacious, even though neither may recruit further participants in the same way. Record the action for each arm, and separately record whether any experimental arms remain eligible to continue. In particular, “no arms continue” does not by itself say whether all arms stopped for futility, all crossed an efficacy boundary, or a mixture occurred.

Worked Tests for Empty and Full Continuation Sets

Worked Example: No Arms Are Dropped

Consider three experimental arms and a shared control, with \(n=25\) participants per group at an interim analysis. Suppose \(\sigma=10\) outcome units and the illustrative boundaries are \(c_f=0\) and \(c_e=2.5\). The observed experimental-minus-control mean differences are 2, 4, and 6 units.

The standard error for each contrast is \(SE=10\sqrt{1/25+1/25}=10\sqrt{0.08}=2.828\) outcome units. Thus the statistics are \(Z_1=2/2.828=0.707\), \(Z_2=4/2.828=1.414\), and \(Z_3=6/2.828=2.121\). Each satisfies \(0<Z_k<2.5\), so all three arms continue.

The expected result is therefore three continue statuses and an active-arm count of 3. A sound implementation must not treat “none stopped” as an empty set or accidentally terminate the trial. This test checks the full-continuation state, not evidence that any arm is effective.

Worked Example: Every Arm Stops for Futility

Keep the same standard error and boundaries. Suppose the three mean differences are \(-4\), \(-2\), and \(-1\) outcome units. The corresponding statistics are \(-4/2.828=-1.414\), \(-2/2.828=-0.707\), and \(-1/2.828=-0.354\).

All three statistics satisfy \(Z_k\le0\), so every arm is stopped for futility. The continuing-arm set is empty, and its size is \(0\). The trial-level logic should now follow the protocol’s specified action when no experimental arm remains eligible for further recruitment. It should not attempt to calculate another-stage experimental-arm statistic from an empty set.

This expected output includes both the per-arm reasons for stopping and the trial-level state. Merely checking that the continuing-arm count is zero would miss a bug that labels all three arms as efficacious rather than futile.

Ties, Inclusive Boundaries, and Ordering

Comparisons at a boundary must match the written rule exactly. With the rule above, \(Z_k=c_f\) means futility, while \(Z_k=c_e\) means efficacy. A test using values just below and just above each boundary can check the transition; a test using the exact value checks whether the implementation uses \(\le\) and \(\ge\), rather than accidentally replacing them with strict comparisons.

Equal statistics for different arms are another useful case. If each arm is judged independently against fixed boundaries, a tie between arms does not itself require choosing a winner: both receive the action implied by their shared statistic. If a protocol instead ranks arms or selects a fixed number for continuation, it must specify how a tie in the ranking is resolved. A stable arm label can make the software deterministic, but that programming convention must not silently change the trial’s statistical rule.

Worked Example: Statistics Tied at a Decision Boundary

Suppose three arms have interim statistics \(Z_1=2.5\), \(Z_2=2.5\), and \(Z_3=0\), with \(c_f=0\) and \(c_e=2.5\). Under the stated inclusive rule, arms 1 and 2 are both declared efficacious because each satisfies \(Z_k\ge2.5\). Arm 3 is stopped for futility because \(Z_3\le0\).

The expected statuses are two efficacy declarations and one futility stop, with no continuing arms. A test that expects one of arms 1 and 2 to win would be inappropriate for an independent threshold rule: the equal statistics do not create a ranking decision. The exact lower-boundary value also matters: \(Z_3=0\) is futile under the stated \(\le\) convention, not continuing.

Boundary ordering itself should be validated. For the three-way rule used here, \(c_f<c_e\) leaves a nonempty interval of values that continue. If \(c_f=c_e\), a statistic at that common value satisfies both inclusive stopping conditions; if \(c_f>c_e\), some values satisfy both as well. Such a configuration is ambiguous unless a protocol explicitly gives precedence or defines another rule. A configuration check should reject it when the intended rule requires separated boundaries.

Minimum Sample Sizes and a Short Justification

A minimum sample-size test must be tied to the statistic actually calculated. With the known-\(\sigma\) normal statistic used here, the standard error is defined for \(n\ge1\) in both groups. If instead the code estimates each group’s variance from its observations, a group sample standard deviation is not defined at \(n=1\); that calculation requires at least two observations per group. A design’s permitted minimum and the statistic’s mathematical requirements therefore need to agree.

For the known-\(\sigma\) illustration, take the minimum \(n=1\), \(\sigma=10\), and a one-observation outcome of 12 in an experimental arm and 10 in control. The observed means are those values, and \(SE=10\sqrt{1/1+1/1}=14.142\) outcome units. The statistic is \(Z=(12-10)/14.142=0.1414\), which lies strictly between 0 and 2.5. Under the stated rule the arm continues. This is a valid calculation under the known-variance model, although the estimate is imprecise.

The underlying check follows directly from the formula: \(SE=\sigma\sqrt{2/n}\) when both group sizes equal \(n\). For \(\sigma>0\) and \(n\ge1\), this is positive and finite, so division is defined. At \(n=0\), the expression contains division by zero and no group mean is available. Thus zero is not a valid sample size for this statistic; it is not a low-information observation that can be passed through the same formula.

Key takeaway: Minimum sample size is not a universal number. It is the smallest size at which the particular statistic, variance estimate, and decision rule are defined under the design’s assumptions. Test that value explicitly, and reject sizes outside the supported range before computing a statistic.

How to Build and Diagnose Boundary Tests

A useful test specifies its inputs and expected outputs before the code runs. For each case, include the number of arms, stage, sample sizes, statistics or outcomes, boundaries, per-arm status, continuing-arm set, and any trial-level action. When possible, use hand-calculated values so the expected result is independent of the implementation being checked.

1
State the rule.
Write the inequalities, boundary ordering, permitted sample sizes, and action when no arm continues.
2
Construct edge inputs.
Set statistics exactly at, just below, or just above boundaries; make arm statistics equal when testing ties; use the stated minimum sample size.
3
Check every output.
Verify each arm’s status, the continuation set, and the trial-level state. Also verify that invalid configurations, such as reversed boundaries under this rule, are rejected.
4
Check coherence across stages.
Confirm that a stopped arm does not re-enter later recruitment and that no subsequent experimental-arm calculation is attempted when none is eligible to continue.

Symptoms of a boundary defect include an arm changing status when a statistic is exactly on a threshold, a continuation count that disagrees with the per-arm statuses, or a later-stage calculation using an empty arm set. A test that passes only for ordinary interior values is incomplete. Conversely, a deliberate boundary input is not automatically an invalid replicate: it is a valid test if it satisfies the design’s assumptions and input requirements.

Deterministic edge tests complement, rather than replace, simulation. Randomized simulation estimates how often events occur under specified scenarios; deterministic tests check what the code does when a selected event occurs. Analytic special cases can also serve as checks when a known answer is available, while boundary tests target exact logic and state transitions that such aggregate comparisons may not expose. None of these checks establishes the correctness of every aspect of a design.

Common Pitfalls and Limits

  • Using an unspecified tie rule. Treating equal arm statistics as a reason to select one arm is unjustified unless the protocol calls for ranking and defines a tie-break.
  • Ignoring equality. A test only at values well inside decision regions cannot reveal whether the code implements inclusive or exclusive thresholds as specified.
  • Equating no continuation with one particular outcome. An empty continuation set can arise from different arm-level decisions. Preserve those statuses and apply the stated trial-level policy.
  • Testing an unsupported sample size as if it were valid. If a statistic needs an estimated variance, one observation per group may be insufficient even though a known-variance statistic can be computed there.
  • Assuming edge tests prove operating characteristics. They verify selected logic paths; they do not estimate familywise error, power, expected sample size, or performance across all scenarios.

The main alternative is to rely on random simulation alone, which is useful for operating characteristics but may rarely generate exact ties or particular empty-set states. Direct deterministic tests are more targeted and interpretable, but have limited coverage unless the important cases are chosen systematically. The strongest practice is to combine explicit boundary cases with broader simulation and independent checks appropriate to the design.

Check Your Understanding

Answer each question using the illustrative rule \(Z_k\le c_f\) for futility, \(Z_k\ge c_e\) for efficacy, and continuation otherwise, where \(c_f<c_e\).

  1. If \(c_f=-1\), \(c_e=2\), and two arms have statistics \(-1\) and \(2\), what are their statuses?
  2. Why should equal statistics not automatically cause one arm to be dropped under an independent threshold rule?
  3. With known \(\sigma=8\), equal group sizes \(n=4\), and an observed mean difference of 4 units, calculate \(SE\) and \(Z\).
  4. Why is \(n=1\) unsuitable for a statistic that estimates a group variance from the sample, even though a known-variance statistic can be computed at \(n=1\)?
  5. What should a test check when every experimental arm stops?

Solutions. (1) The first arm is stopped for futility because \(-1\le c_f\); the second is declared efficacious because \(2\ge c_e\). (2) Under an independent threshold rule, each arm’s status depends on its own statistic and the fixed boundaries, so tied statistics receive the same status; selecting one requires a separate ranking rule. (3) \(SE=8\sqrt{1/4+1/4}=8\sqrt{0.5}=5.657\) units, and \(Z=4/5.657=0.7071\), a dimensionless statistic. Its status depends on the specified boundaries. (4) One observation cannot provide within-group variation, so a sample variance and sample standard deviation are undefined; the known-\(\sigma\) formula does not estimate that variance. (5) It should check each arm’s reason for stopping, verify that the continuing-arm set is empty, apply the protocol’s no-continuation action, and ensure that no later experimental-arm statistic is calculated from an empty set.

Clinical Biostats