Permuted Block Randomization Logic

Logic To Assign a Subject to a Treatment Group


 

  1.  Determine the SubGroup the subject belongs in.
    1. The SubGroup is selected based on values for any Stratification Factors defined and based on Site if "Is Site Specific" is checked.
  2. For each Treatment, get a count of subjects that are also in the same SubGroup as the subject.
  3. For the SubGroup, get a list of the Blocks used.
  4. Determine which Block to use.
    1. For each Treatment, create a list that contains a Target Size for each Block already used.
      1. 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
        
    2. 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.
    3. If there are no slots available in any existing Block, randomly select a new Block from the list of Blocks.
  5. Create a list of available Treatments.
    1. Each Treatment will be in the list a Weighted Count number of times.
    2. 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.
  6. Randomly select a Treatment from the list of Treatments.