%let gpath='C:\'; %let dpi=100; data LFT_Panel; keep Base Max Group Drug; retain absmax 0; length drug $15; length group $8; label Base="Baseline (/ULN)"; label Max= "Maximum (/ULN)"; do group= 'ALAT', 'ALKPH', 'ASAT', 'BILTOT'; do i=1 to 40; drug = "Drug A (N=209)"; base= (rannorm(2)); max= (rannorm(2)); absmax=max(absmax, max(abs(base), abs(max))); output; drug = "Drug B (N=405)"; base= (rannorm(2)); max= (rannorm(2)); absmax=max(absmax, max(abs(base), abs(max))); output; end; end; call symput ("absmax", absmax); run; data LFT_Panel_Norm; keep Base Max Group Drug Ref; set LFT_Panel end=last; base=1+base/&absmax; max=1+max/&absmax; if last then do; drug = "Drug A (N=209)"; do group= 'ALAT', 'ALKPH', 'ASAT', 'BILTOT'; ref=0; output; ref=4; output; end; end; else output; run; proc template; define style listingsmallfonts; parent = Styles.listing; style GraphFonts from GraphFonts "Fonts used in graph styles" / 'GraphDataFont' = (", ",7pt) 'GraphUnicodeFont' = ("",8pt) 'GraphValueFont' = (", ",7pt) 'GraphLabelFont' = (", ",7pt) 'GraphFootnoteFont' = (", ",7pt) 'GraphTitleFont' = (", ",8pt,bold) 'GraphAnnoFont' = (", ",10pt); ; end; run; ods listing style=listingsmallfonts image_dpi=&dpi gpath = &gpath; title "Panel of LFT Shift from Baseline to Maximum by Treatment"; footnote1 j=l "For ALAT, ASAT and ALKPH, the Clinical Concern Level is 2 ULN;"; footnote2 j=l "For BILTOT, the CCL is 1.5 ULN: where ULN is Upper Level of Normal Range"; /*--1 x 4 Panel--*/ ods graphics / reset width=5in height=2.5in imagename="LFT_Panel_1"; proc sgpanel data=LFT_Panel_Norm; panelby group / layout=panel columns=4 spacing=10 novarname; scatter x=base y=max / group=drug name='s'; series x=ref y=ref; refline 1 1.5 2 / axis=Y lineattrs=(pattern=dash); refline 1 1.5 2 / axis=X lineattrs=(pattern=dash); rowaxis integer min=0 max=4; colaxis integer min=0 max=4; keylegend 's' / title="" noborder; run; /*--2 x 2 Panel--*/ ods graphics / reset width=4in height=5in imagename="LFT_Panel_2"; proc sgpanel data=LFT_Panel_Norm; panelby group / layout=panel spacing=10 novarname; scatter x=base y=max / group=drug name='s'; series x=ref y=ref; refline 1 1.5 2 / axis=Y lineattrs=(pattern=dash); refline 1 1.5 2 / axis=X lineattrs=(pattern=dash); rowaxis integer min=0 max=4; colaxis integer min=0 max=4; keylegend 's' / title="" noborder; run;