<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Is there a way to add a non-inferiority margin to a plot for one outcome and not the others? in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Is-there-a-way-to-add-a-non-inferiority-margin-to-a-plot-for-one/m-p/905421#M24211</link>
    <description>&lt;P&gt;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.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;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; &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I want the plot to look like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 435px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/90495iD561CB56848B0A1D/image-dimensions/435x323?v=v2" width="435" height="323" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Is this possible?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Thu, 30 Nov 2023 20:09:25 GMT</pubDate>
    <dc:creator>hr667</dc:creator>
    <dc:date>2023-11-30T20:09:25Z</dc:date>
    <item>
      <title>Is there a way to add a non-inferiority margin to a plot for one outcome and not the others?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Is-there-a-way-to-add-a-non-inferiority-margin-to-a-plot-for-one/m-p/905421#M24211</link>
      <description>&lt;P&gt;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.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;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; &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I want the plot to look like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 435px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/90495iD561CB56848B0A1D/image-dimensions/435x323?v=v2" width="435" height="323" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Is this possible?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 30 Nov 2023 20:09:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Is-there-a-way-to-add-a-non-inferiority-margin-to-a-plot-for-one/m-p/905421#M24211</guid>
      <dc:creator>hr667</dc:creator>
      <dc:date>2023-11-30T20:09:25Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to add a non-inferiority margin to a plot for one outcome and not the others?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Is-there-a-way-to-add-a-non-inferiority-margin-to-a-plot-for-one/m-p/905432#M24212</link>
      <description>&lt;P&gt;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&amp;nbsp;&lt;A href="https://blogs.sas.com/content/graphicallyspeaking/2017/10/27/legend-items/" target="_self"&gt;this post&lt;/A&gt;&amp;nbsp;to see. the general idea. &amp;nbsp;Hope this helps!&lt;/P&gt;</description>
      <pubDate>Thu, 30 Nov 2023 20:33:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Is-there-a-way-to-add-a-non-inferiority-margin-to-a-plot-for-one/m-p/905432#M24212</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2023-11-30T20:33:41Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to add a non-inferiority margin to a plot for one outcome and not the others?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Is-there-a-way-to-add-a-non-inferiority-margin-to-a-plot-for-one/m-p/905439#M24213</link>
      <description>&lt;P&gt;That worked perfectly, thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 30 Nov 2023 21:07:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Is-there-a-way-to-add-a-non-inferiority-margin-to-a-plot-for-one/m-p/905439#M24213</guid>
      <dc:creator>hr667</dc:creator>
      <dc:date>2023-11-30T21:07:15Z</dc:date>
    </item>
  </channel>
</rss>

