Data visualization with SAS programming

sgplot vline jitter standard error bars

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 19
Accepted Solution

sgplot vline jitter standard error bars

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


Accepted Solutions
Solution
3 weeks ago
SAS Super FREQ
Posts: 1,265

Re: sgplot vline jitter standard error bars

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


All Replies
PROC Star
Posts: 1,190

Re: sgplot vline jitter standard error bars

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? Smiley Happy

Solution
3 weeks ago
SAS Super FREQ
Posts: 1,265

Re: sgplot vline jitter standard error bars

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;

 

 

Occasional Contributor
Posts: 19

Re: sgplot vline jitter standard error bars

Posted in reply to Sanjay_SAS

Thank you, this is what I want!

Contributor
Posts: 46

Re: sgplot vline jitter standard error bars

Posted in reply to Sanjay_SAS

Thank you

Super User
Posts: 13,066

Re: sgplot vline jitter standard error bars

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 @draycut 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.

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 5 replies
  • 106 views
  • 0 likes
  • 5 in conversation