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 |
+------------+
Related Posts with Inquiry about randomization (block size 4, 1:1 allocation)
Reshapes wide to long without wave identifierHi I have a follow-up tricky reshape that I would like some help with please. I would like to resha…
Using return matrix from polychoric correlationHello all, I am using stata version 17. I ran a polychoric correlation on about 100 variables. The…
Cross-level interactions vs. separated regressions for categories of the interaction variable in multilevel modelsDear all, I want to investigate which child in a sibling group takes over the care of a parent. The…
Using racial/ethnic demographics as the independent variables in multivariate linear regression?Hello! I am conducting multivariate linear regression using -regress- of Google trend interest (a 10…
Long Panel: I use AB but It is better PVAR or panel ARDL?Hello, My sample is 27 countries over the period 1970-2020. Code: * Example generated by -dataex-…
Subscribe to:
Post Comments (Atom)
0 Response to Inquiry about randomization (block size 4, 1:1 allocation)
Post a Comment