<?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: SGPLOT vbar option not working ? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/SGPLOT-vbar-option-not-working/m-p/234526#M54950</link>
    <description>&lt;P&gt;You can also use FREQ= instead of WEIGHT= if you prefer "Frequency" over "count (Sum)" as the label of the y-axis.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=class;
vbar age / freq=count;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 12 Nov 2015 22:39:00 GMT</pubDate>
    <dc:creator>FreelanceReinh</dc:creator>
    <dc:date>2015-11-12T22:39:00Z</dc:date>
    <item>
      <title>SGPLOT vbar option not working ?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SGPLOT-vbar-option-not-working/m-p/234507#M54945</link>
      <description>&lt;P&gt;I have a dataset with aggregated date and I would like to create a VBAR to show the distribution of the variables. &amp;nbsp;I thought using the weight option would work, but it doesnt. &amp;nbsp;For example, in the example below all the frequencies stand at "1", instead of using the count variable which should be somewhere between 1 and 5.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What is going on? &amp;nbsp;I'm using SAS 9.3 on a windows machine.&lt;/P&gt;
&lt;P&gt;Cheers!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sql;&lt;BR /&gt;create table class as &lt;BR /&gt;select distinct age, count(*) as count&lt;BR /&gt;from sashelp.class&lt;BR /&gt;group by age;&lt;BR /&gt;quit;&lt;/P&gt;
&lt;P&gt;proc sgplot data=class;&lt;BR /&gt;vbar age / weight=count;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Nov 2015 21:44:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SGPLOT-vbar-option-not-working/m-p/234507#M54945</guid>
      <dc:creator>morglum</dc:creator>
      <dc:date>2015-11-12T21:44:38Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT vbar option not working ?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SGPLOT-vbar-option-not-working/m-p/234522#M54948</link>
      <description>Use response instead of weight.&lt;BR /&gt;&lt;BR /&gt;proc sgplot data=class;&lt;BR /&gt;vbar age / response=count;&lt;BR /&gt;run;</description>
      <pubDate>Thu, 12 Nov 2015 22:23:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SGPLOT-vbar-option-not-working/m-p/234522#M54948</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-11-12T22:23:44Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT vbar option not working ?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SGPLOT-vbar-option-not-working/m-p/234526#M54950</link>
      <description>&lt;P&gt;You can also use FREQ= instead of WEIGHT= if you prefer "Frequency" over "count (Sum)" as the label of the y-axis.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=class;
vbar age / freq=count;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 12 Nov 2015 22:39:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SGPLOT-vbar-option-not-working/m-p/234526#M54950</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2015-11-12T22:39:00Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT vbar option not working ?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SGPLOT-vbar-option-not-working/m-p/234551#M54955</link>
      <description>Thanks for the reply!&lt;BR /&gt;&lt;BR /&gt;"Frequency" does look better, but it wont graph non-integer numbers properly (such as count minus 0.5), which happens with surveys with probabilistic weights.&lt;BR /&gt;&lt;BR /&gt;Cheers!&lt;BR /&gt;&lt;BR /&gt;proc sql;&lt;BR /&gt;create table class as &lt;BR /&gt;select distinct age, count(*)-0.5 as count&lt;BR /&gt;from sashelp.class&lt;BR /&gt;group by age;&lt;BR /&gt;quit;&lt;BR /&gt;&lt;BR /&gt;proc sgplot data=class;&lt;BR /&gt;vbar age / response=count;&lt;BR /&gt;yaxis label="frequency";&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;proc sgplot data=class;&lt;BR /&gt;vbar age / freq=count ;&lt;BR /&gt;yaxis label="frequency";&lt;BR /&gt;run;</description>
      <pubDate>Fri, 13 Nov 2015 08:52:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SGPLOT-vbar-option-not-working/m-p/234551#M54955</guid>
      <dc:creator>morglum</dc:creator>
      <dc:date>2015-11-13T08:52:45Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT vbar option not working ?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SGPLOT-vbar-option-not-working/m-p/234552#M54956</link>
      <description>thanks for this!&lt;BR /&gt;</description>
      <pubDate>Fri, 13 Nov 2015 08:52:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SGPLOT-vbar-option-not-working/m-p/234552#M54956</guid>
      <dc:creator>morglum</dc:creator>
      <dc:date>2015-11-13T08:52:58Z</dc:date>
    </item>
  </channel>
</rss>

