%include '~m080449/ccsic/mymacs/consort.sas' / nosource; proc format; value off1f 1='Ineligible' 2='Insurance Denied'; value off2f 1='Withdrawal' 2='Progression' 3='Adverse Event' 4='Death' 5='Alternate Therapy'; run; data example; call streaminit(1); array u {1500}; do j = 1 to dim(u);*Variables; u(j)=rand("Uniform"); end; length id 8. arm $25. sex smoke_stat $10. offtrt 8. reg rand treated neo rt surg adj comp $50.; do i = 1 to 1500;*Patients; id=i; call missing(reg,rand,treated,neo,surg,rt,adj,comp); arm=catx(' ','Arm',1+round(rand("Uniform"),1)); sex=ifc(rand("Uniform")>0.50,'Male','Female'); smoke_chance=rand("Uniform"); if smoke_chance>0.66 then smoke_stat='Former'; else if smoke_chance>0.33 then smoke_stat='Current'; else smoke_stat='Never'; reg='Registered'; if u(i)>=0.1 then do; rand='Randomized'; if u(i)>=0.15 then do; treated='Started Treatment'; if u(i)>=0.3 then do; neo='Completed Neoadjuvant~Chemotherapy'; if u(i)>=0.35 and arm='Arm 2' then rt='Completed Neoadjuvant RT'; if (arm='Arm 1' or ^missing(rt)) and u(i)>=0.4 then do; surg='Completed Surgery'; if u(i)>=0.5 then do; adj='Started Adjuvant Therapy'; if u(i)>=0.6 then do; comp='Completed All Therapy'; end; end; end; end; if missing(comp) then offtrt2=floor(rand("Uniform")*5+1); end; else offtrt2=floor(rand("Uniform")*3+1); end; else offtrt=floor(rand("Uniform")*2+1); output; end; drop u: i j; format offtrt off1f. offtrt2 off2f.; label arm='Treatment Arm' offtrt='Screen Failure' offtrt2='Off-Treatment' sex='Sex' smoke_stat='Smoking Status'; run; %consort(data=example,id=id, split=|arm, node=reg rand treated neo rt surg adj comp,weighted_row_height=1, offreason=offtrt|offtrt2,TEXTBOX_OFFTRT_ALIGN=right, offreason_label=Screen Failure|Untreated|Off-Treatment, freq=|sex, OFFREASON_XADJUST=-3|5, show_grid=1, font_size=7,width=12,height=11); %consort(data=example,id=id, split=|arm|arm|arm|arm|arm||,remerge=1, node=reg rand treated neo rt surg adj comp, end_summary=sex smoke_stat, font_size=12,textbox_background_color=blue,textbox_outline_color=green, font_color=white,line_color=red,line_size=2pt,width=8,height=9); %consort(data=example,id=id, split=|arm||sex|smoke_stat, node=reg rand treated neo surg adj comp, end_summary=, OFFREASON_XADJUST=-3|5, font_size=7,width=32,height=11); %consort(data=example,id=id, split=|arm, node=reg rand treated neo rt surg adj comp,weighted_row_height=1, offreason=offtrt|offtrt2,TEXTBOX_OFFTRT_ALIGN=right, offreason_label=Screen Failure|Untreated|Off-Treatment, ref_text=Enrollment|Neoadjuvant|Surgery|Adjuvant|Phase 1 Complete, ref_x=5|5|5|5|50, ref_y=8|45|72|88|64, ref_rotate=90|90|90|90|0, ref_font_size=10pt, ref_box_expand=20|100|15|15|0, ref_line_size=0|0|0|0|1pt, ref_line_pattern=2, ref_border_color=red|green|black|blue, ref_background_color=blue|red|green|black|white, ref_border_width=2|2|2|2|0, ref_font_color=white|black|blue|red|black, show_grid=1,show_limits=1);