Download Randomization Schedules via SAS

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
j
R1\NllOMIZATION SCHEDULES VIA SAS
John Steedi', Abbott Labs*
The MATRIX procedure also provides a convenient method of computing the number of runs per
treatment by block. The two different types of
objects for counting the number of runs associated with treatment A, say, are: (I} treatment A
and (2) not:. treatment A. Since, within each
block, we have R objects of one kind (treatment
A) and P-R objects of the other kind (not treatment A) the mean number of runa is
In drug research it is often necessary to
produce a randomization schedule which a~s1gn8
the treatment each patient is to receive. The
purpose af this paper is to demonstrate,·via SAS~
the production of these tables using- Pro~edures
PLAN~ PRINIIO and MATRIX, for the Randomized
Block Design (balanced). Then, a check for "unusual u rand~izatipn8 is made by computing the.
number of runs for each treatment by block.
The concepts ~nd methods presentE::d herein
can be applied to many statistical designs but
OUT discussion and example will trQat only the
Randomized Block DesIgn (ba.lanced) with -p.ara.met"ers B, P and T where
B ~ number" of Blocks,
P number of Patients per Block,
T ~ number of Treatments.
In OUr'" example which "follows B-3,. P=15 and
T=3. Hence, the total number of pat~ents randomized is PROD = B"P ,. 45 and the "number of tTeat~
ment repeats with~n a block 1s R = p/T"= 5. Tha
output Qf PROe ~LAN, in this example, is read
into a new data set" via:PROC PRINTTO. Then the
desired randomization schedule is produced via
PROC MATRIX.
E(Runs)
=
1
+
ZR (P-R)
P
the standard deviation is
S.D.~[ZR
=
(P-R
.2R
(P-R) -
The minimum number of runs is 2 and the
maximum is 2R + 1, (when T = 2 the maximum 19
2R). These t~ parameters together with the mean
and standard deviation can be used to identify
"unusual II raridomizations.
Returning to our example, with R=5 and P=15
we "have
E (Runs)= 7.67
ana
S.D. = 1.64
EXAMPLE
(N~te:
II EXEC 5AS
IlrT2oF~01
~xpre9Qions that need to be changed fOT. different values of B, P and T
a:re preceded by comment statements and underlined).
DD
URIT=SJSDA,~PAC~:(TR~,{15,5)
OPTlOIIS NOD ATE NOllUIlBER)
PROC pRINrTO uHn=20 NEW,
DATA INlTHL,
*PROVIDE .VALUES OF B,P, r.ND T WHERE
*S-NUMBER OF B~OCKS
* T~NUMaER or TREATMENTS,
*P.NUM6ER or PATIENTS P~R BLOCK,
*Rep/! MVST Bt AN INT~GERI
8 m3,
T-a,
P.. t5,
~"PIT ;
PI\ODKB"PI
DATA I'!.A)l1
PI\OC PLAII I
•
U
TH
r CTORS 8"3
p"
!'MC P 1111'TO,
5
or
BAND 1',
NO~RINTI
rT~0r11lk111
INPVt~2 BLOCK ~IPUT ~IHrlLt_1
*INPUT T~E VALVE orPAs YPI
DATA pTo/FtLE PRINT
lNFlLt
[jf-BLO¢iC>jjTHf;Nfij pliTY!;Yf51~]
IF BLOCF>0 THEN OUTPUt;
DROP ijLOCKI
DATA DI
PROC IlflTI'IIXI
FETCH I)lIT O~TA=IUJTIA~1
*Developmental work on this paper was completed
prior to ~plQyment at ABBOTT LABS.
"
p2 (P-l).
e"INlT!I');
TIOINlT{t,2)I
P=lNll'll,3),
R=IlIlT(1,4)1
PIIOD=INITII ,5) I
FETtH RANP
*
~~TA=PTOI
CREAT!: MUIIIC!:!! OF Ij'S ArID 1 's rOR
T~1:..J;=RM!Il< (_~R7-+'-!LlLI==;:-:-;==-;-c"---'
TIIT.,-=(RA'U.>Il) .. (RAND < 12"R+1lI,
TRT.l~RA~D> (2*11)
INT liT_I T1I1_2 TR • 1
TilT" TRT_I + (2*TIIT.2) + (3*TRT_Jl;
PlltNT TRTI
RUHS .. JCII, To! l;
E~CH
TliT,
DO I- I TO U BY I,
DO J= 2 TO P BY 1;
* CQMPUTE
THE NUMbf:R OF RUNS FOR E~H. TREATI4E~'N",T';b;-;'o,....,.......,-;-:----t
·TR'l'.;:rtT~Jl'fE-·T-iit.:;In;J~-ll THEN HUNS! I;i )~RUNSCl, I) +l'
~
I f TFT.HI,J) HE. TRT.2(I,J-ll THEN RUNSCI,2l.RUNS(I,2l+11
IF TRT_3Cl,J) HE TRT_J(I,J-ll THF.N RUNSCI,J).RUNS-n,)HII
f,ND,
~NDI
OUTPUT RUNS OUT=PUN,
TIIT.OUT= JCPIIOD,2.011
DO I-I TO B 6Y I'
DO J=1 TO P 51 11
LOC= (V*tI-I» +J I
TRT.OUT(LOC,I)=LOCr
. TRT.OUTtLOC,2)=TRTIl,J)/
ENDI
I!:IID/
OUTPU'!' tRT.OUT OUT=TREAOUT (RENAMt:"(COl;1=PATN"O COL2=TRTl)/
PArA , SET RUN,
TITLEI NUMBER OF RUNS lit TREATMENT AND nr,oCK,
T1TI;E2 WHERE THE COLUMNS ARE tREATME~TS AND THE ROWS ARE SLaCKS,
PRO, PRINTI
JO RQ'"
DATAl Sl::T l'REAOUTI
,!1~OP
ROW,
flTt"l
RANDQMUATIQN SCHF:DULE /
• IIPur TITL~ or STUDY;
TITLE2 DIlUG A VS PRUG ~ IN THE TREA1'MEIoIT or KURTOSIS'
Tl1')..E3 D,,,", S:rATISTICS;
TlTLE4 ~OTOCOL ~01'
F 7RT=1 THE'" TRTI1ENT= PLAC!;BO';
IF 'TRl'~2 THEN TRTHE~T='DP\lG.A·1
IF TilT:) TIIEIi T~T~!ENT= 'DRUG_A',
pifer-t"RT,
PRoe; PRlNTII0 PAT/WI
~HeRE
NUMBER Or RUNS II,{ TREATMENT AND I)t.OCK
TIfE COI,UHNS ARE: T~EATME:NTS AND TItE ROWS A~E: IIt.OCKS
ROW
flOW 1
ROW2
R01ll3
CoLI
COL2
5
4
8
8
6
11
99
COL3
8
9
8
RANDOMIZATION 5CHEDULE
DRUG A va DRUG B IN THE TRE~TMENT or KURTOSIS
DR. STATISTICS
PROTOCOL 001
PATNO
TRTHENT
1
2
1
4
PLACEBO
DRUc..B
ORUG..A
DRUG..B
DRUc..A
DRUG..A
S
6
•
•
•
"0
U
42
43
4r4
45
PLACEBO
DRUG..A
DRUG..!
DRUG~A
DRUG.B
DRUG_B
REFERENCE:
Gibbons, J. D., Nonparametric Statistical lnference,
McGraw Hill (1971)
100