BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
LiHZ
Fluorite | Level 6

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.

 

 

2.jpg1.png

1 ACCEPTED SOLUTION

Accepted Solutions
Ksharp
Super User
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;

SGPlot11.png

View solution in original post

1 REPLY 1
Ksharp
Super User
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;

SGPlot11.png

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 361 views
  • 2 likes
  • 2 in conversation