Session Ready
Exercise

Block randomization

The previous list based on simple randomization did not lead to equal numbers in each group. Equal numbers in each group are desired when we have a design with equal allocation to the treatment groups.

Here we will use random permuted blocks of size 2 to ensure equal numbers in each group after every two patients. The blockrand library has been preloaded for this session.

Instructions
100 XP
  • Use the blockrand() function within the blockrand package to generate a list of length 14 for two treatment arms and a block size of 2. Store this in block2.

  • Display the contents of block2.

  • Tabulate the numbers of patients assigned to each arm.