FOCUS AREAS

Graphics

Distribution of Eye Irritation by Visit
Base SAS: ODS Graphics Procedure: SGPLOT

%let gpath='.';
%let dpi=100;

ods html close;
ods listing style=htmlblue gpath=&gpath image_dpi=&dpi;

proc format;
  value xvarf
		  1 = 'Week 1'
          2 = 'Week 2'
		  3 = 'Week 4'
		  4 = 'Week 6'
		  5 = 'Week 8'
		  6 = 'End Point';
  value groupf 
		  1 = 'Placebo'
          2 = 'Drug A'
		  3 = 'Drug B';
run;

/* data */
data eyeIrritation;
  attrib PARAM length=$100 label='PARAMETER';
  attrib PERCENT length=8 label='% of Subjects';
  attrib time length=3 format=XVARF.;
  attrib chartvar length=3 label='Treatment group:' format=GROUPF.;
  attrib lcl length=8 label='Lower confidential limit';
  attrib ucl length=8 label='Upper confidential limit';
  attrib n length=8 label='Number of subjects';

  infile datalines dsd;
  input PARAM PERCENT time chartvar lcl ucl n ;
  yn=0;
datalines4;
EYES ITCHY/GRITTY,40,1,1,25.6864468502627,54.3135531497372,45
EYES ITCHY/GRITTY,60.8695652173913,1,2,49.3541134082639,72.3850170265186,69
EYES ITCHY/GRITTY,52.0547945205479,1,3,40.5946624842483,63.5149265568476,73
EYES ITCHY/GRITTY,55.5555555555555,2,1,41.0373038182218,70.0738072928893,45
EYES ITCHY/GRITTY,68.6567164179104,2,2,57.549008527785,79.7644243080359,67
EYES ITCHY/GRITTY,52.7777777777777,2,3,41.2464158522305,64.309139703325,72
EYES ITCHY/GRITTY,54.5454545454545,3,1,39.8328454913776,69.2580635995314,44
EYES ITCHY/GRITTY,65.625,3,2,53.9887212682038,77.2612787317961,64
EYES ITCHY/GRITTY,63.3802816901408,3,3,52.1742073602962,74.5863560199855,71
EYES ITCHY/GRITTY,72.0930232558139,4,1,58.6864780295777,85.4995684820501,43
EYES ITCHY/GRITTY,65.5737704918032,4,2,53.6505663007898,77.4969746828166,61
EYES ITCHY/GRITTY,64.6153846153846,4,3,52.9910897128346,76.2396795179345,65
EYES ITCHY/GRITTY,64.2857142857143,5,1,49.7946038219732,78.7768247494554,42
EYES ITCHY/GRITTY,75,5,2,63.6589121767657,86.3410878232342,56
EYES ITCHY/GRITTY,58.7301587301587,5,3,46.5732039054999,70.8871135548175,63
EYES ITCHY/GRITTY,62.2222222222222,6,1,48.0566932486829,76.3877511957615,45
EYES ITCHY/GRITTY,69.5652173913043,6,2,58.7083453077565,80.4220894748521,69
EYES ITCHY/GRITTY,57.5342465753424,6,3,46.1953891907295,68.8731039599554,73
;;;;

ods listing style=htmlblue;
ods graphics / reset width=5in height=3in imagename='5L_Eye_Irritation';
title 'Distribution of Eye Irritation by Visit';
footnote J=l 'The number of patients in the study is shown below each bar';
proc sgplot data=eyeIrritation;
  format n 2.0;
  styleattrs datacolors=(cx42659C cx5A96DE cx8CaEdF);
  vbarparm category=time response=percent / group=chartvar groupdisplay=cluster
           limitupper=ucl limitlower=lcl
           dataskin=gloss transparency=0.0 barwidth=0.9 limitattrs=graphdatadefault;
  scatter x=time y=yn /  group=chartvar groupdisplay=cluster clusterwidth=0.85 y2axis 
          markerchar=n markercharattrs=graphdatadefault ;
  yaxis offsetmin=0.05 grid max=100;
  y2axis offsetmax=0.97 display=none;
  xaxis display=(nolabel);
  run;

title;
footnote;