Tutorials › Response-Adaptive Randomization › The Minimization Algorithm

Covariate-Adaptive and Covariate-Adjusted Allocation · Tutorial 419 of 501

The Minimization Algorithm

Work through the standard two-arm minimization score and see how it uses several baseline factors to identify an assignment that reduces marginal imbalance.

Intermediate 11 min read

What You'll Learn

  • Define marginal imbalance for categorical baseline factors in a two-arm trial.
  • Calculate the minimization score for each candidate assignment.
  • Update only the margins corresponding to a participant’s factor levels.
  • Interpret ties and distinguish the score calculation from the assignment policy.
  • Identify data checks, limitations, and alternatives to minimization.

Why Minimization Uses Margins

When a trial has several important baseline factors, a new participant may belong to groups that are already distributed unevenly across treatment arms. Minimization compares the imbalance that would result from assigning that participant to each arm, then identifies the assignment with the lower score. Its defining feature is that it can assess several factors one at a time, without requiring a separate randomization stratum for every combination of factor levels.

The method is sequential: the comparison uses the allocations already made, and the current participant is evaluated before their assignment is added to those allocations. The score addresses balance on the specified baseline factors. It does not use participants’ outcomes to choose an arm, and it does not guarantee that every factor will be perfectly balanced after each assignment.

Definition: In two-arm minimization, each specified categorical baseline factor has prespecified levels. For each factor level, record the number of participants assigned to arm 1 and arm 0. The marginal imbalance for that level is the arm 1 count minus the arm 0 count. For a new participant, calculate the total imbalance score that would result under each candidate arm. The minimizing arm is the one with the lower score.

For precision, index the baseline factors by \(j=1,\ldots,J\), and let \(l\) index the levels of factor \(j\). Define \(n_{1,jl}\) and \(n_{0,jl}\) as the current counts in arm 1 and arm 0, respectively, for level \(l\) of factor \(j\). Their difference is \(D_{jl}=n_{1,jl}-n_{0,jl}\). If the new participant has level \(l\) on factor \(j\), then assigning them to arm 1 changes that margin to \(D_{jl}+1\); assigning them to arm 0 changes it to \(D_{jl}-1\). Margins for the participant’s other levels do not change.

A common basic minimization score adds the absolute differences across all prespecified factor levels. Absolute values make a difference of \(+3\) count as the same amount of imbalance as a difference of \(-3\). Under this particular score, each factor level contributes equally; other score specifications are possible, but they are not needed to apply the basic rule taught here.

$$ S(a)=\sum_{j=1}^{J}\sum_l \left|D_{jl}+(2a-1)I(x_j=l)\right|, \qquad a\in\{0,1\}. $$

Here \(x_j\) is the new participant’s level on factor \(j\), and \(I(x_j=l)\) equals 1 when the participant has level \(l\) and 0 otherwise. Thus \(S(1)\) is the score if assigned to arm 1 and \(S(0)\) is the score if assigned to arm 0. The expression describes a hypothetical update: calculate both scores before actually adding the participant to either arm. Only the margins for the participant’s observed levels change.

Assumptions and a Local Calculation

The calculation requires the factor levels to be defined consistently for every participant and the new participant’s baseline values to be known before assignment. The counts must reflect the allocations made so far, with no participant counted twice or assigned to both arms. The examples below use two treatment arms, categorical factors, and the unweighted sum of absolute marginal differences. A trial using a different score must specify that score in advance rather than silently changing it during enrollment.

The score comparison can be understood one affected margin at a time. For a margin \(D_{jl}=d\) belonging to a participant’s level, assigning to arm 1 changes its contribution by \(|d+1|-|d|\); assigning to arm 0 changes it by \(|d-1|-|d|\). Contributions from all unaffected levels are identical under the two candidate assignments and therefore cancel in their comparison.

$$ S(1)-S(0) = \sum_{j=1}^{J} \left(\left|D_{j,x_j}+1\right|-\left|D_{j,x_j}-1\right|\right). $$

This identity follows by writing each score as the sum of affected and unaffected terms. For every unaffected term, the absolute difference appears unchanged in both scores, so subtracting the scores removes it. For an integer margin \(d\), if \(d>0\), then \(|d+1|-|d-1|=2\); if \(d<0\), the difference is \(-2\); and if \(d=0\), it is 0. Consequently, a factor level that currently has more arm 1 participants favors adding the new participant to arm 0, while a level with more arm 0 participants favors arm 1. These preferences can conflict across factors, so the total score determines the comparison.

Worked Example: Comparing Three Factors

Suppose the current marginal differences are as follows. Positive values mean that more participants at that level are in arm 1. A hypothetical new participant is moderate-risk, age 60 or older, and enrolled at site B.

FactorParticipant’s levelCurrent arm 1 countCurrent arm 0 countCurrent difference
RiskModerate810-2
Age60 or older911-2
SiteB1011-1

For context, the other level of each factor has differences of \(+2\), \(+2\), and \(+1\), respectively. The current total score is therefore \(2+2+2+2+1+1=10\).

Candidate arm 1. The new participant adds one to arm 1 at each of their three levels. The selected differences become \(-1,-1,0\). Including the unchanged other-level margins, the score is \(2+1+2+1+1+0=7\).

Candidate arm 0. The selected differences become \(-3,-3,-2\), giving \(2+3+2+3+1+2=13\).

Since \(7<13\), arm 1 has the lower hypothetical score. All three selected margins currently favor arm 1 for this participant: adding one to arm 1 moves each difference closer to zero. The score comparison is consistent with that direction.

Worked Example: When Factors Favor Different Arms

A new participant has level A on one factor, level B on a second, and level C on a third. The current differences at those levels are \(+3,-2,+1\), respectively. For simplicity, suppose the other levels contribute an unchanged total of 6 to either candidate score.

The current contributions from the three selected levels sum to \(3+2+1=6\), so the current total score is \(6+6=12\).

Candidate arm 1. The selected differences become \(+4,-1,+2\). Their absolute values sum to \(4+1+2=7\). Adding the unchanged 6 gives \(S(1)=13\).

Candidate arm 0. The selected differences become \(+2,-3,0\). Their absolute values sum to \(2+3+0=5\). Adding the unchanged 6 gives \(S(0)=11\).

Arm 0 has the lower score, \(11\) rather than \(13\). The first and third factors favor arm 0 because their differences are positive, while the second favors arm 1 because its difference is negative. The total-score calculation combines these competing changes; it does not require every factor to favor the same arm.

Worked Example: A Factor With Three Levels

Suppose a trial uses site (A, B, or C) and sex (F or M) as its factors. For site, the current differences for A, B, and C are \(+2,-1,-1\); for sex, the differences for F and M are \(-2,+2\). A new participant is at site C and has sex F.

The current score is \(|2|+|-1|+|-1|+|-2|+|2|=8\).

Candidate arm 1. Only site C and sex F change: their differences become \(0\) and \(-1\). Thus \(S(1)=|2|+|-1|+|0|+|-1|+|2|=6\).

Candidate arm 0. Those differences become \(-2\) and \(-3\). Thus \(S(0)=|2|+|-1|+|-2|+|-3|+|2|=10\).

Arm 1 minimizes the score. Site A, site B, and sex M are included in both candidate calculations, but their margins remain unchanged. This is why a factor with several levels does not mean that every level is updated for every participant.

What the Score Does—and Does Not—Specify

The calculation identifies which candidate arm or arms have the minimum score. If the scores differ, the lower-scoring arm is the minimizer. If they are equal, the score alone does not select between them. A complete allocation protocol must specify how to act on equal scores and, more generally, how the score comparison translates into an assignment. That implementation choice is separate from the arithmetic rule; it should be set before enrollment rather than improvised for a particular participant.

Minimization can be useful when several factors matter but their full cross-classification would produce many small strata. Stratified randomization works with combinations of factor levels, whereas the basic minimization score sums marginal imbalances level by level. The distinction matters: a marginal score does not directly ensure balance in every joint profile. Conversely, simple randomization does not use the current covariate margins to choose a lower-scoring candidate. These approaches serve different design aims, and none removes the need to plan the analysis.

The score is a balance criterion, not a guarantee of valid or unbiased results by itself. It cannot balance factors that were not included, correct inaccurate baseline records, ensure balance of outcomes, or establish that an observed treatment difference is causal. The specified factors and their coding should therefore be clinically and statistically defensible. The allocation process should also be documented so that counts, score calculations, and actual assignments can be checked.

Diagnostics and Common Pitfalls

Useful checks are simple but important. Before each calculation, verify the participant’s factor levels, the arm-specific counts for those levels, and the sign convention for every difference. Recompute a few margins from the allocation record and confirm that only the participant’s levels changed after the preceding assignment. If an implementation reports a score that differs from a manual calculation, inspect level coding, missing values, duplicated records, and whether the score includes all prespecified factors.

  • Updating every level of a factor. A participant at site C changes the site C margin, not the site A and site B margins. The other levels remain in both candidate scores.
  • Reversing the sign or arm labels. With \(D_{jl}=n_{1,jl}-n_{0,jl}\), adding to arm 1 increases the selected difference by one; adding to arm 0 decreases it by one. Reversing the convention is acceptable only if it is done consistently.
  • Choosing an arm from one factor alone. The direction favored by one margin may conflict with others. Compare the total scores, as in the second worked example.
  • Treating a lower score as proof of overall balance. The score summarizes the selected marginal differences at that step. It does not measure every possible imbalance, including imbalance in joint factor profiles.
  • Changing definitions during enrollment. Reclassifying levels or dropping a factor changes the score and can make earlier and later calculations incomparable. Prespecify the factors and coding.
Key takeaway: For a new participant, make one hypothetical update per candidate arm, changing only the margins for their observed factor levels. Sum the absolute differences across the specified levels, compare the candidate scores, and follow the allocation policy defined for the trial.

Check Your Understanding

Try each calculation first, then compare with the solutions below.

  1. For a participant’s level, the current difference is \(+2\). How does that selected margin change under assignment to arm 1 and arm 0?
  2. A participant’s selected margins on two factors are \(-1\) and \(+2\). Ignoring unchanged contributions, calculate the score contribution under each candidate arm.
  3. Why can an unselected level of a categorical factor be included in both candidate scores without changing their comparison?
  4. What does a tie between candidate scores tell you, and what does it not tell you?

Solutions. (1) With \(D=n_1-n_0=+2\), assignment to arm 1 gives \(+3\), while assignment to arm 0 gives \(+1\). (2) Under arm 1, the selected differences become \(0\) and \(+3\), for contribution \(0+3=3\). Under arm 0, they become \(-2\) and \(+1\), for contribution \(2+1=3\); these selected levels tie, so unchanged contributions would also be equal. (3) That level’s margin is unchanged under either candidate, so its identical absolute-value contribution cancels when the scores are compared. (4) A tie means the specified score gives equal hypothetical imbalance. It does not specify which arm must be assigned; the trial’s allocation policy must settle that operational choice.

Clinical Biostats