Permuted Block Randomization Logic
Logic To Assign a Subject to a Treatment Group
Â
- Â Determine the SubGroup the subject belongs in.
- The SubGroup is selected based on values for any Stratification Factors defined and based on Site if "Is Site Specific" is checked.
- For each Treatment, get a count of subjects that are also in the same SubGroup as the subject.
- For the SubGroup, get a list of the Blocks used.
- Determine which Block to use.
- For each Treatment, create a list that contains a Target Size for each Block already used.
- The Target Size is basically the proportion of the Block's size allocated to a Treatment.
Target Size = (Block Size / Sum(All Treatment Weights)) * Treatment Weight
- The Target Size is basically the proportion of the Block's size allocated to a Treatment.
- For each Treatment, allocate the subjects with that treatment to the Treatment's list of Target Sizes. If any past Block or the current Block has room in its Target Size, select the corresponding Block Size as the one to use.
- If there are no slots available in any existing Block, randomly select a new Block from the list of Blocks.
- For each Treatment, create a list that contains a Target Size for each Block already used.
- Create a list of available Treatments.
- Each Treatment will be in the list a Weighted Count number of times.
- Weighted Count for a Treatment is determined by taking the Target Size and subtract the number of subjects with that Treatment that are assigned to the current Block.
- Randomly select a Treatment from the list of Treatments.