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:
Is this possible?
Thanks!
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!
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!
That worked perfectly, thank you!
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.
Ready to level-up your skills? Choose your own adventure.