TIME STUDY MEAN LCL UCL 03hr REF03LT6 17.7 14 21.3 03hr SIM03LT6 14.5 14 14.6 36hr REF36LT6 19.3 15 23.7 36hr SIM36LT6 18.5 18 18.7 612hr REF612LT6 33 26 40.6 612hr SIM612LT6 39.4 39 40 03hr REF03GT6 20.6 14 27 03hr SIM03GT6 21 20.4 21.1 36hr REF36GT6 28.4 20 36.8 36hr SIM36GT6 19 18 19 612hr REF612GT6 33 26 41 612hr SIM612GT6 74 73 75
/*******************PREPARATION OF A HORIZONTAL CI PLOT****************/
proc import out=ALLCI
datafile='/folders/myfolders/PARTIALAUC_JUV/ALLJUVCI_age.CSV'
dbms=csv replace;
getnames=yes;
datarow=2;
run;
ods _all_ close;
ods html path='/folders/myfolders/PARTIALAUC_JUV/ ';
ods graphics/antialiasmax=1100;
Proc sgpanel data=allcI;
Panelby TIME STUDY/ columns=4 rows=3 uniscale=row;
Series x=lcl y=MEAN /lineattrs =(pattern=1 COLOR=RED THICKNESS=5)legendlabel='SIMLT6';
Series x=ucl y=MEAN /lineattrs =(pattern=5 COLOR=BLUE THICKNESS=5)legendlabel='REFLT6' ;
Series x=lcl y=MEAN /lineattrs =(pattern=2 COLOR=GREEN THICKNESS=10)legendlabel='SIMGT6';
Series x=ucl y=MEAN /lineattrs =(pattern=15 COLOR=BLACK THICKNESS=5)legendlabel='REFGT6' ;
rowaxis label='90% Confidence Interval Mean';
colaxis label= 'Range 90% Confidence Interval pAUC AGE';
/*%put _automatic_;*/
Run;
ods html close;
ods listing;
When I run the data presented with the code I get the desired graph except that lines are not drawn connecting the upper (UCL)and lower (LCL) confidence interval values and only two of the requested colors black and green are used for the plots. Can some one tell me how to get the graphs to reflect the requested graph colors and how to have lines drawn to connect the LL and UL of the confidence intervals?
The reason the Upper and Lower values are not connecting is very simple: Series connects the values in each Series statement, not across multiple Series statements. So the UCL at time 03hr gets connected to the UCL at 36hr.
I do not completely understand what graph you are trying to create, but the following makes a plot of the CIs. f it isn't what you want, perhaps it can point you in the right direction:
data allci;
length TIME $5 STUDY $9;
input TIME STUDY MEAN LCL UCL;
datalines;
03hr REF03LT6 17.7 14 21.3
03hr SIM03LT6 14.5 14 14.6
36hr SIM36LT6 18.5 18 18.7
612hr REF612LT6 33 26 40.6
612hr SIM612LT6 39.4 39 40
03hr REF03GT6 20.6 14 27
03hr SIM03GT6 21 20.4 21.1
36hr REF36GT6 28.4 20 36.8
36hr SIM36GT6 19 18 19
612hr REF612GT6 33 26 41
612hr SIM612GT6 74 73 75
;
/* PREPARATION OF A HORIZONTAL CI PLOT */
proc sgpanel data=allci;
panelby study / columns=4 rows=3 uniscale=row;
scatter x=mean y=Time / xerrorlower=LCL xerrorupper=UCL;
rowaxis label='90% Confidence Interval Mean';
colaxis grid label= 'Range 90% Confidence Interval pAUC AGE';
run;
The reason the Upper and Lower values are not connecting is very simple: Series connects the values in each Series statement, not across multiple Series statements. So the UCL at time 03hr gets connected to the UCL at 36hr.
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.