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

I'm trying to add a non-inferiority margin to my forest plot for the primary outcome and not the secondary outcomes. (outcome = 1 in the example data). Here is some made up example data. I've been playing around with the bands statement with no luck. 

 

data plot;
input outcome adj_mean lowercl uppercl;
cards;
1	-0.1	.	3	
2	0.2	0.1	0.3	
3	-0.2	-0.4	0.1	
4	-0.3	-0.6	-0.1	
5	-0.3	-0.5	-0.1	
;
run;

proc sgplot data=plot NOAUTOLEGEND;
band y=outcome upper=4 lower=-5 / modelname="scatter" fill nooutline transparency=0.80 fillattrs=(color='yellow');
scatter x=adj_mean y=outcome / xerrorlower=lowercl xerrorupper=uppercl ERRORBARATTRS=(thickness = 1.5pt) markerattrs=(symbol=DiamondFilled size=8);
refline 0 / axis=x;
xaxis label="Adjusted Mean Difference and 95% Confidence Limits" min=-5 max=5 LABELATTRS=(family = caibri size = 12) VALUEATTRS=(family = caibri size = 11);
yaxis label="Outcome" fitpolicy=split splitchar=';' TYPE=DISCRETE LABELATTRS=(family = caibri size = 12) VALUEATTRS=(family = caibri size = 11);
run; 

I want the plot to look like this:

Capture.PNG

Is this possible?

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
DanH_sas
SAS Super FREQ

Instead of a BAND, try using a HIGHLOW plot with TYPE=BAR. This will let you selectively place a "band" behind any outcome. See the swimmer plot in this post to see. the general idea.  Hope this helps!

View solution in original post

2 REPLIES 2
DanH_sas
SAS Super FREQ

Instead of a BAND, try using a HIGHLOW plot with TYPE=BAR. This will let you selectively place a "band" behind any outcome. See the swimmer plot in this post to see. the general idea.  Hope this helps!

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 2 replies
  • 536 views
  • 2 likes
  • 2 in conversation