%let gpath='C:\'; %let dpi=100; ods listing gpath = &gpath image_dpi=&dpi; /*--Cluster Grouped Bar Chart - V92--*/ ods graphics / reset width=5in height=3.0in imagename='GroupedBarChart_V92'; title 'Mileage by Type and Origin'; footnote j=l 'Excluding Hybrids'; proc sgpanel data=sashelp.cars; where type ne 'Hybrid'; panelby type / layout=columnlattice onepanel noborder colheaderpos=bottom; vbar origin / response=mpg_city stat=mean nostatlabel group=origin; colaxis display=none offsetmin=0.3 offsetmax=0.3; rowaxis grid; run; footnote; /*--Lipid Data - Multi Column--*/ Data lipid; label a_med="Drug A" b_med="Drug B" c_med="Drug C" p_med="Placebo"; input Day $ 1-10 dayn a_med a_lcl a_ucl b_med b_lcl b_ucl c_med c_lcl c_ucl p_med p_lcl p_ucl; cards; Baseline 1 5.21 5.04 5.52 5.17 4.94 5.47 5.24 4.97 5.33 5.08 4.81 5.35 Visit 1 2 4.90 4.60 5.79 6.65 4.81 7.51 5.74 5.51 6.78 4.49 4.03 4.94 Visit 2 3 5.30 5.04 6.44 4.77 4.15 7.84 4.40 3.34 6.13 4.94 4.81 5.11 Visit 3 4 6.05 4.91 6.84 5.15 3.91 6.83 5.81 5.17 6.65 5.09 4.29 5.90 Visit 4 5 5.20 5.07 5.39 5.28 5.15 5.38 5.35 5.22 5.52 5.10 4.94 5.23 End Point 6 5.24 4.97 5.48 5.15 5.09 5.42 5.34 5.15 5.53 5.04 4.94 5.22 ; run; /*proc print; run;*/ /*--Format for dayn--*/ proc format; value dayn 1='Base Line' 2='Visit 1' 3='Visit 2' 4='Visit 3' 5='Visit 4' 6='End Point'; run; /*--Lipid data grouped by treatment--*/ data lipid_grp; set lipid; length trt $8; format dayn dayn.; keep day dayn trt median lcl ucl; Trt='Drug A'; Median=a_med; LCL=a_lcl; UCL=a_ucl; output; Trt='Drug B'; Median=b_med; LCL=b_lcl; UCL=b_ucl; output; Trt='Drug C'; Median=c_med; LCL=c_lcl; UCL=c_ucl; output; Trt='Placebo'; Median=p_med; LCL=p_lcl; UCL=p_ucl; output; run; /*proc print;run;*/ /*--Cluster Scatter Plot - V92--*/ ods graphics / reset width=5in height=3.0in imagename='Lipid_Group_V92'; title 'Median of Lipid Profile by Visit and Treatment'; proc sgpanel data=lipid_grp; panelby dayn / layout=columnlattice onepanel noborder colheaderpos=bottom novarname; scatter x=trt y=median / yerrorlower=lcl yerrorupper=ucl group=trt errorbarattrs=(thickness=2) markerattrs=(size=9) name='s'; keylegend 's' / title='Treatment'; colaxis display=none offsetmin=0.3 offsetmax=0.3; rowaxis grid; run;