© 2015 Vanderbilt University
Randomization Module
University of Chicago | Center for Research Informatics | REDCap Randomization Module
2
REDCap Randomization Module
Randomization is a process that assigns participants/subjects by chance (rather than by choice) into
specific groups, typically for clinical research and clinical trials. Example: each subject assigned to
receive either the new treatment or the control (placebo) treatment.
The randomization module in REDCap will help you implement a defined randomization model within
your project, allowing you to randomize your subjects (i.e. records in your project). In this module, you
first define the randomization model with various parameters. Based on the defined parameters, the
module creates a template allocation table, which you can use to structure the randomization table
you will import. The module also monitors the overall allocation progress and assignment of
randomized subjects.
REDCap Helps you implement a defined randomization model within your REDCap project, by allowing
you to
1. Define all of the randomization parameters;
2. Create and upload your custom randomization table (ie, allocation list)
Table serves as a lookup table for deciding how to randomize subjects/records
REDCap DOES NOT create the randomization table for you. This table must be generated outside of
REDCap using other software (e.g. SAS, Stata, R), most likely by the statistician/data analyst involved in
your project.
By letting you create your own allocation table outside of REDCap, it lets you and your team choose
exactly how you wish to structure your allocations and assignments. Examples: block sizes,
permutations, and stratification balancing
Goals of Randomization:
To produce groups that are comparable (ie, balanced) with respect to known or unknown risk
factors.
To remove bias (selection bias and accidental bias).
To guarantee the validity of statistical tests.
To balance treatment groups, stratification factors, or both.
When to randomize?
After determining eligibility
As close to treatment time as possible (to avoid death or withdrawal before treatment start).
User Privileges
User privileges can be set to allow only certain users to be able to set up the randomization, perform
the randomization, or view the allocation dashboard to view progress. If someone is given 'Randomize'
privileges, they will be able to view and modify any existing data already collected for the
randomization strata fields (if stratification is used) when they are performing the randomization, even
if they do not specifically have form-level rights to view the form on which a strata field exists. Thus
Randomize rights trumps form-level rights in this way, but only for the randomization strata fields.
University of Chicago | Center for Research Informatics | REDCap Randomization Module
3
Setting-up a Randomization Model
A randomization model defines how the subjects in the study are randomized. To start the process,
click on the "Enable" button under the “Enable optional modules..” under the "Project Setup" tab.
Next, click on the Randomization link under “Applications” on the left side menu.
Randomization Setup
The randomization model is defined via the "Setup" tab and consists of three main steps:
1. Define your randomization model
2. Download template allocation tables (as Excel/CSV files)
3. Upload your allocation table (CSV file)
Step1 - Define your Randomization Model
The first main step in the setup process is to define your randomization model you will be
implementing and all its parameters, which includes defining strata (if applicable) and optionally
randomizing subjects per group/site (if a multi-site study). In this step, you will define the type of
randomization and how the randomization is applied to the subjects. There are two randomization
types:
1. Use stratified randomization?
2. Randomize by group/site?
University of Chicago | Center for Research Informatics | REDCap Randomization Module
4
Use Stratified Randomization?
Stratified randomization ensures that different groups are balanced. The balance is specified in the
allocation table. Increasing the number of stratification variables will lead to fewer subjects per
stratum.
IMPORTANT: you must revise the data dictionary to include the needed fields to specify the
randomization model.
Randomize by Group/Site?
If this is a multiple site study, this option allows you to stratify the randomization by each group. When
this option is checked, you are given the opportunity to select randomization by data access groups or
by a REDCap drop-down list of the sites.
Choose your Randomization Field
This is the field that will receive the randomization group designation.
Once all parameters are set, save the randomization model.
University of Chicago | Center for Research Informatics | REDCap Randomization Module
5
Step 2 - Download template allocation tables (as Excel/CSV files)
The second main step in the randomization setup is to download the allocation table template.
Template allocation tables contain all the raw coded values for the fields used in your randomization
model.
Will list each multiple choice option's label corresponding to each raw coded value for all the
fields utilized (e.g. it will specify 0=Female and 1=Male for the field 'gender').
If you are using Data Access Groups to randomize by group, then it will additionally list each
group name with its corresponding group ID number.
Does not necessarily matter how you create or set up your allocation table so long as you structure it
correctly.
University of Chicago | Center for Research Informatics | REDCap Randomization Module
6
REDCap creates several example files to download that you may use as a structure when creating your
own randomization table. For this example, I have stratified a hair color field that has 7 different values
and I wish to allocate the participants into 5 groups. My allocation template downloaded from REDCap
looks similar to the following:
REDCap will randomize the participants according to this table. For example, the first participant that
has a hair color of "Light Blond" (corresponding to the value of one) will be allocated to random group
one. The second person with "Light Blond" will be allocated to random group two, etc. Note: Make
sure the number of entries in the randomization table is large enough to accommodate all participants
in each category.
University of Chicago | Center for Research Informatics | REDCap Randomization Module
7
In order to make the allocation schedule more difficult to predict, a temporary column can be added to
the spreadsheet for randomizing the order. The Excel function "RAND()" creates a random value
between 0 and 1. This number can be used as an easy way to populate a third column in the
spreadsheet with a unique random value. If the spreadsheet is sorted by this column, the group and
hair color values will be randomized. For example, after sorting, the spreadsheet may look similar to
the following:
After sorting the table by the random value, the column with the rand() function should be removed
before to saving the spreadsheet as a CSV file and prior to uploading it as the allocation table into
REDCap.
University of Chicago | Center for Research Informatics | REDCap Randomization Module
8
Step 3 - Upload your Allocation Table (CSV file)
The third and final main step in the randomization setup is to upload the allocation table.
Two allocation tables will eventually need to be defined, one for the development stage and a different
one for the production stage.
Randomization User Rights
There are several user privileges that can be utilized for randomization, all of which correspond to
different roles during the randomization process and can be set on the User Rights page.
Setup: will see the Setup tab on the Randomization page, which will allow you to define the
randomization model and all its parameters, as well as upload your custom allocation table
Statistician/data analyst
Dashboard: will see the (Allocation) Dashboard tab on the Randomization page, in which you
may view the overall allocation progress and assignments for subjects that have been
randomized → Study’s PI
Randomize: - will be able to view the Randomize button on the data collection form that contains
the randomization field, thus allowing you to perform the randomization on the subject/record
you are viewing → Research nurse/Study coordinator
Should
NOT be
the same
allocation
table.
University of Chicago | Center for Research Informatics | REDCap Randomization Module
9
Randomizing a Record
The fields that have been specified for randomization will now display a "Randomize" button in the
data entry screen. This will allow you to generate a random value according to the randomization
allocation table.
When a user (who has been given appropriate 'Randomize' user privileges) clicks that button, a pop-up
box will appear that will allow the user to randomize the subject/record. If any grouping or
stratification is being used, the user must provide the group or strata values if any are missing before
they can randomize the subject/record. Pressing the "Randomize" button gives you an opportunity to
double check the required values that will impact the definition of the resulting randomization group.
University of Chicago | Center for Research Informatics | REDCap Randomization Module
10
When the user randomizes the subject/record, REDCap will check the allocation table and assign that
subject's/record’s randomization field value, which will be derived from the next match in the table
based upon the criteria (eg, strata field values, group). If not using stratified randomization and not
randomizing by group/site, then it will simply provide the subject with the very next value in the
allocation table. After updating or providing missing values, a dialog of the random group that was
assigned is displayed.
In addition, after the value of the random group is assigned, the random group field becomes read-only
and the value cannot be changed.
The strata fields you have chosen also become read-only and cannot be changed.
University of Chicago | Center for Research Informatics | REDCap Randomization Module
11
A listing of the records that have been randomized is maintained. To examine those records, click on
the Randomization link in the Applications section of the Navigation Pane.
Dashboard
A dashboard displaying the allocated records and the random group assigned are shown below:
University of Chicago | Center for Research Informatics | REDCap Randomization Module
12
IMPORTANT
How you generate your allocation table should be formal, secure, reproducible, and
unpredictable → Best handled by a statistician; NOT the PI.
Be sure to include more assignments in your allocation table than you think you will need (to
accommodate possible drop-out and drop-in of subjects).
The Setup tab on the Randomization page is ONLY available while the project is in
Development status.
Once the project is in Production, the Setup tab will become permanently locked and no
settings can be modified, nor can any assignments be undone.
Practice the process of randomizing patients by uploading an allocation table while in
Development status and creating dummy records.
Delete the dummy records and upload “final” allocation table before moving to
Production status.