Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Randomization with several conditions

    Hi guys,

    I need to randomize clusters with several conditions.

    So there are 2416 clusters (projects) with 7913 members. Within these 7913,
    - 3923 (49.6%) are in category 1,
    - 4241 (53.6%) are in category 2 and
    - 246 (3.1%) are in category 3.

    I need to randomly choose clusters for treatment so that the number of members is around 3500. However, within these 3500, I need
    - 2500 (71%) in category 1,
    - 2100 (60%) in category 2 and
    - 190 (5.5%) in category 3.

    What would be the code to satisfy these requirements?

    I am attaching a link to de-identified data with a list of clusters and the number of members, number of members in category 1, number of members in category 2 and number of members in category 3.

    This is really urgent so I would really appreciate quick responses!
Working...
X