BookmarkSubscribeRSS Feed
k2k
Calcite | Level 5 k2k
Calcite | Level 5

Dear all

I want to generate a randomization for clinical study.

In that each subject is having 12 sites  (6 per/hand )(8 treated sites and 4 control(untreated) sites). 

All 12 sites should be randomize but 4 control sites should split equally in 2 arm that is (2 control+6 treated per hand ), so i generated randomization by using proc plan, but in that 4 control sites are not splitting equally in to two hands some times its coming 3 per hand and 1 per hand. so how to sort this issue.

pls guide me..

proc plan seed=254642;

factors subj=24 ORDERED  site=12;

treatments trt=12 random;

output out=abc 

               site cvals =('S1' 'S2' 'S3' 'S4' 'S5' 'S6' 'S7' 'S8' 'S9' 'S10' 'S11' 'S12') RANDOM

               trt cvals=('1' '2' '3' '4' '5' '6' '7' '8'  'UT' 'UT' 'UT' 'UT') RANDOM;

run;

proc transpose data= abc out=rand2 prefix=site;

by subj ;

var trt ;

run;

proc print data=rand2 (drop=_name_);

run;

2 REPLIES 2
data_null__
Jade | Level 19

If the restriction is 2 control sites per hand I think you will need to include a factor for hand and site(hand).

proc plan seed=254642;
  
factors subject=24 ordered hand=2 site=6 trt=1 of 12 perm / noprint;
  
output out=plan1 trt nvals=(1 2 3 4 0 0 5 6 7 8 0 0);
   run;
  
factors subject=24 ordered trt=8 random / noprint;
  
output data=plan1 out=plan2;
   run;
  
quit;

proc sort out=plan3;
   by subject hand site;
   run;
proc transpose data=plan3 out=rand2(drop=_name_) prefix=site;
   by subject hand;
   var trt;
   run;
proc print;
  
by subject;
   id subject;
   run;
k2k
Calcite | Level 5 k2k
Calcite | Level 5

Dear sir,

Thanks for your reply.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 835 views
  • 3 likes
  • 2 in conversation