package randomizeBE [🇷 for BE/BA]
❝ […] when we generate the randomization schedule in SAS using PROC PLAN Procedure, we generally take for example if subjects are 12, blocks will be 6…
As specified in your code.
❝ factors blocks=6 random sequence=2 random/ noprint;
❝ Comparison: when we run in SAS, within the block same sequence is not repeating, but when we run in R, we are getting the sequence repeated within the blocks. even though we are getting the P-value of 1.000 in R
RTFM
If blocksize is missing it defaults to 2*number of sequences.
I guess you didn’t specify that you want a blocksize of 6. Hence, with two sequences you will get a blocksize of four:
library(randomizeBE)
print(RL4(nsubj = 12), sumry = TRUE) # blocksize missing
Randomization table created: 2019-08-26 10:28:28
(seed: 6284375 blocksize: 4 )
subject seqno sequence
1 1 TR
2 2 RT
3 2 RT
4 1 TR
5 1 TR
6 1 TR
7 2 RT
8 2 RT
9 2 RT
10 2 RT
11 1 TR
12 1 TR
Summary of randomisation
12 subjects randomized into 2 sequence groups.
Number of subjects in sequence groups:
RT TR
6 6
Runs test of randomness: p.value=0.2259
print(RL4(nsubj = 12, blocksize = 6, seed = 6284375), sumry = TRUE)
Randomization table created: 2019-08-26 10:28:29
(seed: 6284375 blocksize: 6 )
subject seqno sequence
1 2 RT
2 2 RT
3 2 RT
4 1 TR
5 1 TR
6 1 TR
7 2 RT
8 2 RT
9 2 RT
10 1 TR
11 1 TR
12 1 TR
Summary of randomisation
12 subjects randomized into 2 sequence groups.
Number of subjects in sequence groups:
RT TR
6 6
Runs test of randomness: p.value=0.0693
❝ but is it fine to get that.
So what’s the problem?
Dif-tor heh smusma 🖖🏼 Довге життя Україна!
Helmut Schütz
The quality of responses received is directly proportional to the quality of the question asked. 🚮
Science Quotes
Complete thread:
- Randomization Schedule in R sury 2019-08-23 13:39 [🇷 for BE/BA]
- package randomizeBE Helmut 2019-08-24 16:31
- package randomizeBE sury 2019-08-26 09:34
- package randomizeBEHelmut 2019-08-26 10:35
- package randomizeBE sury 2019-08-26 11:54
- (Pseudo-) random numbers, algos, seeds Helmut 2019-08-26 12:28
- how about randomly selected block sizes? yjlee168 2019-08-28 07:25
- how about randomly selected block sizes? ElMaestro 2019-08-28 09:26
- package randomizeBE sury 2019-08-26 11:54
- package randomizeBEHelmut 2019-08-26 10:35
- package randomizeBE sury 2019-08-26 09:34
- package randomizeBE Helmut 2019-08-24 16:31