Rolf Klemm
> I want to generate a randomization schedule for a study with 2 arms
> for a sample size of 800 with a block size of 8, or 100 blocks of 8.
> Is there a way to do this in Stata?
If I understand this correctly, you want to set up
a repeated list of identifiers and then shuffle it.
This illustrates some technique:
. set obs 800
. egen id = seq(), to(8)
. egen block = seq(), block(8)
. * or choose a different pie
. set seed 314159
. gen random = uniform()
. sort block random
. list block id
An alternative to -egen, seq()- is -egen, repeat()- on SSC.
That will repeat sequences other than contiguous integers.
Nick
[email protected]
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/