<?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 can I insert the standard error of the mean in the vbar? in SAS Software for Learning Community</title>
    <link>https://communities.sas.com/t5/SAS-Software-for-Learning/How-can-I-insert-the-standard-error-of-the-mean-in-the-vbar/m-p/937402#M2000</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc summary data=sashelp.heart(obs=100) nway;
class bp_status;
var weight;
output out=have mean=mean lclm=lclm uclm=uclm;
run;
data have;
 set have;
 label=choosec(_n_,'a','abc','a');
run;

proc sgplot data=have noautolegend;
vbarparm category=bp_status response=mean;
highlow x=bp_status low=lclm high=uclm/lowcap=serif highcap=serif highlabel=label labelattrs=(size=12);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1722216105815.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/98769i16F0C02CE5F78CCC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1722216105815.png" alt="Ksharp_0-1722216105815.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 29 Jul 2024 01:21:54 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2024-07-29T01:21:54Z</dc:date>
    <item>
      <title>How can I insert the standard error of the mean in the vbar?</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/How-can-I-insert-the-standard-error-of-the-mean-in-the-vbar/m-p/937384#M1996</link>
      <description>&lt;P&gt;Hello. I'm plotting soil pH vs sources of nutrients. Until now I do a plot in PROC SGPLOT, but I don't know how can I put the&amp;nbsp;standard error of the mean in the vbar. The first graph is my code and the second is the model that I'm trying to do. Furthermore, how can I insert the letters beside the values as we see in the second graph?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="josuerodrigues_0-1722168547873.gif" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/98767i242D4966C77158BB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="josuerodrigues_0-1722168547873.gif" alt="josuerodrigues_0-1722168547873.gif" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="josuerodrigues_1-1722168609673.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/98768i6840526C18CAD734/image-size/medium?v=v2&amp;amp;px=400" role="button" title="josuerodrigues_1-1722168609673.png" alt="josuerodrigues_1-1722168609673.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 28 Jul 2024 12:16:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/How-can-I-insert-the-standard-error-of-the-mean-in-the-vbar/m-p/937384#M1996</guid>
      <dc:creator>josuerodrigues</dc:creator>
      <dc:date>2024-07-28T12:16:59Z</dc:date>
    </item>
    <item>
      <title>Re: How can I insert the standard error of the mean in the vbar?</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/How-can-I-insert-the-standard-error-of-the-mean-in-the-vbar/m-p/937386#M1997</link>
      <description>&lt;P&gt;Your current code helps. Then we can discuss variables by name as needed. For vertical and horizontal bar plots this is a bit more important because there are &lt;STRONG&gt;three&lt;/STRONG&gt; plots available: Vbar, Vbarbasic and Vbarparm (and Hbar equivalents). Which have somewhat different approaches.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best would be to include example data in the form of a working data step to test code with.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;By "insert standard error" do you mean add an error bar or use the standard error as a label for the bar? Depending on which Vbar statement and which statistic is requested for the bar (see, the code is important) the option LIMITS= is used to create the error bars and the LIMITSTAT=STDERR is used for which statistic is used for the limit to display (or confidence limit of the mean or standard deviation). If you are not using a STAT=MEAN then error bars won't be calculated by the procedure and you need to add such to the data before the plot so you can use other options and other plot statements.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Display of any text requires a value and format. Do you have a variable holding the text you want?&lt;/P&gt;
&lt;P&gt;The DATALABEL= option will take the name of a variable holding the desired values if other that the default calculated value of the bar height. Which is yet another reason to share data and your code.&lt;/P&gt;</description>
      <pubDate>Sun, 28 Jul 2024 13:19:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/How-can-I-insert-the-standard-error-of-the-mean-in-the-vbar/m-p/937386#M1997</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-07-28T13:19:06Z</dc:date>
    </item>
    <item>
      <title>Re: How can I insert the standard error of the mean in the vbar?</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/How-can-I-insert-the-standard-error-of-the-mean-in-the-vbar/m-p/937387#M1998</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;Please post a small example dataset as a DATA step with the CARDS statement, and also post the code you have to make your current graph.&amp;nbsp; That will help people help you, because you'll be giving them the data to work with, and your actual code.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;If you google "SAS SGLOT VBAR error bar" you'll find hits to few similar questions here on SAS communities, e.g.:&lt;BR /&gt;&lt;A href="https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT-Create-Error-Bars-in-Stacked-VBar-Graph/td-p/828195" target="_blank" rel="noopener"&gt;https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT-Create-Error-Bars-in-Stacked-VBar-Graph/td-p/828195&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Programming/How-to-add-error-bars-to-a-clustered-vertical-bar-graph/td-p/773762" target="_blank" rel="noopener"&gt;https://communities.sas.com/t5/SAS-Programming/How-to-add-error-bars-to-a-clustered-vertical-bar-graph/td-p/773762&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;If you google "site:blogs.sas.com vbar error" you'll get great blog posts like:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/graphicallyspeaking/2016/11/27/getting-started-sgplot-part-2-vbar/" target="_blank" rel="noopener"&gt;https://blogs.sas.com/content/graphicallyspeaking/2016/11/27/getting-started-sgplot-part-2-vbar/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2011/10/07/creating-bar-charts-with-confidence-intervals.html" target="_blank" rel="noopener"&gt;https://blogs.sas.com/content/iml/2011/10/07/creating-bar-charts-with-confidence-intervals.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 28 Jul 2024 13:22:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/How-can-I-insert-the-standard-error-of-the-mean-in-the-vbar/m-p/937387#M1998</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2024-07-28T13:22:51Z</dc:date>
    </item>
    <item>
      <title>Re: How can I insert the standard error of the mean in the vbar?</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/How-can-I-insert-the-standard-error-of-the-mean-in-the-vbar/m-p/937394#M1999</link>
      <description>&lt;P&gt;There is also the&amp;nbsp;&lt;BR /&gt;&lt;SPAN&gt;Graphics Samples Output Gallery&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;(Learn how to build interesting graphics)&lt;BR /&gt;&lt;A href="https://support.sas.com/en/knowledge-base/graph-samples-gallery.html" target="_blank"&gt;https://support.sas.com/en/knowledge-base/graph-samples-gallery.html&lt;/A&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;BR, Koen&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 28 Jul 2024 19:11:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/How-can-I-insert-the-standard-error-of-the-mean-in-the-vbar/m-p/937394#M1999</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2024-07-28T19:11:03Z</dc:date>
    </item>
    <item>
      <title>Re: How can I insert the standard error of the mean in the vbar?</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/How-can-I-insert-the-standard-error-of-the-mean-in-the-vbar/m-p/937402#M2000</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc summary data=sashelp.heart(obs=100) nway;
class bp_status;
var weight;
output out=have mean=mean lclm=lclm uclm=uclm;
run;
data have;
 set have;
 label=choosec(_n_,'a','abc','a');
run;

proc sgplot data=have noautolegend;
vbarparm category=bp_status response=mean;
highlow x=bp_status low=lclm high=uclm/lowcap=serif highcap=serif highlabel=label labelattrs=(size=12);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1722216105815.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/98769i16F0C02CE5F78CCC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1722216105815.png" alt="Ksharp_0-1722216105815.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jul 2024 01:21:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/How-can-I-insert-the-standard-error-of-the-mean-in-the-vbar/m-p/937402#M2000</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2024-07-29T01:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: How can I insert the standard error of the mean in the vbar?</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/How-can-I-insert-the-standard-error-of-the-mean-in-the-vbar/m-p/937518#M2001</link>
      <description>&lt;P&gt;Thanks for answer me. For&amp;nbsp;&lt;SPAN&gt;"insert standard error" I wanna mean an error bar. I want also to add letters above each bar, such as "a, b, c, d and e".&amp;nbsp;&lt;/SPAN&gt;My current code is below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data teste;&lt;BR /&gt;input trat$ rep pHsolo;&lt;BR /&gt;cards;&lt;BR /&gt;Controle 1 7.51&lt;BR /&gt;Controle 2 7.1&lt;BR /&gt;Controle 3 7.71&lt;BR /&gt;Controle 4 7.6&lt;BR /&gt;Controle 5 7.44&lt;BR /&gt;0 1 7.69&lt;BR /&gt;0 2 6.76&lt;BR /&gt;0 3 6.54&lt;BR /&gt;0 4 7.3&lt;BR /&gt;0 5 7.64&lt;BR /&gt;100 1 7.57&lt;BR /&gt;100 2 7.13&lt;BR /&gt;100 3 7.6&lt;BR /&gt;100 4 7.56&lt;BR /&gt;100 5 7.87&lt;BR /&gt;200 1 7.56&lt;BR /&gt;200 2 7.67&lt;BR /&gt;200 3 7.73&lt;BR /&gt;200 4 7.58&lt;BR /&gt;200 5 7.55&lt;BR /&gt;300 1 7.67&lt;BR /&gt;300 2 7.41&lt;BR /&gt;300 3 7.77&lt;BR /&gt;300 4 7.58&lt;BR /&gt;300 5 7.81&lt;BR /&gt;;&lt;BR /&gt;title "pH do solo em função de fontes de adubos";&lt;BR /&gt;proc sgplot data=composto2 noautolegend noborder;&lt;BR /&gt;vbar trat / response=Nsolo datalabel datalabelattrs=(color=black size=10 family=arial) fillattrs=(color=VIGB) outlineattrs=(color="black") ;&lt;BR /&gt;yaxis label="pH do solo" LABELATTRS=(Color=black Family=Arial Size=12) valueattrs=(Color=black Family=Arial Size=10);&lt;BR /&gt;xaxis label="Fonte de adubo" LABELATTRS=(Color=black Family=Arial Size=12) valueattrs=(Color=black Family=Arial Size=10);&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jul 2024 19:30:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/How-can-I-insert-the-standard-error-of-the-mean-in-the-vbar/m-p/937518#M2001</guid>
      <dc:creator>josuerodrigues</dc:creator>
      <dc:date>2024-07-29T19:30:54Z</dc:date>
    </item>
    <item>
      <title>Re: How can I insert the standard error of the mean in the vbar?</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/How-can-I-insert-the-standard-error-of-the-mean-in-the-vbar/m-p/937524#M2002</link>
      <description>I change my PROC SGPLOT code with:title "pH do solo em função de fontes de adubos";&lt;BR /&gt;proc sgplot data=composto2 noautolegend noborder;&lt;BR /&gt;vbar trat / response=Nsolo stat=mean limitstat=stderr limitattrs=(color=black) fillattrs=(color=VIGB) outlineattrs=(color="black") datalabel datalabelattrs=(color=black size=10 family="Times New Roman") fillattrs=(color=VIGB) outlineattrs=(color="black") ;&lt;BR /&gt;yaxis label="pH do solo" LABELATTRS=(Color=black Family="Times New Roman" Size=12) valueattrs=(Color=black Family="Times New Roman" Size=10);&lt;BR /&gt;xaxis label="Fonte de adubo" LABELATTRS=(Color=black Family="Times New Roman" Size=12) valueattrs=(Color=black Family="Times New Roman" Size=10);&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;Now I can put stderr bar, but I couldn't put the letters to mark significant differences. Please help me.</description>
      <pubDate>Mon, 29 Jul 2024 19:58:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/How-can-I-insert-the-standard-error-of-the-mean-in-the-vbar/m-p/937524#M2002</guid>
      <dc:creator>josuerodrigues</dc:creator>
      <dc:date>2024-07-29T19:58:55Z</dc:date>
    </item>
    <item>
      <title>Re: How can I insert the standard error of the mean in the vbar?</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/How-can-I-insert-the-standard-error-of-the-mean-in-the-vbar/m-p/937526#M2003</link>
      <description>+1 for commandeering  HIGHLOW to display standard error bars</description>
      <pubDate>Mon, 29 Jul 2024 20:10:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/How-can-I-insert-the-standard-error-of-the-mean-in-the-vbar/m-p/937526#M2003</guid>
      <dc:creator>svh</dc:creator>
      <dc:date>2024-07-29T20:10:40Z</dc:date>
    </item>
  </channel>
</rss>

