Assigning Subjects to a Single Treatment

**Newest!** Random block sizes

**Newer!** Specify initial subject ID number

**New!** How Randomization Plans Are
Generated

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.

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.

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

Each block is generated in turn.

- A list of the treatments in
reverse alphabetical order is created. If the ordered treatment names
are T(1),..,T(
*t*) and each treatment appears in the block*k*times, the list starts out as*k*copies of T(1) followed by*k*copies of T(2) and so on for a total of*kt*treatment names. - A random permuation vector (P(
*i*):*i*=1,..,*kt*) is generated. Initially, P(*i*)=*i*. At each step*i*, as*i*goes from*kt*to 2, a random integer is generated between 1 and*i*, inclusive. The value at that position in the permuation vector swaps places with the value currently in position*i*.To demonstrate that this method produces a random permutation, notice that this is equivalent to selecting numbers out of a hat without replacement. At the first step, a value is selected at random and placed into slot

*kt*. At the second step, a value is selected from those that remain and is placed in slot*kt-1*, and so on. - The list of treatments from the first step is reordered according to
the permutation vector. The treatment ultimately in position
*i*is the treatment that was initially in position P(i).

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

** 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.

**References**

*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]