REDCap: Randomization

Content Menu - Caption for accessbility, will not be displayed

Overview

Setup Randomization

Create
Randomization Table

Automatic 
Randomizations

Multiple Randomizations


Overview

Randomization is a process that assigns participants/subjects by chance (rather than by choice) into specific groups, typically for clinical research and clinical trials.

The randomization module in REDCap helps implement a defined randomization model within a REDCap project, allowing you to randomize participants (i.e. records in your project). Within randomization, you will first define the randomization model with various options including . 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.

To use randomization in a project, you will first need to enable it under Project Setup - Enable optional modules and customizations.  After this has been enabled an additional Project Setup step will appear to setup the randomization settings (shown in next section).  

Enable randomization in a project
Enable Randomization module in a project

When enabled a field's option choices will be replaced with a "Randomize" button. 

Randomization field button
Example of a Randomize field button

Once a record has been randomized it CANNOT be undone.  Be sure to be very careful about when a randomization should take place. 

Permissions:

Randomization rights (given by setting User Rights permissions) are required for all users of a project responsible for randomizing a record manually.  Without this permission, a user is not able to select the "Randomize" button for a given randomization field. 

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.

Randomization user rights
Randomization permissions options

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. 

Randomize rights overrides form-level rights in this way, but only when using, and specifically for, fields set as randomization strata fields. 

To the top


Step 1:  Setup Randomization

Settings for setup of randomization modules can be found under Project Setup after enabling Randomization for the REDCap project. Selecting "Set up randomization" will take you to the main Randomization page. 

Project Setup Randomization
Setup randomization module in Project Setup

Once in the Randomization section, you will see any existing randomization models that have been added to the project.  To add a new randomization, select the "Add new randomization model" button. 

Main randomization page
Add new randomization model button

There are a series of steps to follow to properly setup your new randomization model.  Under Step 1 there are several options you can choose to enable.  Step 1: Optionas A and B are not required.  Only Option C - "Choose your randomization field" is required. 

Option A  -  Allows you to use stratified randomization for balancing subgroups using values from other fields saved within the project.  Common stratification fields used are gender, race, relevant medical history, or age. 

Option B  -  Allows you to randomize by group or study site.  This is useful if your project is a multi-site project.  Here you can break randomization down by a field used in the project that indicates group or by Data Access Groups (DAGs) if used within a project. 

Option C (REQUIRED) Select the field in your project that should be used for Randomization under this module.  This is a field created in your project under a given instrument within the Online Designer and which will solely be used for this randomization module. There are two ways to create a randomization field:

  • Use a single multiple choice field type (radio or drop-down) with groups for randomization as the multiple choice options. 
  • Blinded Randomization Only: Create a text field without any validation to store a randomization number.  
Randomization settings step 1
Randomization setting options for step 1

After you have selected your settings for this randomization model.  Select "Save randomization model" and continue to the next steps which will guide you in creating the format for your randomization allocation table (next section). 

To the top


Steps 2 & 3:  Create Randomization Table

Step 2 of the Randomization Model Settings page provides templates for your randomization allocation table.  This allocation table is used by REDCap to determine the assignments of each record. The downloadable templates are examples ONLY.  They should be modified to include an actual randomization schema. 

REDCap does NOT automatically generate randomized tables for you.  Instead, you will use the template formats it provides to create a table of your own and then import that created randomized table in Step 3. 

Randomization Step 2 - Table Templates
Option to download randomization table templates

Important: For Research categorized projects, randomization allocation tables should be created with the help of a statistician to ensure the generated tables are properly randomized and the number of allocations is appropriate.  It is good practice to add more allocations to the table than what you need in the case of subject withdraw or additional recruitment.  

After your allocation table has been probably created you can upload the CSV file under Step 3.  

REDCap will ask that you create different randomization tables for Development and Production environments.  These two tables cannot be identical.  This allows you to test your randomization with a few records in development but those records will have an entirely new randomization pattern when you move to real data collection. 

Upload allocation table
Options to upload randomization allocation tables

These tables cannot be modified after the project is moved to Production.  Make sure your randomization is working as intended before requesting a Move to Production to start real data collection. 

To the top


Step 4:  Automatic (Logic Based) Randomizations

By default, REDCap uses manual randomization to randomization records.  This means that a user with Randomization permissions must go into a record and select the "Randomize" button found on the instrument where the randomization field can be found. 

Alternatively, in Step 4 you can set automatic Trigger Logic to randomize a record the moment specific conditions are met. 

In the example below, a record will be automatically randomized the moment the field "age" in the Baseline Info instrument has been saved with a value equal to or over the age of 18. 

Randomization example by trigger logic
Example Randomization trigger logic setup

The logic for randomization follows the same syntax and logic used elsewhere within REDCap.  Piping and smart variables may be used for more advanced logic building. 

When using trigger logic there are two different options for automatic triggering of a randomization:

  1. Trigger Logic, for users with Randomize permission only
  2. Trigger Logic, for all users (including survey respondents) 

The second option allows for randomization whenever the logic is true.  This can be useful if the randomization is based around a response to a survey for example.  Conversely, if you would like to verify the data entered before automatically randomizing then you may want to select option 1 where a user can verify the information first. 

To the top


Multiple Randomizations 

Multiple randomizations can now occur for a single project record.  A record may be randomized as many time as there are additional randomization models. 

New models can be added under the Randomization page in Project Setup.  As additional randomization models are added, they will appear in the list of current models used within the project.  Each model will require a separate field to be designated as that model's "Randomization" field.  This means that if you have multiple models, you will need multiple fields respectively added somewhere in your project that are specific for each separate randomization that will occur. 

multiple randomizations
Display for managing multiple randomization models

You may mix and match different settings to have some randomizations occur manually or by logic as needed. 


To the top



Keywords:
REDCap, random, randomization, randomize, assign, group, multiple 
Doc ID:
148483
Owned by:
Amanda Y. in SMPH Research Informatics
Created:
2025-02-20
Updated:
2025-02-20
Sites:
SMPH Research Informatics , SMPH Research Informatics TEST