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

I would like to have non-overlapping standard error or confidence limits. This is my code

 

proc sgplot data = class4.dental;
vline age / response = y stat = mean limitstat = clm group=gender curvelabel;
run;

Thank you for any sugggestions

1 ACCEPTED SOLUTION

Accepted Solutions
Jay54
Meteorite | Level 14

Extending on Draycut's reply, use GROUPDISPLAY=CLUSTER and CLUSTERWIDTH=0.2 to get this result.

 

JitterLine.png

 

 

 

 

proc sgplot data=sashelp.class;
vline age / response=height group=sex stat=mean limitstat=clm markers
groupdisplay=cluster clusterwidth=0.1 arkerattrs=(size=5 symbol=circlefilled);
run;

 

 

View solution in original post

5 REPLIES 5
PeterClemmensen
Tourmaline | Level 20

Are you sure you want to present your data like this? See this short example, which I assume resemble yours

 

proc sgplot data=sashelp.class;
vline age / response=height group=sex stat=mean limitstat=clm;
run;

produces this

SGPlot30.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Already now, there are a lot of lines to grasp. And you want to offset the clm limits, adding more lines to the chart. I think you want to present your data in a more suitable manner? 🙂

Jay54
Meteorite | Level 14

Extending on Draycut's reply, use GROUPDISPLAY=CLUSTER and CLUSTERWIDTH=0.2 to get this result.

 

JitterLine.png

 

 

 

 

proc sgplot data=sashelp.class;
vline age / response=height group=sex stat=mean limitstat=clm markers
groupdisplay=cluster clusterwidth=0.1 arkerattrs=(size=5 symbol=circlefilled);
run;

 

 

vstorme
Obsidian | Level 7

Thank you, this is what I want!

Leo9
Quartz | Level 8

Thank you

ballardw
Super User

You might provide an example data set that will let us see what you are currently getting or include an image. Then describe which  "overlapping" error bars or confidence limits are not desired.

"non-overlapping" could have a number of interpretations. For example with the image shown by @PeterClemmensen perhaps you would only want the widest confidence limit shown, or the narrowest for each age.

Another possible interpretation could be to not have male and female in the same graph.

sas-innovate-2024.png

 

Time is running out to save with the early bird rate. Register by Friday, March 1 for just $695 - $100 off the standard rate.

 

Check out the agenda and get ready for a jam-packed event featuring workshops, super demos, breakout sessions, roundtables, inspiring keynotes and incredible networking events. 

 

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
  • 5 replies
  • 4142 views
  • 0 likes
  • 5 in conversation