Tutorials › Multi-Arm Multi-Stage (MAMS) Designs › Representing Randomization and Allocation

Simulation and Software · Tutorial 435 of 499

Representing Randomization and Allocation

Represent stage-specific randomization probabilities clearly and verify that simulated participants are assigned only to eligible arms in the intended proportions.

Intermediate 11 min read

What You'll Learn

  • Translate treatment-to-control allocation ratios into assignment probabilities.
  • Represent equal and unequal allocation across multiple active arms.
  • Update randomization probabilities when the active-arm set changes between stages.
  • Distinguish expected allocation counts from exact quotas in a simulated replicate.
  • Check assignment totals, stage labels, eligibility, and realized proportions.
  • Recognize how simple randomization differs from block or fixed-quota allocation.

Why Allocation Must Be Represented Explicitly

A MAMS simulation needs to represent not only which treatments are available, but also how participants are assigned among them. Equal allocation is only one possibility. A design may assign twice as many participants to a treatment as to control, use a shared control for several treatments, or change its allocation probabilities after an interim decision removes an arm. If the simulation instead uses one fixed allocation rule throughout, it may generate a different trial from the one intended.

The allocation rule determines the distribution of sample counts by arm and stage. Those counts affect the information available for comparisons and therefore can change the simulated trial’s decisions. A useful representation keeps the stage, the eligible arms, and the probability assigned to each eligible arm together. The key distinction is that probabilities define a randomization mechanism; they do not usually guarantee exact counts in each simulated trial.

Definition: For enrollment stage \(s\), let \(E_s\) be the set of arms eligible to receive new participants, including control if it is available. For each \(j \in E_s\), let \(p_{js}\) be the probability that a participant entering at stage \(s\) is assigned to arm \(j\). A valid allocation rule satisfies \(p_{js} \geq 0\) for every eligible arm and \(\sum_{j \in E_s}p_{js}=1\). An arm that is not eligible at that stage must have allocation probability zero.

Here, a stage refers to the portion of enrollment governed by one allocation rule. The set \(E_s\) can change when a treatment arm is dropped, or when the protocol specifies different allocation probabilities in a later stage. The stage used for allocation should be recorded for each participant; it should not be inferred later from the participant’s outcome or from a decision made after that participant entered.

Converting Allocation Ratios to Probabilities

For a two-arm comparison, a treatment-to-control target ratio of \(r:1\) means the treatment probability is \(r\) times the control probability. Since the probabilities sum to one, the treatment probability is \(r/(r+1)\) and the control probability is \(1/(r+1)\). For example, a 2:1 treatment-to-control ratio gives probabilities \(2/3\) and \(1/3\), not 2 and 1.

With several treatments sharing one control, it is useful to define each treatment’s target ratio relative to control. Let \(r_{js}\) be the desired treatment-to-control allocation ratio for active treatment \(j\) at stage \(s\). If all these ratios are specified simultaneously, the probabilities are:

$$ p_{Cs}=\frac{1}{1+\sum_{j \in E_s,\; j\ne C} r_{js}}, \qquad p_{js}=\frac{r_{js}}{1+\sum_{k \in E_s,\; k\ne C} r_{ks}}. $$

This construction gives \(p_{js}/p_{Cs}=r_{js}\) for each treatment. For two active treatments with ratios \(1:1\) and \(1:1\) relative to the shared control, the probabilities are \(1/3\) for each arm. If instead both treatment arms are intended to receive twice the control allocation, the probabilities are \(1/5\) for control and \(2/5\) for each treatment. The ratios must be interpreted relative to the shared control, not as separate pairwise allocations that can each be imposed independently without checking that all probabilities sum to one.

Key distinction: A probability-based allocation targets a proportion in expectation. An exact-quota design specifies how many participants must be assigned to each arm, often within a block or a fixed enrollment group. These are different randomization mechanisms, even if they have the same overall target proportions.

What Counts Should a Simulation Produce?

Suppose \(n_s\) participants are independently randomized at stage \(s\), with the same probability vector \((p_{js}:j\in E_s)\) for each participant. The vector of arm counts has a multinomial distribution. Its expected count in arm \(j\) is \(n_s p_{js}\). Thus, an expected count need not be an integer, and a realized count need not equal its expectation.

$$ \operatorname{E}(N_{js})=n_s p_{js}, \qquad \operatorname{Var}(N_{js})=n_s p_{js}(1-p_{js}), \qquad \operatorname{Cov}(N_{js},N_{ks})=-n_s p_{js}p_{ks}\quad(j\ne k). $$

The negative covariance reflects the fixed stage total: an assignment to one arm is unavailable to the other arms. Counts across stages should be checked separately when the probability vector changes between stages. Pooling them can conceal a coding error. For example, a pooled treatment-to-control ratio may look plausible even if the simulation accidentally kept a dropped arm open during later enrollment.

Worked Examples

Worked Example: Two Arms With a 2:1 Target Ratio

Hypothetical design. At one stage, 180 participants are independently randomized to treatment or control. The target treatment-to-control ratio is 2:1. Find the allocation probabilities and expected counts, then assess a simulated replicate with 123 treatment and 57 control assignments.

The probabilities must sum to one, with treatment probability twice control probability. Therefore,

$$ p_T=\frac{2}{2+1}=\frac{2}{3}, \qquad p_C=\frac{1}{2+1}=\frac{1}{3}. $$

The expected counts are \(180(2/3)=120\) in treatment and \(180(1/3)=60\) in control. The simulated counts sum to \(123+57=180\), so the stage total is correct. The realized ratio is \(123/57\approx 2.158\), rather than exactly 2. That difference is not, by itself, evidence of a coding error: simple randomization targets the ratio in probability, not as a fixed count. The replicate should be checked against its randomization rule and across many replicates, not required to reproduce the expected counts exactly.

Worked Example: Shared Control and a Stage-Specific Change

Hypothetical design. In stage 1, treatments A and B share control. The target ratios are A:control = 1:1 and B:control = 0.5:1. There are 100 stage-1 participants. After stage 1, A is dropped; in stage 2, the remaining treatment B has a 2:1 target ratio to control, with 60 new participants. Calculate the probabilities and expected counts in each stage.

In stage 1, the denominator for the probability vector is \(1+1+0.5=2.5\), where the initial 1 is the control weight. Thus \(p_C=1/2.5=0.4\), \(p_A=1/2.5=0.4\), and \(p_B=0.5/2.5=0.2\). The expected counts are 40 control, 40 A, and 20 B.

In stage 2, A is no longer eligible. The remaining 2:1 ratio gives \(p_C=1/3\) and \(p_B=2/3\), so the expected counts among 60 participants are \(60(1/3)=20\) control and \(60(2/3)=40\) B. The stage-2 probability for A must be zero, not 0.4 carried forward from the first-stage rule. The two stages have distinct probability vectors, even though control is present in both.

Worked Example: Checking Counts by Stage and Arm

Hypothetical simulated replicate. Use the design in the previous example. Suppose the simulated assignments are:

StagePlanned participantsControl assignedA assignedB assigned
1100394219
26021039

First check the row totals. Stage 1 has \(39+42+19=100\) assignments; stage 2 has \(21+0+39=60\). Both match the planned stage sizes. Next check eligibility: A has no stage-2 assignments, as required after it was dropped. The observed stage-1 proportions are 0.39, 0.42, and 0.19, compared with the target probabilities 0.4, 0.4, and 0.2. The stage-2 proportions are \(21/60=0.35\) for control and \(39/60=0.65\) for B, compared with \(1/3\) and \(2/3\). These are plausible random deviations from the targets; neither stage is required to match its expected counts exactly.

Across the whole replicate, control has \(39+21=60\) participants, A has 42, and B has \(19+39=58\). These pooled counts are useful descriptive totals, but they do not replace the stage-specific checks. In particular, the stage-1 and stage-2 allocation rules cannot be verified from the pooled totals alone.

Derivation and Implementation Checks

The count formulas follow directly from indicator variables. For a fixed stage and arm \(j\), define \(I_{ij}=1\) if participant \(i\) is assigned to arm \(j\), and 0 otherwise. Then \(N_{js}=\sum_{i=1}^{n_s}I_{ij}\). Under independent randomization with probability \(p_{js}\), each indicator has expectation \(p_{js}\) and variance \(p_{js}(1-p_{js})\). Independence across participants gives:

$$ \operatorname{E}(N_{js})=\sum_{i=1}^{n_s}\operatorname{E}(I_{ij})=n_s p_{js}, \qquad \operatorname{Var}(N_{js})=\sum_{i=1}^{n_s}\operatorname{Var}(I_{ij})=n_s p_{js}(1-p_{js}). $$

For two distinct arms \(j\) and \(k\), one participant cannot be assigned to both. Thus \(\operatorname{E}(I_{ij}I_{ik})=0\), while \(\operatorname{E}(I_{ij})\operatorname{E}(I_{ik})=p_{js}p_{ks}\). The covariance for one participant’s indicators is therefore \(-p_{js}p_{ks}\); summing over independent participants gives \(\operatorname{Cov}(N_{js},N_{ks})=-n_s p_{js}p_{ks}\). This derivation assumes independent assignments with a fixed probability vector within the stage. It does not apply unchanged to fixed quotas or permuted-block randomization.

A practical simulation should store the allocation rule in a form that can be inspected: stage identifier, eligible-arm labels, and one probability per eligible arm. At each assignment, the software should use the rule corresponding to that participant’s stage and current eligible set. After a replicate, tabulate assignment counts by stage and arm, not just by arm overall.

Useful checks include confirming that probabilities are nonnegative and sum to one within numerical tolerance; that the observed number assigned equals the planned stage size; and that no participant is assigned to an arm that was ineligible at that stage. For probability-based randomization, compare observed proportions with the target probabilities without demanding exact equality. For a design with exact block quotas, check the quotas at the level at which the protocol imposes them.

1
Define eligibility.
For each enrollment stage, list control and every treatment arm that can receive a new participant. Exclude arms already dropped.
2
Translate the design into probabilities or quotas.
Normalize the specified weights so probabilities sum to one, or record the exact allocation constraints if the design uses quotas.
3
Assign and retain stage labels.
Use the rule for the participant’s enrollment stage and retain the arm assignment and stage in the simulated data.
4
Verify each stage.
Check stage totals, arm eligibility, and realized counts against the correct stage-specific allocation rule.

Allocation Alternatives, Failure Modes, and Limits

Simple randomization assigns each participant independently using the stated probabilities. It is straightforward to implement, but realized arm sizes can differ from their expected counts, especially in small stages. Permuted-block randomization instead constrains assignments within blocks to keep arm counts closer to target. Fixed quotas can enforce exact counts for a specified enrollment group. These approaches should not be interchanged silently: their assignment dependence and resulting count variation differ, even when their marginal target proportions are the same.

Stratified randomization applies allocation rules within strata, such as site. In that case, record both stage and stratum, and verify allocation within each stratum as required by the design. Overall arm counts can differ from a simple calculation based on one pooled probability vector if stratum sizes differ. Likewise, if enrollment is stopped before a stage reaches its planned size, the realized stage total should reflect the stopping rule rather than being artificially filled to match a target.

A frequent mistake is to treat a target ratio as a promise about counts in every replicate. With independent 2:1 allocation and 30 participants, the expected counts are 20 and 10, but the realized counts are random. The correction is to check the total, the eligibility rules, and the assignment mechanism; assess whether the realized counts are plausible under that mechanism; and avoid changing the random assignments just to force the target ratio. Conversely, if the protocol specifies exact quotas, merely obtaining the target ratio on average is not an adequate implementation.

Another failure is carrying forward the original probability vector after an arm is dropped. Probabilities must be recalculated over the currently eligible set. A third is storing only final arm totals: without stage labels, it may be impossible to identify assignments to an arm after it became ineligible. Allocation checks can reveal these implementation errors, but they do not establish that the outcome model or the trial’s decision rules are correct. They verify the assignment component of the simulation.

Key takeaway: Represent allocation as a stage-specific rule over currently eligible arms. Verify exact totals and eligibility for every stage, while interpreting randomization probabilities as targets for the distribution of counts—not as guaranteed counts in a single replicate.

Check Your Understanding

Answer each question, then compare with the solutions below.

  1. A two-arm stage uses a treatment-to-control ratio of 3:2. What are the assignment probabilities? For 100 participants, what are the expected counts?
  2. Two treatments share control, and each has a 1:1 target ratio to control. What is the probability for each of the three arms? Explain why each probability is not one half.
  3. A stage has 45 participants and allocation probabilities 0.5 to control, 0.3 to A, and 0.2 to B. A simulated replicate has counts 22, 15, and 8. What checks pass, and must the counts equal their expectations?
  4. After treatment A is dropped, the only eligible arms are control and B, with B:control = 1:1. What must the allocation rule assign to A at the later stage, and what are the probabilities for control and B?

Solutions. (1) The probabilities are \(3/(3+2)=0.6\) for treatment and \(2/(3+2)=0.4\) for control. Expected counts are \(100(0.6)=60\) and \(100(0.4)=40\). (2) The weights are 1 for control, 1 for the first treatment, and 1 for the second, so each probability is \(1/3\). Each treatment’s probability must share the total probability with control and the other treatment. (3) The counts sum to \(22+15+8=45\), so the stage total matches. The expected counts are 22.5, 13.5, and 9; realized counts need not equal them exactly. Eligibility and the recorded stage should also be checked. (4) A must have probability zero. Control and B each have probability \(1/2\), giving the stated 1:1 ratio among eligible arms.

Clinical Biostats