Randomization.com Help File:
Assigning Subjects to a Single Treatment

Newest! Random block sizes

Newer! Specify initial subject ID number

New! How Randomization Plans Are Generated

The Mechanics of Using the Program

Up to 20 treatments can be specified. The randomization plan is not affected by the order in which the treatments are entered or the particular boxes left blank if not all are needed. The program begins by sorting treatment names internally. The sorting is case sensitive, however, so the same capitalization should be used when recreating an earlier plan.

A randomization can be carried out as many blocks to insure against serious imbalance should the study be terminated prematurely. For example, instead of having 100 subjects randomized to one of two treatments in a single block, they might be randomized as 5 blocks of 20 subjects. This will insure that the number of subjects on each treatment will be equal every time the total number entered is a multiple of 20. See Fleiss (1986, sec. 3.1). The number of subjects per block must be a multiple of the number of treatments.

The seed for the random number generator (Wichmann and Hill, 1982, as modified by McLeod, 1985) is obtained from the clock of the local computer and is printed at the bottom of the randomization plan. If a seed is included in the request, it overrides the value obtained from the clock and can be used to reproduce or verify a particular plan.

Initial subject ID number: By default, the randomization plan will number treatments starting with 1. The starting value can be changed by placing the chosen value in the box labeled Initial subject ID number. A starting value different from 1 might be entered when plans call for a particular set of consecutive subject IDs to be used. The starting value would be the first ID number of the set. It is also helpful when a study is extended and an additional set of random assignments is needed. The additional assignments can now be numbered starting where the original set left off.

Some Special Situations

To randomize subjects with respect to several experimental factors, use a set of labels composed of all possible combinations of the original factor levels. For example, if subjects are to be randomly assigned to one of two levels of dietary supplement (LOW/HIGH) and one of two types of oil (PEANUT/RICE), use a set of 4 treatment labels: "Low/Peanut", "High/Peanut", "Low/Rice", "High/Rice".

To generate random permutations of treatments, use the random permutation generator.

To generate a plan with unequal numbers of subjects on each treatment, enter the labels in the worksheet in proportion to how they are to compose the plan. For example, to have twice as many subjects receive treatment A as treatment B, enter the label A twice and B once.

How Randomization Plans Are Generated

Randomization.com uses the pseudo-random number generator of Wichmann and Hill (1982) as modified by McLeod (1985). The generator uses three seeds. The first seed is always 12345. The second seed is always 23456. The third seed may be specified by the user, but is typically obtained from the local computer's clock as

That is, 1 is added to the integer remainder from dividing 1000*seconds+10*minutes+hours by 29,998. Thus, the third seed is an integer between 1 and 29,998, inclusive.

Each block is generated in turn.

Random Block Sizes

With randomly permuted blocks, subjects are assigned to treatment in blocks to insure that equal number of subjects have been assigned to each treatment each time the number of subjects is a multiple of the block size.

Some concern has been voiced that a study could be compromized, especially an open label study, if the block size becomes known. Someone keeping careful track would know the treatment that would be given to the remaining members of a block once there is only one treatment left to be assigned. In order to counter this, it has been suggested that more than one block size be used so that no one could be sure of when a particular block of assignments would be finished.

The generator now makes it possible to assign treatments with random block sizes. The user merely specifies the different numbers of subjects per block and the number of each type of block desired. The generator randomizes the order in which blocks of various sizes appear in addition to randomizing treatment within each block.

If everything has gone as planned, random block size has been implemented in a way that gives the same results as the previous version of the generator when there is only one block size. That is, this new version should be able to recreate randomization plans generated by the previous version if the labels, block size, and seed are provided. The previous version of the generator is still available. Please let me know immediately if ANY discrepancies are seen.

Notice! I could spend a HUGE amount of time writing code to trap errors. I trap the most likely ones. However, someone hell-bent and determined could probably come up with a set of conditions that would cause the program to fail ignominiously. However, it should fail rather than generate nonsense. If in practice a set of conditions causes the program to fail, let me know and I'll write the commands to trap it and generate the appropriate alert.

Notice! There may be small changes to the program to add comments or trap errors. These WILL NOT be announced or otherwise documented. Anything that affects the way calculations are performed WILL be documented.


Fleiss, JL (1986). The Design and Analysis of Clinical Experiments. New York: John Wiley and Sons.

McLeod, A. Ian (1985), "Remark AS R58. A remark on algorithm AS 183. An efficient and portable pseudo-random number generator," Applied Statistics, 34, 198-200.

Wichmann BA and Hill ID (1982), "Algorithm AS 183. An efficient and portable pseudo-random number generator," Applied Statistics, 31, 188-190.

[back to Randomization Plan generator]

Copyright © 1997 Gerard E. Dallal