<?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 Re: How to add error bars to a clustered vertical bar graph? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-add-error-bars-to-a-clustered-vertical-bar-graph/m-p/773781#M245863</link>
    <description>&lt;P&gt;Thank you - this worked! Would there be a reason why the upper limit bar isn't being displayed though?&lt;/P&gt;</description>
    <pubDate>Tue, 12 Oct 2021 21:56:54 GMT</pubDate>
    <dc:creator>mcknigh3</dc:creator>
    <dc:date>2021-10-12T21:56:54Z</dc:date>
    <item>
      <title>How to add error bars to a clustered vertical bar graph?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-add-error-bars-to-a-clustered-vertical-bar-graph/m-p/773762#M245855</link>
      <description>&lt;P&gt;Hi there,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am having trouble adding error bars to each bar in my vertical bar chart using Proc sgplot. First of all, is this even possible? Every discussion forum/questions never shows grouped bar charts. I have all the options on in my code to enable error bars but they are not being produced on the graph. My code is below - Is there a step I am missing?&lt;/P&gt;&lt;PRE&gt;Proc sgplot data=LSMTrtTOD1;&lt;BR /&gt;  vbar TOD / response=Estimate stat=mean numstd=2 limitstat=stderr limits=both&lt;BR /&gt;   group=Trt groupdisplay=cluster fillpattern nofill;&lt;BR /&gt;   keylegend / position=top noborder;&lt;BR /&gt;  yaxis grid;&lt;BR /&gt;Run;&lt;/PRE&gt;</description>
      <pubDate>Tue, 12 Oct 2021 21:00:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-add-error-bars-to-a-clustered-vertical-bar-graph/m-p/773762#M245855</guid>
      <dc:creator>mcknigh3</dc:creator>
      <dc:date>2021-10-12T21:00:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to add error bars to a clustered vertical bar graph?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-add-error-bars-to-a-clustered-vertical-bar-graph/m-p/773765#M245856</link>
      <description>&lt;P&gt;Data?&lt;/P&gt;
&lt;P&gt;Can't test code without data.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Oct 2021 21:04:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-add-error-bars-to-a-clustered-vertical-bar-graph/m-p/773765#M245856</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-10-12T21:04:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to add error bars to a clustered vertical bar graph?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-add-error-bars-to-a-clustered-vertical-bar-graph/m-p/773769#M245857</link>
      <description>&lt;P&gt;Works fine for me - perhaps your errors are quite small? Note that not all bars have error bars, haven't investigated why but guessing it has to do with the N involved or to small to see.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Proc sgplot data=LSMTrtTOD1;&lt;BR /&gt;  vbar TOD / response=Estimate stat=mean numstd=2 limitstat=stderr limits=both&lt;BR /&gt;   group=Trt groupdisplay=cluster fillpattern nofill;&lt;BR /&gt;   keylegend / position=top noborder;&lt;BR /&gt;  yaxis grid;&lt;BR /&gt;Run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/307638"&gt;@mcknigh3&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi there,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am having trouble adding error bars to each bar in my vertical bar chart using Proc sgplot. First of all, is this even possible? Every discussion forum/questions never shows grouped bar charts. I have all the options on in my code to enable error bars but they are not being produced on the graph. My code is below - Is there a step I am missing?&lt;/P&gt;
&lt;PRE&gt;Proc sgplot data=LSMTrtTOD1;&lt;BR /&gt;  vbar TOD / response=Estimate stat=mean numstd=2 limitstat=stderr limits=both&lt;BR /&gt;   group=Trt groupdisplay=cluster fillpattern nofill;&lt;BR /&gt;   keylegend / position=top noborder;&lt;BR /&gt;  yaxis grid;&lt;BR /&gt;Run;&lt;/PRE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Oct 2021 21:11:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-add-error-bars-to-a-clustered-vertical-bar-graph/m-p/773769#M245857</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-10-12T21:11:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to add error bars to a clustered vertical bar graph?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-add-error-bars-to-a-clustered-vertical-bar-graph/m-p/773770#M245858</link>
      <description>&lt;P&gt;Sorry I was having trouble adding data - it's attached as a file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Oct 2021 21:16:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-add-error-bars-to-a-clustered-vertical-bar-graph/m-p/773770#M245858</guid>
      <dc:creator>mcknigh3</dc:creator>
      <dc:date>2021-10-12T21:16:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to add error bars to a clustered vertical bar graph?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-add-error-bars-to-a-clustered-vertical-bar-graph/m-p/773771#M245859</link>
      <description>&lt;P&gt;You can see them on the graph though? Because I can't.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Oct 2021 21:22:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-add-error-bars-to-a-clustered-vertical-bar-graph/m-p/773771#M245859</guid>
      <dc:creator>mcknigh3</dc:creator>
      <dc:date>2021-10-12T21:22:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to add error bars to a clustered vertical bar graph?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-add-error-bars-to-a-clustered-vertical-bar-graph/m-p/773772#M245860</link>
      <description>If you run the exact code I posted - no changes do you see error bars?&lt;BR /&gt;I changed the code to reference the sashelp.cars data set and it works for me.</description>
      <pubDate>Tue, 12 Oct 2021 21:33:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-add-error-bars-to-a-clustered-vertical-bar-graph/m-p/773772#M245860</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-10-12T21:33:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to add error bars to a clustered vertical bar graph?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-add-error-bars-to-a-clustered-vertical-bar-graph/m-p/773773#M245861</link>
      <description>Ah...you're trying to reference a variable STDERR and this plot is calculating it dynamically which you are not doing. &lt;BR /&gt;I think you want to use VBARPARM instead where you specify the pre-calculated statistics.</description>
      <pubDate>Tue, 12 Oct 2021 21:35:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-add-error-bars-to-a-clustered-vertical-bar-graph/m-p/773773#M245861</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-10-12T21:35:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to add error bars to a clustered vertical bar graph?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-add-error-bars-to-a-clustered-vertical-bar-graph/m-p/773781#M245863</link>
      <description>&lt;P&gt;Thank you - this worked! Would there be a reason why the upper limit bar isn't being displayed though?&lt;/P&gt;</description>
      <pubDate>Tue, 12 Oct 2021 21:56:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-add-error-bars-to-a-clustered-vertical-bar-graph/m-p/773781#M245863</guid>
      <dc:creator>mcknigh3</dc:creator>
      <dc:date>2021-10-12T21:56:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to add error bars to a clustered vertical bar graph?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-add-error-bars-to-a-clustered-vertical-bar-graph/m-p/773782#M245864</link>
      <description>Can you share your new code?</description>
      <pubDate>Tue, 12 Oct 2021 21:59:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-add-error-bars-to-a-clustered-vertical-bar-graph/m-p/773782#M245864</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-10-12T21:59:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to add error bars to a clustered vertical bar graph?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-add-error-bars-to-a-clustered-vertical-bar-graph/m-p/773783#M245865</link>
      <description>&lt;PRE&gt;Proc sgplot data=LSMTrtTOD1 noborder;&lt;BR /&gt;  vbarparm category=TOD response=Estimate / limitlower=stderr limitupper=stderr&lt;BR /&gt;   group=Trt groupdisplay=cluster fillpattern nofill ;&lt;BR /&gt;  yaxis grid Label= 'Daily distance (m)';&lt;BR /&gt;Run;&lt;/PRE&gt;&lt;P&gt;Sorry - I am pretty well new at this!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Oct 2021 22:04:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-add-error-bars-to-a-clustered-vertical-bar-graph/m-p/773783#M245865</guid>
      <dc:creator>mcknigh3</dc:creator>
      <dc:date>2021-10-12T22:04:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to add error bars to a clustered vertical bar graph?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-add-error-bars-to-a-clustered-vertical-bar-graph/m-p/773785#M245867</link>
      <description>Limit lower and upper require the actual values (ie Estimate+stderr = upper), so you need to do the math prior to this step to provide the actual values, not just the error value.</description>
      <pubDate>Tue, 12 Oct 2021 22:06:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-add-error-bars-to-a-clustered-vertical-bar-graph/m-p/773785#M245867</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-10-12T22:06:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to add error bars to a clustered vertical bar graph?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-add-error-bars-to-a-clustered-vertical-bar-graph/m-p/773787#M245869</link>
      <description>&lt;P&gt;Ah yes - thank you so much!&lt;/P&gt;</description>
      <pubDate>Tue, 12 Oct 2021 22:28:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-add-error-bars-to-a-clustered-vertical-bar-graph/m-p/773787#M245869</guid>
      <dc:creator>mcknigh3</dc:creator>
      <dc:date>2021-10-12T22:28:14Z</dc:date>
    </item>
  </channel>
</rss>

