Random Assignment Generator for a Factorial Experiment with Many Conditions

Description

This applet provides a list of random numbers that can be used to assign participants to conditions in an experiment with many conditions, such as a factorial experiment. (Read more about factorial experiments.)

Enter the number of participants N, and the number of conditions C, for the experiment you are planning. This applet will then provide a random number for each participant. This will be a number from 1 to C. For example, if the 4th number in the list is 7, the 4th subject is randomly assigned to experiment condition 7. Random numbers will be generated so that the experiment is approximately balanced.

Generate list of random numbers for assignment

Number of Participants, N :
Number of Conditions, C:

How do I count participants?

If you are randomizing individual subjects to conditions, the number of participants is simply the number of subjects in the study. However, if you are instead randomizing to preexisting clusters of individuals, such as schools or clinics, the number of participants is the number of clusters in the study. For more information, see Dziak, Nahum-Shani, and Collins (2012).

How do I count conditions?

The number of conditions is equal to the number of cells in the experiment. For example, in a 2×2×2 factorial experiment, there are 8 conditions because there are 8 possible combination of assignments to the factors, as in the table below.

Sample 2x2x2 experiment

 

Factor

Condition #

A

B

C

1

Off

Off

Off

2

Off

Off

On

3

Off

On

Off

4

Off

On

On

5

On

Off

Off

6

On

Off

On

7

On

On

Off

8

On

On

On

Should I do a factorial experiment?

Read an explanation of factorial experiments and an introductory example.

Technical Details

The applet generates N/C sets of integers, each a random permutation of the integers 1 through C. Each set will contain the numbers 1 through C in random order. If N is not evenly divisible by C, then there will be a few left-over numbers at the end, which do not form a complete set; this is not problematic. By keeping the number of participants in each condition as close to equal as is possible, the applet causes the experiment to be approximately balanced, which is usually beneficial for the power and precision of the results. The sets do not necessarily represent a “blocking” or “matching” factor or any other part of the actual design or analysis; they are simply a convenience for keeping the design balanced. This applet will work for full factorial, fractional factorial, and one-way comparative experiments. For more information on these designs, see Collins, Dziak, and Li (2009).

References

Collins, L. M., Dziak, J. J., and Li, R. Design of experiments with multiple independent variables: A resource management perspective on complete and reduced factorial designs. Psychological Methods 2009; 14:202-224. PMCID: PMC2796056

Dziak, J.J., Nahum-Shani, I., and Collins, L.M. Multilevel factorial experiments for developing behavioral interventions. Psychological Methods 2012; 17:153-175. PMCID: PMC3351535.