Recipe: randomising an open-label study, stratified by site
What you get: participants assigned to a study arm the moment they are confirmed eligible, by pressing Randomise on their record. Trialflare draws the arm from a sequence it generated before anyone was recruited, keeps the arms balanced within each site and sex, and tells whoever randomised the participant which arm they are in straight away. Every randomisation is recorded with who did it and when, and nobody can change a participant's arm afterwards. It works the same whether participants come to a site or take part remotely.
What you need: your study arms marked as arms, your sites (if you stratify by them), a group per sex, a sequence set up under Participants > Randomisation, and a role for the people who randomise.
This recipe joins up features that each have their own article. Read those for the details of each setting, then come back here for how they fit together:
- Participant management: Randomising participants
- Participant management: Managing groups
- Sites
- Personnel and Roles and permissions
If people in your study must not know which arm a participant is in, see Recipe: a blinded trial that dispenses kits instead.
The example
The steps below set up a two-arm trial:
- Arms: Exercise programme and Usual care, one participant to each for every one to the other (1:1).
- Stratified by site and sex, so each arm gets a similar mix of each. The trial has three sites (Leeds, York and Hull), which makes six strata, such as Female / Leeds.
- Recruiters at each site check eligibility and randomise. They are told the arm straight away, because in an open-label study the participant and the team both know it.
A remote study with no sites is the same recipe without the site factor. If you stratify by nothing at all, leave Stratify by empty and everyone is randomised from one sequence.
Step 1 — Mark the arms
Go to Participants > Participant groups, create a group for each arm, and tick This group is a study arm on each. Arms are kept apart from your other groups: a participant is in at most one, and only arms are offered when you set up randomisation.
Leave Conceal which study arm each participant is in (under Participants > Randomisation) off. That is what makes the study open-label.
Step 2 — Set up what you stratify by
Each factor needs to be something Trialflare can read from the participant's record, or something chosen when they are randomised.
- Site. Create your sites under Sites, if you haven't already. Each participant must be at exactly one of them by the time they are randomised: add them from the Sites column of the participants table, or register them under a site-scoped permission, which does it for you.
- Sex. Create two ordinary groups, Female and Male, without ticking This group is a study arm, and put each participant in one as part of screening or registration. A group can also be filled automatically from an answer on a form. See Automatic membership.
You could instead make sex a factor that is Chosen when randomising, picked in the Randomise dialog. Reading it from a group is safer, because nobody can pick the wrong one in the moment, and the group stays on the record afterwards.
Step 3 — Generate the sequence
Go to Participants > Randomisation and fill in the form:
- Method: Generate a sequence in Trialflare.
- Study arms and ratio: tick both arms and leave the ratio at 1 and 1.
- Block sizes: the sizes ticked by default suit most trials. Each block holds the arms in the ratio, shuffled, and its size is picked at random from those ticked, so nobody can work out the next allocation from the last few.
- Stratify by: add a factor named Site with Level source set to Participant's site, and one named Sex with Participant's group, ticking Female and Male. The form says how many strata that makes.
- Entries per stratum: how many participants each stratum can take before it needs topping up. Size it for your busiest stratum, not the average, because strata fill unevenly. For 200 participants across three sites, something like 60 is reasonable. Each stratum is generated in whole blocks, so some get a few more than you ask for.
Press Generate sequence. The tab now shows the settings and, for each stratum, how many entries it has used and has left. Nobody can see the sequence itself, trial administrators included.
Until the first participant is randomised you can press Change settings and generate a new one. After that the sequence is fixed.
Step 4 — Decide who can randomise
Trial administrators can randomise already. For your recruiters, add a role on the Personnel > Roles tab with trial.randomiseParticipants, alongside what they need to see and register participants. Because the study isn't concealed, they see the arm too, without needing anything else.
At a multi-site study, give site staff trial.randomiseParticipants together with access to their own site's participants only (site.access and site.readParticipants for their site). They can then randomise only the participants they can see.
Step 5 — Randomise a participant
Once a participant is confirmed eligible and consented, open their record and press Randomise under Randomisation. The dialog shows:
- their Site and Sex, read from their record;
- the stratum they will be randomised in, such as Female / Leeds.
If their site or groups don't give one clear answer (no site, or two sex groups), the dialog says what to fix instead, and the button stays off.
Check the stratum and press Randomise. The dialog shows the arm they were allocated. From then on their record shows when they were randomised and in which stratum, and the participants table marks them with a blue shuffle arrow. Use the Randomised filter to list who still needs randomising.
Randomising can't be undone. Nobody can move a randomised participant to the other arm or take them out of theirs. A participant randomised in error should be withdrawn.
Step 6 — Keep it running
- Topping up a stratum. When a stratum runs low, its count turns orange on the Randomisation tab. Type a number in its Extend box and press Add. The new entries continue the same sequence, so nobody already randomised is affected.
- Arm-specific forms and messages. Now that participants are in arms, you can scope stages, automatic messages and packs to an arm, so each arm gets its own schedule. See Stages: Stage scope.
- Sending everyone the same item. If every participant is posted the same device or starter kit, the Packs card on the Randomisation tab can give one out as each participant is randomised, using Every participant gets the same pack. Leave the packs unassigned to a site if they are posted from one place. See Giving out packs.
- Analysis. The trial data export has an Arm column and a Randomised at column, so you can analyse by arm and tell what was recorded before randomisation from what came after.
Step 7 — Try it before you go live
Generate the sequence, then create a few test participants at different sites and in each sex group and randomise them. Check the stratum in the dialog each time, and check that a participant with no site is refused.
When you are done, Reset randomisation on the Randomisation tab takes the arm off the test participants and lets you set up the real sequence. It asks for a reason and for you to confirm it's you, and needs a trial administrator who also holds trial.readAllocation. Delete the test participants afterwards.
Resetting is only for this. On a live study it would undo real participants' allocations, so set up and test before the first real participant is randomised.