How can I add confidence interval and significance like in the first plot below?.
I'm using syntax "series" in PROC SGPLOT Procedure, however can not found any statement about the interval and significance.
I want to show the confidence interval and significance between two group in the second plot.
Here are the codes:
proc sgplot data=text;
series x=season y=Preg/group=co smoothconnect markers;
run;
Hope you can help me.
Thank you.
data have(index=(x=(status bp_status)));
set sashelp.heart;
keep weight bp_status status;
run;
proc summary data=have nway;
class status bp_status;
var weight;
output out=stat mean=mean uclm=uclm lclm=lclm;
run;
proc sgplot data=stat;
series x=bp_status y=mean/group=status markers;
highlow x=bp_status low=lclm high=uclm /group=status highcap=serif lowcap=serif;
yaxis label='xxxxxxxxxx';
inset 'K-W test,p=0.05' /titleattrs=(weight=bold) position=nw;
run;
data have(index=(x=(status bp_status)));
set sashelp.heart;
keep weight bp_status status;
run;
proc summary data=have nway;
class status bp_status;
var weight;
output out=stat mean=mean uclm=uclm lclm=lclm;
run;
proc sgplot data=stat;
series x=bp_status y=mean/group=status markers;
highlow x=bp_status low=lclm high=uclm /group=status highcap=serif lowcap=serif;
yaxis label='xxxxxxxxxx';
inset 'K-W test,p=0.05' /titleattrs=(weight=bold) position=nw;
run;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.