<?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: Proc Tabulate Percentages in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Tabulate-Percentages/m-p/233280#M54807</link>
    <description>&lt;P&gt;It would greatly help to provide some example data.&lt;/P&gt;
&lt;P&gt;You may be looking for a table statement like&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;tables pat_cnt (grp * trt), region*(n pctn);&lt;/P&gt;
&lt;P&gt;but can't test that without data.&lt;/P&gt;</description>
    <pubDate>Thu, 05 Nov 2015 17:37:32 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2015-11-05T17:37:32Z</dc:date>
    <item>
      <title>Proc Tabulate Percentages</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Tabulate-Percentages/m-p/233279#M54806</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I keep coming to a dead end when trying to find out how to do the following in Proc Tabulate. &amp;nbsp;I would like to create the percentages as shown in the attached table. You will see that the treatment counts should be calculated as a percentage of the number of patients in each region.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If anyone could help I would be really happy. I've been trying to solve this for a long time!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks very much in advance!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Here's the code I have with the variable names.&lt;BR /&gt; &lt;BR /&gt; data all1;&lt;BR /&gt;&amp;nbsp; set all;&lt;BR /&gt;&amp;nbsp; by patno;&lt;BR /&gt;&amp;nbsp; if first.patno then pat_cnt = 1;&lt;BR /&gt; run;&lt;BR /&gt; &lt;BR /&gt; proc tabulate data = all1;&lt;BR /&gt;&amp;nbsp; class grp trt region;&lt;BR /&gt;&amp;nbsp; var pat_cnt;&lt;BR /&gt;&amp;nbsp; tables pat_cnt (grp * trt), region;&lt;BR /&gt; run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Nov 2015 17:26:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Tabulate-Percentages/m-p/233279#M54806</guid>
      <dc:creator>js8765</dc:creator>
      <dc:date>2015-11-05T17:26:59Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Tabulate Percentages</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Tabulate-Percentages/m-p/233280#M54807</link>
      <description>&lt;P&gt;It would greatly help to provide some example data.&lt;/P&gt;
&lt;P&gt;You may be looking for a table statement like&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;tables pat_cnt (grp * trt), region*(n pctn);&lt;/P&gt;
&lt;P&gt;but can't test that without data.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Nov 2015 17:37:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Tabulate-Percentages/m-p/233280#M54807</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-11-05T17:37:32Z</dc:date>
    </item>
  </channel>
</rss>

