surveyredcaprandomized-algorithm

How can I make randomization automatic on REDCap?


I am running a survey on REDCap where participants need to be assigned to one of three groups before receiving a group-specific intervention to reduce their smartphone use (e.g., 1 - intervention one, 2 - intervention 2, 3 - intervention 3). I have tried using the randomization module, but it requires one to allocate each record manually. For this specific study it becomes a problem, because we want to collect data from hundreds of people who will be completing the study all over the world, meaning that I cannot be on the computer at all times manually randomizing people and entering their records.

Is there a way to set up the randomization (or any other method) so that participants are randomly assigned to one of the three groups?


Solution

  • As you noted, randomisation in REDCap must be executed by a user with sufficient rights to do so, and ordinarily cannot be automated. But there are other options.

    Realtime Randomization

    You should reach out to your local REDCap administrators, as they may be amenable to installing the Realtime Randomization External Module, which may provide you the functionality that you want. This will (I think) automate the execution of the randomize button when a form is completed. Whether it works on surveys I don't fully know. Assuming it does, this is advantageous as it will uses the pre-defined randomisation allocation table that you generate outside REDCap, possibly with the help of a statistician. This is preferred if you need real randomisation.

    Pseudo-randomisation

    If you don't need to use a pre-defined randomisation allocation table, and can get by with each successive participant being allocated to a different group (record 1 -> intervention 1, record 2 -> intervention 2, record 3 -> intervention 3, record 4 -> intervention 1, etc.), so in fact not random at all, but sort of gated, then you can use the record ID in a calculated field to determine which of the three interventions a record should be allocated to. To do this you should return the modulo of the record ID by 3:

    [record-name] - (rounddown([record-name]/3) * 3)
    

    This will return 1, 2 and 0 for record IDs 1, 2 and 3, respectively, and for 4, 5 and 6, respectively, and so on ad infinitum.

    Then, from this value, you can use standard branching logic to display a different fields, direct respondents to different surveys using logic in the survey queue, invite them to specific instruments using logic in automated survey invitations, fire off different alerts with instructions for each intervention group, etc.