I want to use allocation sequence to make sure that the actual random is going well.
Random rules are based on k size.
I would also like to check when the interval between SEQ and RN_SEQ becomes the same again.
Reflecting this, I would like to write a process that creates an ADJUST SEQ and compares it using PROC COMPARE, but I am asking you a question because many parts are difficult.
I want to use allocation sequence to make sure that the actual random is going well.
The following data are examples.
We judge that the random progress was made when yn was 1.
Random rules are based on k size.
For example, if the block size of site a is 3, one out of three patients in a registered patient should be randomized, and the number that should be random was written as RN_SEQ.
SEQ | ID | SITE | YN | DATE |
---|---|---|---|---|
1 | 1 | A | 1 | 2022-03-01 |
1 | 2 | A | 2022-03-02 | |
2 | 3 | A | 2022-03-04 | |
4 | 4 | A | 2022-03-04 | |
5 | 5 | A | 1 | 2022-03-05 |
6 | 6 | A | 2022-03-06 | |
7 | 7 | A | 1 | 2022-03-09 |
8 | 8 | A | 1 | 2022-03-10 |
9 | 9 | A | 2022-03-11 | |
10 | 10 | A | 2022-03-11 | |
1 | 11 | B | 1 | 2022-02-06 |
2 | 12 | B | 2022-02-09 | |
3 | 13 | B | 2022-02-09 | |
4 | 14 | B | 2022-02-09 | |
5 | 15 | B | 1 | 2022-02-09 |
SITE | K | RN_SEQ |
---|---|---|
A | 3 | 1 |
A | 3 | 5 |
A | 3 | 8 |
A | 3 | 10 |
A | 3 | … |
B | 4 | 2 |
B | 4 | 6 |
A | 4 | … |
The SEQ for random was carried out in the order of DATE.
If the number in RN_SEQ and the SEQ with YN of 1 are not the same, it is judged to be ERROR.
I would like to check the period in which the RANDOM proceeds normally and the period in which it did not proceed normally.
o———o|x—-x|o———o
x—-x|o———————-o
o——o|x|o—————–o
x———x|o—–o|x–x|o—o
I’ve thought of a case where ERROR can occur.
I would also like to check when the interval between SEQ and RN_SEQ becomes the same again.
Reflecting this, I would like to write a process that creates an ADJUST SEQ and compares it using PROC COMPARE, but I am asking you a question because many parts are difficult.
DATA LAG;
SET ANALYSET;
IF SITE='A' AND YN=1;
L = LAG(SEQ);
RUN;
DATA LAG1;
SET LAG;
IF L=. THEN L=0;
DIF = SEQ-L;
RUN;
DATA M;
MERGE LAG1 BLOCK;
IF DIF ^= DIF_EX THEN ER=1; ELSE ER=0;
RUN;
It was the best limit I could write
Yeonju Yu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.