Lesson 8: Treatment Allocation and Randomization
Lesson 8: Treatment Allocation and RandomizationOverview
Treatment allocation in a clinical trial can be randomized or nonrandomized. Nonrandomized schemes, such as investigatorselected treatment assignments, are susceptible to large biases. Even nonrandomized schemes that are systematic, such as alternating treatments, are susceptible to discovery and could lead to bias. Obviously, to reduce biases, we prefer randomized schemes. Credibility requires that the allocation process be nondiscoverable. The investigator should not know what the treatment will be assigned until the patient has been determined as eligible. Even using envelopes with the treatment assignment sealed inside is prone to discovery.
Randomized schemes for treatment allocation are preferable in most circumstances. When choosing an allocation scheme for a clinical trial, there are three technical considerations:
 reducing bias;
 producing a balanced comparison;
 quantifying errors attributable to chance.
Randomization procedures provide the best opportunity for achieving these objectives.
Objectives
 Identify three benefits of randomization
 Distinguish simple randomization from constrained randomization.
 State the purpose of randomization in permuted blocks.
 State the objective of stratified randomization.
 Contrast the benefits of permuted blocks to those of adaptive randomization schemes.
 Use a SAS program to produce a permuted blocks randomization plan.
 Use an allocation ratio that will maximize statistical power in the situation where greater variability is expected in one treatment group than the other.
 Provide the rationale against randomizing prior to informed consent.
8.1  Randomization
8.1  RandomizationIn some early clinical trials, randomization was performed by constructing two balanced groups of patients and then randomly assigning the two groups to the two treatment groups. This is not always practical as most trials do not have all the patients recruited on day one of the studies. Most clinical trials today invoke a procedure in which individual patients, upon entering the study, are randomized to treatment.
Randomization is effective in reducing bias because it guarantees that treatment assignment will not be based on the patient's prognostic factors. Thus, investigators cannot favor one treatment group over another by assigning patients with better prognoses to it, either knowingly or unknowingly. Procedure selection bias has been documented to have a very strong effect on outcome variables.
Another benefit of randomization which might not be as obvious is that it typically prevents confounding of the treatment effects with other prognostic variables. Some of these factors may or may not be known. The investigator usually does not have a complete picture of all the potential prognostic variables, but randomization tends to balance the treatment groups with respect to the prognostic variables.
Some researchers argue against randomization because it is possible to conduct statistical analysis, e.g., analysis of covariance (ANCOVA), that adjusts for the prognostic variables. It always is best, however, to prevent a problem rather than adjust for it later. In addition, ANCOVA does not necessarily resolve the problem satisfactorily because the investigator may be unaware of certain prognostic variables and because it assumes a specific statistical model that may not be correct.
Although randomization provides great benefit in clinical trials, there are certain methodological problems and biases that it cannot prevent. One example where randomization has little, if any, the impact is external validity in a trial that has imposed very restrictive eligibility criteria. Another example occurs with respect to assessment bias, which treatment masking and other design features can minimize. For instance, when a patient is asked "how do you feel?" or "how bad is your pain?" to describe their condition the measurement bias is introduced.
Simple Randomization
The most popular form of randomization is simple randomization. In this situation, a patient is assigned a treatment without any regard for previous assignments. This is similar to flipping a coin  the same chance regardless of what happened in the previous coin flip.
One problem with simple randomization is the small probability of assigning the same number of subjects to each treatment group. Severe imbalance in the numbers assigned to each treatment is a critical issue with small sample sizes.
Another disadvantage of simple randomization is that it can lead to an imbalance among the treatment groups with respect to prognostic variables that affect the outcome variables.
For example, suppose disease severity in a trial is designated as mild, moderate, and severe. Suppose that simple randomization to treatment groups A and B is applied. The following table illustrates what possibly could occur.
Severity  Group A  Group B 
Mild  17  28 
Moderate  41  39 
Severe  25  13 
The moderate is fairly well balanced, the mild and severe groups are much more imbalanced. This results in Group A getting more of the severe cases and Group B more of the mild cases.
8.2  Constrained Randomization
8.2  Constrained RandomizationRandomization in permuted blocks is one approach to achieve balance across treatment groups. The randomization scheme consists of a sequence of blocks such that each block contains a prespecified number of treatment assignments in random order. The purpose of this is so that the randomization scheme is balanced at the completion of each block. For example, suppose equal allocation is planned in a twoarmed trial (groups A and B) using a randomization scheme of permuted blocks. The target sample size is 120 patients (60 in A and 60 in B) and the investigator plans to enroll 12 subjects per week. In this situation, blocks of size 12 are natural, so the randomization plan looks like
Week #1  BABABAABABAB 
Week #2  ABBBAAABAABB 
Week #3  BBBABABAABAA 
Each week the patients are assigned a treatment based on a randomly assigned option specified for the week. Notice that there are exactly six As and six Bs within each block, so that at the end of each week there is balance between the two treatment arms. If the trial is terminated, say after 64 patients have been enrolled, there may not be exact balance but it will be close.
Ordinarily, a natural block size is not evident, so logistical procedures may suggest a block size. A variation of blocked randomization is to use block sizes of unequal length. This might be helpful for a trial where the investigator is unmasked. For example, if the investigator knows that the block size is six, and within a particular block treatment A already has been assigned to three patients, then it is obvious that the remaining patients in the block will be assigned treatment B. If the investigator knows the treatment assignment prior to evaluating the eligibility criteria, then this could lead to procedure selection bias. It is not good to use a discoverable assignment of treatments. A next step to take would be to vary the block size in order to keep the investigator's procedure selection bias minimized.
To illustrate that randomization with permuted blocks is a form of constrained randomization, let \(N_A\) and \(N_B\) denote the number of As and Bs, respectively, to be contained within each block. Suppose that when an eligible patient is ready to be randomized there are \(n_A\) and \(n_B\) patients already randomized to groups A and B, respectively. Then the probability that the patient is randomized to treatment A is:
\(Pr[A]=\begin{cases} 0 & \text{ if } n_A=N_A \\ \dfrac{N_An_A}{N_A+N_Bn_An_B}& \text{ if } 0<n_A<N_A \\ 1 & \text{ if } n_B=N_B \end{cases}\)
This probability rule is based on the model of \(N_A\) "A" balls and \(N_B\)_{ }"B" balls in an urn or jar which are sampled without replacement. The probability of being assigned treatment A changes according to how many patients already have been assigned treatment A and treatment B within the block.
As an example, suppose each block is supposed to have \(N_A = N_B = 6\) and \(n_A = 3\) and \(n_B = 2\) already have been assigned. Thus, there are \(N_A  n_A = 3\) A balls left in the urn and \(N_B  n_B = 4\) B balls left in the urn, so the probability of the next eligible patient being assigned treatment A is 3/7.
8.3  Stratified Randomization
8.3  Stratified RandomizationAnother type of constrained randomization is called stratified randomization. Stratified randomization refers to the situation in which strata are constructed based on values of prognostic variables and a randomization scheme is performed separately within each stratum. For example, suppose that there are two prognostic variables, age and gender, such that four strata are constructed:
Treatment A  Treatment B  
male, age < 18  12  12 
male, age ≥ 18  36  37 
female, age < 18  13  12 
female, age ≥ 18  40  40 
The strata size usually vary (maybe there are relatively fewer young males and young females with the disease of interest). The objective of stratified randomization is to ensure balance of the treatment groups with respect to the various combinations of the prognostic variables. Simple randomization will not ensure that these groups are balanced within these strata so permuted blocks are used within each stratum are used to achieve balance.
If there are too many strata in relation to the target sample size, then some of the strata will be empty or sparse. This can be taken to the extreme such that each stratum consists of only one patient each, which in effect would yield a similar result as simple randomization. Keep the number of strata used to a minimum for good effect.
8.4  Adaptive Randomization
8.4  Adaptive RandomizationAdaptive randomization refers to any scheme in which the probability of treatment assignment changes according to assigned treatments of patients already in the trial. Although permuted blocks can be considered as such a scheme, adaptive randomization is a more general concept in which treatment assignment probabilities are adjusted.
One advantage of permuted blocks over adaptive randomization is that the entire randomization scheme can be determined prior to the onset of the study, whereas many adaptive randomization schemes require recalculation of treatment assignment probabilities for each new patient.
Urn models provide some approaches for adaptive randomization. Here is an exercise that will help to explain this type of scheme. Suppose that there is one "A" ball and one "B" ball in an urn and the objective of the trial is the equal allocation between treatments A and B. Suppose that an "A" ball is blindly selected so that the first patient is assigned treatment A. Then the original "A" ball and another "B" ball are placed in the urn so that the second patient has a 1/3 chance of receiving treatment A and a 2/3 chance of receiving treatment B. At any point in time with \(n_A\)"A" balls and \(n_B\)"B" balls in the urn, the probability of being assigned treatment A is \(\dfrac{n_A}{(n_A+ n_B)}\). The scheme changes based on what treatments have already been assigned to patients.
This type of urn model for adaptive randomization yields tight control of balance in the early phase of a trial. As \(n_A\) and \(n_B\) get larger, the scheme tends to approach simple randomization, so the advantage of such an approach occurs when the trial has a small target sample size.
8.5  Minimization
8.5  MinimizationMinimization is another, rather complicated type of adaptive randomization. Minimization schemes construct measures of imbalance for each treatment when an eligible patient is ready for randomization. The patient is assigned to the treatment which yields the lowest imbalance score. If the imbalance scores are all equal, then that patient is randomly assigned a treatment. This type of adaptive randomization imposes tight control of balance, but it is more laborintensive to implement because the imbalance scores must be calculated with each new patient. Some researchers have developed webbased applications and automated 24hour telephone services that solicit information about the stratifiers and a computer algorithm uses the data to determine the randomization
One popular minimization scheme is based on marginal totals of the stratifying variables. As an example, consider a threearmed clinical trial (treatments A, B, C). Suppose there are four stratifying variables, whereby each stratifier has three levels (low, medium, high), yielding \(3^4 = 81\) strata in this trial. When 200 patients have been randomized and patient #201 is ready for randomization. The observations of the stratifying variables are recorded as follows.
Patient  Stratifier #1  Stratifier #2  Stratifier #3  Stratifier #4 
001  Low  Low  Medium  Low 
002  High  Medium  Medium  High 
. . .


200  Low  Low  Low  Medium 
Suppose that patient #201 is ready for randomization and that this patient is observed to have the low level of stratifier #1, the medium level of stratifier #2, the high level of stratifier #3, and the high level of stratifier #4. Based on the 200 patients already in the trial, the number of patients with each of these levels is totaled for each treatment group. (Notice that patients may be double counted in this table.)
Low Stratifier #1  Medium Stratifier #2  High Stratifier #3  High Stratifier #4  Marginal Total  
Trt A  27  45  19  12  103 
Trt B  31  48  18  15  112 
Trt C  30  43  21  15  109 
Patient #201 would be assigned to treatment A because it has the lowest marginal total. If two or more treatment arms are tied for the smallest marginal total, then the patient is randomly assigned to one of the tied treatment arms. This is not a perfect scheme but it is a strategy for making sure that the assignments are as balanced within each treatment group with respect to each of the four variables.
8.6  "Play the Winner" Rule
8.6  "Play the Winner" RuleAnother type of adaptive randomization scheme is called the "play the winner" rule. Suppose there is a twoarmed clinical trial and the urn contains one "A" ball and one "B" ball for the first patient. Suppose that the patient randomly is assigned treatment A. Now you need to know if the treatment was successful with the patient that received this treatment. If the patient does well on treatment A, then the original "A" ball and another "A" ball are placed in the urn. If the patient fails on treatment A, then the original "A" ball and a "B" ball are placed in the urn. Thus, the second patient has probability of 1/3 or 2/3 of receiving treatment A depending on whether treatment A was a success or failure for the first patient. This process continues. If one treatment is more successful than the other, the odds are stacked in favor of that treatment.
The advantage of the "play the winner" rule is that a higher proportion of patients will be assigned to the more successful treatment. This seems to be an ethical approach.
The disadvantages of the "play the winner" rule are that:
 sample size calculations are difficult, and
 the outcome on each patient must be determined prior to the entry of the next patient.
Thus, the "play the winner" rule is not practical for most trials. The procedure can be modified, however, to be performed in stages. For example, if the target sample size is 200 patients, then the trial can be put on hold after each set of 50 patients to assess outcome and redefine the probability of treatment assignment for the patients yet to be recruited, i.e., "play the winner" after every 50 patients instead of every patient.
8.7  Administration of the Randomization Process
8.7  Administration of the Randomization ProcessSAS® Example
Providing permuted blocks randomization scheme for equal allocation to treatments A and B
The RANUNI function in SAS yields random numbers from the Uniform(0,1) distribution (randomly selected a decimal between 0 and 1). These random numbers can be used to generate a randomization scheme. For example, suppose that the probability of assignment to treatments A, B, and C are to be 0.25, 0.25, and 0.5, respectively. Let U denote the random number generated and assign treatment as follows:
 if \(0.00 < U \leq 0.25\)
 if \(0.25 < U \leq 0.50\)
 if \(0.50 < U \leq 1.00\)
This can be adapted for whatever your scheme requires.
Here is a SAS program that provides a permuted blocks randomization scheme for equal allocation to treatments A and B. In the example, the block size is 6 and the total sample size is 48.
*******************************************************************************
* This program in SAS provides a permuted blocks randomization scheme for *
* equal allocation of two treatments, denoted as A and B. *
* *
* The user needs to specify values for the desired sample size (sampsize) *
* and the desired block size (blcksize). *
*******************************************************************************;
data values;
samplesize=48;
blocksize=6;
run;
data random;
set values;
nblocks=round(samplesize/blocksize);
na=round(blocksize/2);
nb=blocksizena;
do block=1 to nblocks by 1;
nna=0;
nnb=0;
do i=1 to blocksize;
subject=i+((block1)*blocksize);
if nna=na then treatment="B";
if nnb=nb then treatment="A";
else do;
aprob=(nanna)/(na+nbnnannb);
u=ranuni(0);
if (0<=u<=aprob) then do;
treatment="A";
nna=nna+1;
end;
if (aprob<u<=1) then do;
treatment="B";
nnb=nnb+1;
end;
end;
keep subject treatment;
output;
end;
end;
run;
proc print data=random;
id subject;
var treatment;
title "Randomization Plan for Equal Allocation of Treatments A and B";
run;
Try It!
Did you get something like this?
Randomization Plan for Equal Allocation of Treatments A and B  

subject  treatment 
1  A 
2  A 
3  B 
4  B 
5  B 
6  A 
7  A 
8  B 
9  A 
10  B 
11  A 
12  B 
13  A 
14  A 
15  B 
16  B 
17  B 
18  A 
19  A 
20  B 
21  A 
22  A 
23  B 
24  B 
25  B 
26  B 
27  A 
28  A 
29  B 
30  B 
31  A 
32  A 
Remember, your output is not likely to be identical to what we got above, but the number assigned to each treatment should be the same in each group after every set of 4 patients.
Future treatment assignments in a randomization scheme should not be discoverable by the investigator. Otherwise, the minimization of selection bias offered by randomization is lost. The administration of the randomization scheme should not be physically available to the investigator. This usually is not the case in multicenter trials, but the problem usually arises in small singlecenter trials. Logistical problems can arise in trials with hospitalized patients in which 24hour access to randomization is necessary. Sometimes, sealed envelopes are used as a means of keeping the randomized treatment assignments confidential until a patient is eligible for entry. However, it is relatively easy for investigators to tamper with the envelope system.
SAS® Example
Example randomization plan
Many clinical trials rely on pharmacies to package the drugs so that they are masked to investigators and patients. For example, consider a twoarmed trial with a target sample size of 96 randomized subjects (48 within each treatment group). The pharmacist constructs 96 drug packets and randomly assigns numeric codes from 01 to 96 which are printed on the drug packet labels. The pharmacist gives the investigator the masked drug packets (with their numeric codes). When a subject is eligible for randomization, the investigator selects the next drug packet (in numeric order). In this way the investigator is kept from knowing which treatment is assigned to which patient.
Here is a SAS program that provides ...
*******************************************************************************
* This program in SAS provides a permuted blocks randomization scheme for *
* equal allocation of two treatments, denoted as A and B. *
* *
* The user needs to specify values for the desired sample size (samplesize), *
* the maximum block size (blocksize = a number divisible by 2), and an *
* indicator as to whether the block size is fixed or random (randomblocksize *
* = 0 or 1, respectively). *
*******************************************************************************;
data values;
samplesize=108;
maxblocksize=6;
randomblocksize=1;
run;
data randomization_plan;
set values;
interim_ss+0;
do while(interim_ss<=samplesize);
block+1;
blocksize=maxblocksize;
if randomblocksize=1 then do;
blocksize=ceil(maxblocksize*ranuni(0));
if mod(blocksize,2)=1 then blocksize=blocksize+1;
end;
interim_ss=interim_ss+blocksize;
na=round(blocksize/2);
nb=blocksizena;
nna=0;
nnb=0;
do i=1 to blocksize by 1;
subject+1;
if nna=na then treatment="B";
if nnb=nb then treatment="A";
else do;
aprob=(nanna)/(na+nbnnannb);
u=ranuni(0);
if (0<=u<=aprob) then do;
treatment="A";
nna=nna+1;
end;
if (aprob<u<=1) then do;
treatment="B";
nnb=nnb+1;
end;
end;
keep subject treatment block blocksize interim_ss;
output;
end;
end;
run;
proc print data=randomization_plan;
id subject;
var treatment block blocksize;
title "Randomization Plan for Equal Allocation of Treatments A and B";
run;
8.8  Unequal Treatment Allocation
8.8  Unequal Treatment AllocationTo maximize the efficiency (statistical power) of treatment comparisons, investigators typically employ equal allocation of patients to treatment groups (this assumes that the variability in the outcome measure is the same for each treatment).
Unequal allocation may be preferable in some situations. An unequal allocation that favors an experimental therapy over placebo could help recruitment and it would increase the experience with the experimental therapy. This also provides the opportunity to perform some subset analyses of interest, e.g., if more elderly patients are assigned to the experimental therapy, then the unequal allocation would yield more elderly patients on the experimental therapy.
Another example where unequal allocation may be desirable occurs when one therapy is extremely expensive in comparison to the other therapies in the trial. For budget reasons, you may not be able to assign as many to the expensive therapy.
If it is known that one treatment is more variable (less precise) in the outcome response than the other treatments, then the statistical power for treatment comparisons is maximized with unequal allocation. The allocation ratio should be
\(r = n_1/n_2 = \sigma^1 / \sigma^2\)
which is a ratio of the known standard deviations. Thus, the treatment that yields less precision (larger standard deviation) should receive more patients, an unequal allocation. Because there is more 'noise', more patients, larger sample size will help to cut through this noise.
8.9  Randomization Prior to Informed Consent
8.9  Randomization Prior to Informed ConsentRandomization prior to informed consent can increase the number of trial participants, but it causes some difficulties. This is not recommended practice. Here's why...
One particular scheme with experimental and standard treatments that has received some attention is as follows. Eligible patients are randomized prior to providing consent. If the patient is assigned to the standard therapy, then it is offered to the patient without the need for consent. If the patient is randomized to the experimental therapy, then the patient is asked for consent. If this patient refuses, however, then he/she is offered the standard therapy. An "intenttotreat" analysis is performed based on the randomized assignment.
This approach can increase trial participation, but patients who are randomized to the experimental treatment and refuse will dilute the treatment difference at the time of data analysis. In addition, the "intenttotreat" analysis will introduce bias.
There are ethical problems as well because:
 subjects are randomized to treatment without having been properly informed and without providing their consent, and
 subjects randomized to standard therapy have been denied the chance of receiving the experimental therapy.
For all of these reasons, randomization prior to informed consent is not recommended.
8.10  Summary
8.10  SummaryIn this lesson, among other things, we learned:
 Identify three benefits of randomization
 Distinguish simple randomization from constrained randomization.
 State the purpose of randomization in permuted blocks.
 State the objective of stratified randomization.
 Contrast the benefits of permuted blocks to those of adaptive randomization schemes.
 Use a SAS program to produce a permuted blocks randomization plan.
 Use an allocation ratio that will maximize statistical power in the situation where greater variability is expected in one treatment group than the other.
 Provide the rationale against randomizing prior to informed consent.