Hello,

I'm conducting Stata command for randomization with the following details:

Treatment group : Control group = 1:1
Target sample : 32
Block size 4


1) Does command look okay?

2) There are two arms (1 or 2). Which of the two is the treatment group? 1 or 2?


If you help me, I would really appreciate it!!!!



. set obs 32
number of observations (_N) was 0, now 32
.
. egen arm = seq(), to(2)
.
. egen block = seq(), block(4)
.
. set seed 11
.
. gen random = uniform()
.
. bysort block (random): gen byte seqn = _n
.
. bysort block (seqn): l seqn arm

-----------------------------------------------------------------------------------------------
-> block = 1

+------------+
| seqn arm |
|------------|
1. | 1 1 |
2. | 2 1 |
3. | 3 2 |
4. | 4 2 |
+------------+

-----------------------------------------------------------------------------------------------
-> block = 2

+------------+
| seqn arm |
|------------|
1. | 1 1 |
2. | 2 2 |
3. | 3 2 |
4. | 4 1 |
+------------+