<?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: dealing with 3 variables in SAS in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/dealing-with-3-variables-in-SAS/m-p/806479#M33568</link>
    <description>&lt;P&gt;VBAR in PROC SGPANEL allows you to have a GROUP variable which could be sex or anything else you want.&lt;/P&gt;</description>
    <pubDate>Thu, 07 Apr 2022 12:12:48 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2022-04-07T12:12:48Z</dc:date>
    <item>
      <title>dealing with 3 variables in SAS</title>
      <link>https://communities.sas.com/t5/New-SAS-User/dealing-with-3-variables-in-SAS/m-p/806353#M33550</link>
      <description>&lt;P&gt;Hey I would like to create a graph using the command:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC SGPLOT DATA = work.GruppierungAlter;&lt;BR /&gt;VBAR PHQg_gr / GROUP = OHIPg_gr ;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to divide each of the columns again into male and female gender or different age groups.&lt;/P&gt;&lt;P&gt;Can anyone help?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2022 17:22:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/dealing-with-3-variables-in-SAS/m-p/806353#M33550</guid>
      <dc:creator>LeniLesola</dc:creator>
      <dc:date>2022-04-06T17:22:43Z</dc:date>
    </item>
    <item>
      <title>Re: dealing with 3 variables in SAS</title>
      <link>https://communities.sas.com/t5/New-SAS-User/dealing-with-3-variables-in-SAS/m-p/806360#M33551</link>
      <description>&lt;P&gt;If you already have a group variable, you can't further group within the bars on gender or age.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could, I suppose, in the data set named&amp;nbsp;&lt;SPAN&gt;work.GruppierungAlter, create a new variable which is the concatenation of&amp;nbsp;OHIPg_gr&amp;nbsp;and gender, or the concatenation of&amp;nbsp;OHIPg_gr&amp;nbsp; and age, and then use these new variables as the GROUP= variable in PROC SGPLOT.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Alternatively, you could use PROC SGPANEL to put the different genders in side-by-side bar charts, or to put the different age groups in side-by-side bar charts.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2022 17:37:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/dealing-with-3-variables-in-SAS/m-p/806360#M33551</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-04-06T17:37:46Z</dc:date>
    </item>
    <item>
      <title>Re: dealing with 3 variables in SAS</title>
      <link>https://communities.sas.com/t5/New-SAS-User/dealing-with-3-variables-in-SAS/m-p/806390#M33557</link>
      <description>&lt;P&gt;Perhaps you want an SGpanel with Panelby PHQg_gr , Vbar OHIPg_gr /group (sex/ age / other variable)&lt;/P&gt;
&lt;P&gt;or make the original Group variable a PanelBy.&lt;/P&gt;
&lt;P&gt;If you don't have many values for PHQg_gr you could force all the plot on a single row with the /rows=1 option in the Panelby statement. May have to play with some barwidth and other spacing options.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2022 19:42:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/dealing-with-3-variables-in-SAS/m-p/806390#M33557</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-04-06T19:42:53Z</dc:date>
    </item>
    <item>
      <title>Re: dealing with 3 variables in SAS</title>
      <link>https://communities.sas.com/t5/New-SAS-User/dealing-with-3-variables-in-SAS/m-p/806478#M33567</link>
      <description>Thank you for your help.&lt;BR /&gt;I'm using now the command:&lt;BR /&gt;proc sgpanel data=work.GruppierungAlter;&lt;BR /&gt;panelby ci_sex;&lt;BR /&gt;vbar OHIPg_gr / response=PHQg stat=mean&lt;BR /&gt;transparency=0.3;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;but i would like to have something like this example but the columns should be divided into male and female or age groups.. Can you help?&lt;BR /&gt;(so here is a link, i would like to have it like in the picture but the columns divided by age/sex &lt;A href="https://deref-web.de/mail/client/xPL0hDoPijU/dereferrer/?redirectUrl=https%3A%2F%2Fblogs.sas.com%2Fcontent%2Fiml%2F2014%2F04%2F08%2Fconstruct-a-stacked-bar-chart-in-sas-where-each-bar-equals-100.html" target="_blank"&gt;https://deref-web.de/mail/client/xPL0hDoPijU/dereferrer/?redirectUrl=https%3A%2F%2Fblogs.sas.com%2Fcontent%2Fiml%2F2014%2F04%2F08%2Fconstruct-a-stacked-bar-chart-in-sas-where-each-bar-equals-100.html&lt;/A&gt;)&lt;BR /&gt;proc sgplot data=FreqOut;&lt;BR /&gt;vbar Origin / response=Percent group=Type groupdisplay=stack;&lt;BR /&gt;xaxis discreteorder=data;&lt;BR /&gt;yaxis grid values=(0 to 100 by 10) label="Percentage of Total with Group";&lt;BR /&gt;run;</description>
      <pubDate>Thu, 07 Apr 2022 12:03:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/dealing-with-3-variables-in-SAS/m-p/806478#M33567</guid>
      <dc:creator>LeniLesola</dc:creator>
      <dc:date>2022-04-07T12:03:14Z</dc:date>
    </item>
    <item>
      <title>Re: dealing with 3 variables in SAS</title>
      <link>https://communities.sas.com/t5/New-SAS-User/dealing-with-3-variables-in-SAS/m-p/806479#M33568</link>
      <description>&lt;P&gt;VBAR in PROC SGPANEL allows you to have a GROUP variable which could be sex or anything else you want.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2022 12:12:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/dealing-with-3-variables-in-SAS/m-p/806479#M33568</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-04-07T12:12:48Z</dc:date>
    </item>
    <item>
      <title>Re: dealing with 3 variables in SAS</title>
      <link>https://communities.sas.com/t5/New-SAS-User/dealing-with-3-variables-in-SAS/m-p/806490#M33569</link>
      <description>It doesn't work unfortunately.&lt;BR /&gt;If i try it with this step:&lt;BR /&gt;proc SGPLOT data = work.GruppierungAlter;&lt;BR /&gt;vbar OHIPg_gr/group = PHQg_gr;&lt;BR /&gt;run;&lt;BR /&gt;quit;&lt;BR /&gt;&lt;BR /&gt;How is it possible to divide each columns in male/female?&lt;BR /&gt;</description>
      <pubDate>Thu, 07 Apr 2022 12:53:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/dealing-with-3-variables-in-SAS/m-p/806490#M33569</guid>
      <dc:creator>LeniLesola</dc:creator>
      <dc:date>2022-04-07T12:53:08Z</dc:date>
    </item>
    <item>
      <title>Re: dealing with 3 variables in SAS</title>
      <link>https://communities.sas.com/t5/New-SAS-User/dealing-with-3-variables-in-SAS/m-p/806491#M33570</link>
      <description>&lt;P&gt;Hard to say, as you didn't tell us what didn't work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;How is it possible to divide each columns in male/female?&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;As I said, PROC SGPANEL allows a GROUP= option&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2022 12:54:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/dealing-with-3-variables-in-SAS/m-p/806491#M33570</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-04-07T12:54:42Z</dc:date>
    </item>
    <item>
      <title>Re: dealing with 3 variables in SAS</title>
      <link>https://communities.sas.com/t5/New-SAS-User/dealing-with-3-variables-in-SAS/m-p/806521#M33572</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/422158"&gt;@LeniLesola&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;It doesn't work unfortunately.&lt;BR /&gt;If i try it with this step:&lt;BR /&gt;proc SGPLOT data = work.GruppierungAlter;&lt;BR /&gt;vbar OHIPg_gr/group = PHQg_gr;&lt;BR /&gt;run;&lt;BR /&gt;quit;&lt;BR /&gt;&lt;BR /&gt;How is it possible to divide each columns in male/female?&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Not at all related to what I suggested. I suggested Proc SGPANEL.&lt;/P&gt;
&lt;P&gt;Something like:&lt;/P&gt;
&lt;PRE&gt;proc &lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;sgpanel&lt;/STRONG&gt;&lt;/FONT&gt; data = work.GruppierungAlter;
panelby OHIPg_gr;
vbar  PHQg_gr /group = sex;
run;
quit;&lt;/PRE&gt;
&lt;P&gt;Maybe.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Without data we cannot test your code to make more targeted solutions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2022 14:12:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/dealing-with-3-variables-in-SAS/m-p/806521#M33572</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-04-07T14:12:48Z</dc:date>
    </item>
  </channel>
</rss>

