Session Ready
Exercise

Stratified randomization

Stratified randomization can be used to produce separate lists for different groups of patients. Suppose investigators would like a reasonable balance between two treatment groups for age group (

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 at least 100 for two treatment arms and random block sizes between 2 and 8 for patients under 55 years. Store in under55.

  • Repeat for those aged over 55 years and store as above55.

  • Display the first few rows of under55 and above55.

  • Tabulate the numbers of patients assigned to each arm within each list.