<?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 with multiple sub groups? in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-with-multiple-sub-groups/m-p/541773#M17880</link>
    <description>&lt;P&gt;Can't see the problem with sgpanel...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table heartBars as
select 
    sex,
    smoking_status,
    round(ageAtStart,10) as ageClass,
    mean(Cholesterol) as meanCh,
    mean(Cholesterol) + std(Cholesterol) as topCh,    
    mean(Cholesterol) - std(Cholesterol) as lowCh
from sashelp.heart
group by sex, smoking_status, calculated ageClass;
quit;

proc sgpanel data=heartBars;
panelBy sex;
vbarparm category=ageClass response=meanCh / groupdisplay=cluster
    group=smoking_status limitlower=lowCh limitupper=topCh;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SGPanel1.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/27810i2BA61AE2107774DE/image-size/large?v=v2&amp;amp;px=999" role="button" title="SGPanel1.png" alt="SGPanel1.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 10 Mar 2019 03:37:55 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2019-03-10T03:37:55Z</dc:date>
    <item>
      <title>SGPLOT with multiple sub groups?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-with-multiple-sub-groups/m-p/541759#M17879</link>
      <description>&lt;P&gt;Hi, I am trying to make a graph as depicted below (i.e. I am trying to split my red bars into two groups, blue bars into two groups, and green bars into two groups). I would use SGPANEL, but I have custom CI's which I'd like to insert. I am using SAS v9.4.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="graph.JPG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/27807i56355609538868CC/image-size/large?v=v2&amp;amp;px=999" role="button" title="graph.JPG" alt="graph.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 10 Mar 2019 01:16:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-with-multiple-sub-groups/m-p/541759#M17879</guid>
      <dc:creator>richart</dc:creator>
      <dc:date>2019-03-10T01:16:00Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT with multiple sub groups?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-with-multiple-sub-groups/m-p/541773#M17880</link>
      <description>&lt;P&gt;Can't see the problem with sgpanel...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table heartBars as
select 
    sex,
    smoking_status,
    round(ageAtStart,10) as ageClass,
    mean(Cholesterol) as meanCh,
    mean(Cholesterol) + std(Cholesterol) as topCh,    
    mean(Cholesterol) - std(Cholesterol) as lowCh
from sashelp.heart
group by sex, smoking_status, calculated ageClass;
quit;

proc sgpanel data=heartBars;
panelBy sex;
vbarparm category=ageClass response=meanCh / groupdisplay=cluster
    group=smoking_status limitlower=lowCh limitupper=topCh;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SGPanel1.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/27810i2BA61AE2107774DE/image-size/large?v=v2&amp;amp;px=999" role="button" title="SGPanel1.png" alt="SGPanel1.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 10 Mar 2019 03:37:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-with-multiple-sub-groups/m-p/541773#M17880</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2019-03-10T03:37:55Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT with multiple sub groups?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-with-multiple-sub-groups/m-p/542169#M17888</link>
      <description>&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2019 18:52:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-with-multiple-sub-groups/m-p/542169#M17888</guid>
      <dc:creator>richart</dc:creator>
      <dc:date>2019-03-11T18:52:33Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT with multiple sub groups?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-with-multiple-sub-groups/m-p/542187#M17890</link>
      <description>&lt;P&gt;Just for completeness, here's how you can get limits within SGPANEL without external calculations:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgpanel data=sashelp.heart (where=(ageatstart &amp;gt;= 50 and ageatstart &amp;lt; 53));
panelBy sex;
vbar ageatstart / response=cholesterol groupdisplay=cluster
    group=smoking_status stat=mean limitstat=stddev;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2019 19:38:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-with-multiple-sub-groups/m-p/542187#M17890</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2019-03-11T19:38:27Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT with multiple sub groups?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-with-multiple-sub-groups/m-p/543608#M17909</link>
      <description>&lt;P&gt;When I try to replicate this in v9.4 with the same code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgpanel data=murdock.test;
  panelBy sex;
  vbarparm category=age_group response=meanNP / group=wave groupdisplay=cluster
    limitlower=lowNP limitupper=topNP;
  run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; receive this error msg:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;71   proc sgpanel data=murdock.test;
72     panelBy sex;
73     vbarparm category=age_group response=meanNP / group=wave groupdisplay=cluster
                                                                ------------
                                                                22
                                                                76
ERROR 22-322: Syntax error, expecting one of the following: ;, ATTRID, BARWIDTH, CLUSTERWIDTH, DATALABEL, DATALABELATTRS,
              DATASKIN, DISCRETEOFFSET, FILL, FILLATTRS, GROUP, GROUPORDER, LEGENDLABEL, LIMITATTRS, LIMITLOWER, LIMITUPPER,
              MISSING, NAME, NOFILL, NOOUTLINE, OUTLINE, TRANSPARENCY, URL.
ERROR 76-322: Syntax error, statement will be ignored.
74       limitlower=lowNP limitupper=topNP;
75   run;

71   proc sgpanel data=murdock.test;
72     panelBy sex;
73     vbarparm category=age_group response=meanNP / group=wave groupdisplay=cluster
                                                                ------------
                                                                22
                                                                76
ERROR 22-322: Syntax error, expecting one of the following: ;, ATTRID, BARWIDTH, CLUSTERWIDTH, DATALABEL, DATALABELATTRS,
              DATASKIN, DISCRETEOFFSET, FILL, FILLATTRS, GROUP, GROUPORDER, LEGENDLABEL, LIMITATTRS, LIMITLOWER, LIMITUPPER,
              MISSING, NAME, NOFILL, NOOUTLINE, OUTLINE, TRANSPARENCY, URL.
ERROR 76-322: Syntax error, statement will be ignored.
74       limitlower=lowNP limitupper=topNP;
75   run;

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;If I try PROC SGPANEL w/ VBAR, the excellent bar graph appears, but without error bars.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgpanel data=murdock.pals_v1_v2_phys_perf;
  panelBy sex;
  title1 font="helvetica/bold"
      'PALS Usual Gait Speed (Age Group by Visit by Sex)';
  vbar age_group / response=normal_pace groupdisplay=cluster dataskin=matte
    group=wave stat=mean limitstat=stddev;
  run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Andy&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2019 17:54:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-with-multiple-sub-groups/m-p/543608#M17909</guid>
      <dc:creator>A_Shiloh</dc:creator>
      <dc:date>2019-03-15T17:54:18Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT with multiple sub groups?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-with-multiple-sub-groups/m-p/543609#M17910</link>
      <description>&lt;P&gt;The early versions of VBARPARM/HBARPARM did not have the GROUPDISPLAY option; however, the default was a CLUSTER appearance. Just take the option away and it should work for you.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;As for SGPANEL not producing the error bars, was there a message in the log?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;BR /&gt;Dan&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2019 17:59:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-with-multiple-sub-groups/m-p/543609#M17910</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2019-03-15T17:59:24Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT with multiple sub groups?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-with-multiple-sub-groups/m-p/543611#M17911</link>
      <description>1) Yes, Removing GROUPDISPLAY solved the problem.&lt;BR /&gt;&lt;BR /&gt;There was a WARNING in the log re: the GROUP option:&lt;BR /&gt;WARNING: Limits are not allowed on bar charts when a group variable is used. The option will be ignored.&lt;BR /&gt;&lt;BR /&gt;I am fine w/ calculating the MEAN and STDDEV for the variables and using VBARPARM.&lt;BR /&gt;&lt;BR /&gt;Thanks for your help!</description>
      <pubDate>Fri, 15 Mar 2019 18:05:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-with-multiple-sub-groups/m-p/543611#M17911</guid>
      <dc:creator>A_Shiloh</dc:creator>
      <dc:date>2019-03-15T18:05:52Z</dc:date>
    </item>
  </channel>
</rss>

