'SAS Proc Plan Random Block Size for Randomization List - Or how to do in R?
I am trying to create a randomziation list with PROC PLAN and I am trying to figure out how to do a random block design (that is, the block size changes randomly). I know how to set a block size, but I would like the block size to change so it is unknown what group the last participant will be placed in (for example, if I know the block size is 4 and my first three participants are places in ABA, I know the 4th will be placed in B. Having random blocks will eliminate this).
Here is example of the code I am trying to manipulate:
proc plan seed=12345;
factors blocknum = 10 random treat = 4 random;
output out = list treat nvals=(1 1 0 0) random;
run;
What I would like to do is so that 4 changes (aka to 8, 12, etc.) each time where particiapnts will still be allocated to either group at a 1:1 ratio. Thank you for any help I may recieve!
ALSO If this could be done in R, that would be great too!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
