<?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: gbarline with stacked bars and a percentage for the line in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/gbarline-with-stacked-bars-and-a-percentage-for-the-line/m-p/65227#M2195</link>
    <description>Just to be sure.&lt;BR /&gt;
1) FLUPOS is a 0/1 var?&lt;BR /&gt;
2) since you are doing a WHERE on ILI you would like the percent to be number of flu cases out of count within GRAPHCODE (across the SUBTYPE)?&lt;BR /&gt;
3) check the specification of the PLOT statement (what version of SAS are you using).</description>
    <pubDate>Mon, 24 Jan 2011 06:58:09 GMT</pubDate>
    <dc:creator>ArtC</dc:creator>
    <dc:date>2011-01-24T06:58:09Z</dc:date>
    <item>
      <title>gbarline with stacked bars and a percentage for the line</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/gbarline-with-stacked-bars-and-a-percentage-for-the-line/m-p/65226#M2194</link>
      <description>I am trying to insert a calculation into the plot statement in gbarline.  I have code that successfully produces my stacked bars, but I cannot get the line to be a percentage.  The datafile contains one record per observation, which seems to be necessary for the bars to stack correctly.  Is it possible for the line to be a calculation?&lt;BR /&gt;
&lt;BR /&gt;
I've tried putting the calculation into the plot stmt:  plot / type=percent (flupos/pcr_count)&lt;BR /&gt;
&lt;BR /&gt;
I've also tried putting the necessary denominator in the where statement as below.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
proc gbarline data=six;&lt;BR /&gt;
     bar graphcode/ sumvar= ili &lt;BR /&gt;
	subgroup = subtype&lt;BR /&gt;
	clipref &lt;BR /&gt;
	width=5 &lt;BR /&gt;
	FRAME MIDPOINTS=6 TO 58 BY 1&lt;BR /&gt;
	type=sum&lt;BR /&gt;
	coutline=black&lt;BR /&gt;
	raxis=axis1 &lt;BR /&gt;
	maxis=axis2 &lt;BR /&gt;
	legend=legend1;&lt;BR /&gt;
&lt;BR /&gt;
      plot flupos / type=percent  &lt;BR /&gt;
	axis=axis3 &lt;BR /&gt;
	legend=legend2; &lt;BR /&gt;
&lt;BR /&gt;
	where ili=1 and pcr_count=1;&lt;BR /&gt;
&lt;BR /&gt;
	format subtype subtype. graphcode graphcode.; &lt;BR /&gt;
&lt;BR /&gt;
run;quit;</description>
      <pubDate>Fri, 21 Jan 2011 20:42:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/gbarline-with-stacked-bars-and-a-percentage-for-the-line/m-p/65226#M2194</guid>
      <dc:creator>ash</dc:creator>
      <dc:date>2011-01-21T20:42:11Z</dc:date>
    </item>
    <item>
      <title>Re: gbarline with stacked bars and a percentage for the line</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/gbarline-with-stacked-bars-and-a-percentage-for-the-line/m-p/65227#M2195</link>
      <description>Just to be sure.&lt;BR /&gt;
1) FLUPOS is a 0/1 var?&lt;BR /&gt;
2) since you are doing a WHERE on ILI you would like the percent to be number of flu cases out of count within GRAPHCODE (across the SUBTYPE)?&lt;BR /&gt;
3) check the specification of the PLOT statement (what version of SAS are you using).</description>
      <pubDate>Mon, 24 Jan 2011 06:58:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/gbarline-with-stacked-bars-and-a-percentage-for-the-line/m-p/65227#M2195</guid>
      <dc:creator>ArtC</dc:creator>
      <dc:date>2011-01-24T06:58:09Z</dc:date>
    </item>
    <item>
      <title>Re: gbarline with stacked bars and a percentage for the line</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/gbarline-with-stacked-bars-and-a-percentage-for-the-line/m-p/65228#M2196</link>
      <description>Hi!  &lt;BR /&gt;
FLUPOS is a 0/1 variable.&lt;BR /&gt;
The "where ili=1 and pcr_count=1" statement should allow the denominator to be the number of records in the dataset.   This would then plot the % flu positive, with stacked bars showing the tally of the flu positives by subgroup (the types of flu).&lt;BR /&gt;
&lt;BR /&gt;
In the code below, my bar statement says "bar graphcode/sumvar=ili", which gives me a stack that inclues flu negatives as a part of the bar.  However, I want the plot line to be limited only to the flu positives out of the # ili (oy, I hope that made sense).&lt;BR /&gt;
&lt;BR /&gt;
I'm using SAS 9.2</description>
      <pubDate>Mon, 24 Jan 2011 15:03:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/gbarline-with-stacked-bars-and-a-percentage-for-the-line/m-p/65228#M2196</guid>
      <dc:creator>ash</dc:creator>
      <dc:date>2011-01-24T15:03:05Z</dc:date>
    </item>
    <item>
      <title>Re: gbarline with stacked bars and a percentage for the line</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/gbarline-with-stacked-bars-and-a-percentage-for-the-line/m-p/65229#M2197</link>
      <description>If FLUPOS is coded as 0/1 then MEAN instead of PERCENT will give you a percent of 1 coded responses, use an appropriate format for display.</description>
      <pubDate>Mon, 24 Jan 2011 18:47:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/gbarline-with-stacked-bars-and-a-percentage-for-the-line/m-p/65229#M2197</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2011-01-24T18:47:11Z</dc:date>
    </item>
  </channel>
</rss>

