Hi,
I am trying to generate a random sequence with 4 treatment groups into 2 strata and using either block sizes of 4 or 8. I set my observations at 400 to get 100 in each treatment group. I use the following code below. I am having a problem afterwards where the strata option is not being randomized. it shows all 1s then all 2s below. How do I get both the treatment groups and the gender randomized within the block sizes? Thank you.
ralloc blknum blzsize treat, nsubj(400) osize(2) equal ntreat(4) saving(mytrial) shape(long) seed(date) trtlab(0 1 2 3) strata(2) multif
set seed 314159
gen random = uniform()
sort blknum StratID random
I am trying to generate a random sequence with 4 treatment groups into 2 strata and using either block sizes of 4 or 8. I set my observations at 400 to get 100 in each treatment group. I use the following code below. I am having a problem afterwards where the strata option is not being randomized. it shows all 1s then all 2s below. How do I get both the treatment groups and the gender randomized within the block sizes? Thank you.
ralloc blknum blzsize treat, nsubj(400) osize(2) equal ntreat(4) saving(mytrial) shape(long) seed(date) trtlab(0 1 2 3) strata(2) multif
set seed 314159
gen random = uniform()
sort blknum StratID random
Comment