<?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: creating summary table in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/creating-summary-table/m-p/633760#M188023</link>
    <description>&lt;P&gt;Thank you ballardw!&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 20 Mar 2020 23:20:13 GMT</pubDate>
    <dc:creator>lillymaginta</dc:creator>
    <dc:date>2020-03-20T23:20:13Z</dc:date>
    <item>
      <title>creating summary table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creating-summary-table/m-p/633753#M188016</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA HAVE;
INPUT patientid afb cvd hf db;
datalines;
1 0 1 0 1
2 1 0 0 0 
3 1 1 1 1
4 1 0 1 0 
5 1 1 1 1 

;
run;&amp;nbsp;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I have the following table, I am trying to create a summary table with sum (%) for each condition. Each patient has one row.&amp;nbsp;&lt;/P&gt;&lt;P&gt;afb 4 (80%)&amp;nbsp;&lt;/P&gt;&lt;P&gt;cvd 3 (60%)&lt;/P&gt;&lt;P&gt;hf&amp;nbsp;&lt;/P&gt;&lt;P&gt;db&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Mar 2020 23:02:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creating-summary-table/m-p/633753#M188016</guid>
      <dc:creator>lillymaginta</dc:creator>
      <dc:date>2020-03-20T23:02:33Z</dc:date>
    </item>
    <item>
      <title>Re: creating summary table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creating-summary-table/m-p/633755#M188018</link>
      <description>&lt;PRE&gt;proc tabulate data=have;
	var  afb cvd hf db;
	table afb cvd hf db,
	      sum mean='%'*f=percent6.1
    ;
run;&lt;/PRE&gt;
&lt;P&gt;Is one way for a report.&lt;/P&gt;
&lt;P&gt;One of the many nice things about a 1/0 coded variable is the Mean is the percent of 1's.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Mar 2020 23:11:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creating-summary-table/m-p/633755#M188018</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-03-20T23:11:37Z</dc:date>
    </item>
    <item>
      <title>Re: creating summary table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creating-summary-table/m-p/633760#M188023</link>
      <description>&lt;P&gt;Thank you ballardw!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Mar 2020 23:20:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creating-summary-table/m-p/633760#M188023</guid>
      <dc:creator>lillymaginta</dc:creator>
      <dc:date>2020-03-20T23:20:13Z</dc:date>
    </item>
    <item>
      <title>Re: creating summary table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creating-summary-table/m-p/633764#M188027</link>
      <description>&lt;P&gt;Sir&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp; Nobody inspires me or makes me jealous as you do&amp;nbsp;&lt;SPAN&gt;with your&lt;/SPAN&gt; artistic and charm of&amp;nbsp;&lt;SPAN&gt;playing with&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;PROC TABULATE. I seem to grip most techniques, but proc tabulate is something i'm not gripping&amp;nbsp;&lt;SPAN&gt;well. Hmm I may have to dedicate a&amp;nbsp;week long practice to get me up to speed. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Nicely done!&lt;/P&gt;</description>
      <pubDate>Fri, 20 Mar 2020 23:38:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creating-summary-table/m-p/633764#M188027</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2020-03-20T23:38:52Z</dc:date>
    </item>
    <item>
      <title>Re: creating summary table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creating-summary-table/m-p/633797#M188042</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/138205"&gt;@novinosrin&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Sir&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp; Nobody inspires me or makes me jealous as you do&amp;nbsp;&lt;SPAN&gt;with your&lt;/SPAN&gt; artistic and charm of&amp;nbsp;&lt;SPAN&gt;playing with&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;PROC TABULATE. I seem to grip most techniques, but proc tabulate is something i'm not gripping&amp;nbsp;&lt;SPAN&gt;well. Hmm I may have to dedicate a&amp;nbsp;week long practice to get me up to speed. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Nicely done!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I do thank you for the thought.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Once upon a time I had a client who had a tendency to keep looking at summaries and asking about "but what about grouping by&amp;nbsp;&amp;nbsp; " that often involved lots of nesting in both row and columns so Proc Tabulate became a primary tool.&lt;/P&gt;
&lt;P&gt;Sometimes&amp;nbsp; the thing is learning what the data needs to look like as well. &lt;/P&gt;</description>
      <pubDate>Sat, 21 Mar 2020 08:09:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creating-summary-table/m-p/633797#M188042</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-03-21T08:09:51Z</dc:date>
    </item>
    <item>
      <title>Re: creating summary table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creating-summary-table/m-p/640822#M190949</link>
      <description>&lt;P&gt;Sir&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp; Good afternoon,&amp;nbsp; If I may request a moment of your time. I have begun reading the documentation and a book on O'reily media on Proc report/tabulate. For some reason, I am unable to grasp quickly. Well, I am understanding the concept but seems very voluminous and hazy. I am finding it diffcult to remember options, across and display and what not. Is there a trick or a short cut method to learn it quickly or quicker than the linear approach I am taking? It's exhausting me already!&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2020 19:09:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creating-summary-table/m-p/640822#M190949</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2020-04-17T19:09:25Z</dc:date>
    </item>
    <item>
      <title>Re: creating summary table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creating-summary-table/m-p/640857#M190962</link>
      <description>&lt;P&gt;The main thing I would suggest is keeping in mind "is the current thing I am thinking about for a page, row, or column expression".&lt;/P&gt;
&lt;P&gt;Since Tabulate is not intended to cross statistics (you can't have a mean in a row expression that attempts to calculate an intersection with another expression in a column) that means basically placing all the statistics with either a row or column. Hence recognizing which is which is a key element with Tabulate.&lt;/P&gt;
&lt;P&gt;The Page expression is basically only class variables and creates sub-tables for the combinations of variables that appear there.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The other reason to keep the row/column straight is because you have the various PCT statistics pctn, rowpctn, colpctn, pagepctn and reppctn and the respective pctsum statistics and knowing which you want is a bit easier with that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After that it is basically the use of () to group like items and how to do overrides. I admit that Tabulate was a bit easier without the ODS options so adding those after knowing the basic table building syntax may have been easier. Most of what I know came from a SAS publication about Proc Report and tabulate but that is at the office and I don't remember the exact name. I think it was published for SAS 7 though. I don't remember any ODS stuff there.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2020 20:56:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creating-summary-table/m-p/640857#M190962</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-04-17T20:56:30Z</dc:date>
    </item>
  </channel>
</rss>

