<?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: create summary percentage tables by subsets of one variables. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/create-summary-percentage-tables-by-subsets-of-one-variables/m-p/427103#M105301</link>
    <description>&lt;P&gt;Thank you! I just updated my question. This problem is after running your code there is still a "total N" column and row. I need to&amp;nbsp;generate all percentage tables using all&amp;nbsp;variables with age, so my output need to be a dataset or table for future modification.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 12 Jan 2018 04:29:32 GMT</pubDate>
    <dc:creator>Viveme789</dc:creator>
    <dc:date>2018-01-12T04:29:32Z</dc:date>
    <item>
      <title>create summary percentage tables by subsets of one variables.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-summary-percentage-tables-by-subsets-of-one-variables/m-p/427096#M105296</link>
      <description>&lt;P&gt;Updated&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi! Suppose I have dataset as followings&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ID SEX&amp;nbsp; &amp;nbsp; RACE&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AGE&amp;nbsp;&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp;F&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Non-hispanic White&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5-15&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2&amp;nbsp; &amp;nbsp;M&amp;nbsp; &amp;nbsp; &amp;nbsp; Asian/Other&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 5-15&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;3&amp;nbsp; &amp;nbsp;M&amp;nbsp; &amp;nbsp; &amp;nbsp; Asian/Other&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 15-20&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;4&amp;nbsp; &amp;nbsp;F&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Hispanic&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; 15-20&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;5&amp;nbsp; &amp;nbsp;M&amp;nbsp; &amp;nbsp; &amp;nbsp; Hispanic&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp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&gt;&lt;P&gt;50%&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;33.3%&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;0&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know how to use proc sql without sub-section age group but is there a way to aggregate all age sections in one step? Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jan 2018 04:27:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-summary-percentage-tables-by-subsets-of-one-variables/m-p/427096#M105296</guid>
      <dc:creator>Viveme789</dc:creator>
      <dc:date>2018-01-12T04:27:16Z</dc:date>
    </item>
    <item>
      <title>Re: create summary percentage tables by subsets of one variables.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-summary-percentage-tables-by-subsets-of-one-variables/m-p/427098#M105297</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please try this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc freq data=have order=data;&lt;BR /&gt;table sex*age/norow nocum nofreq nopercent ;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jan 2018 04:00:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-summary-percentage-tables-by-subsets-of-one-variables/m-p/427098#M105297</guid>
      <dc:creator>stat_sas</dc:creator>
      <dc:date>2018-01-12T04:00:38Z</dc:date>
    </item>
    <item>
      <title>Re: create summary percentage tables by subsets of one variables.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-summary-percentage-tables-by-subsets-of-one-variables/m-p/427103#M105301</link>
      <description>&lt;P&gt;Thank you! I just updated my question. This problem is after running your code there is still a "total N" column and row. I need to&amp;nbsp;generate all percentage tables using all&amp;nbsp;variables with age, so my output need to be a dataset or table for future modification.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jan 2018 04:29:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-summary-percentage-tables-by-subsets-of-one-variables/m-p/427103#M105301</guid>
      <dc:creator>Viveme789</dc:creator>
      <dc:date>2018-01-12T04:29:32Z</dc:date>
    </item>
    <item>
      <title>Re: create summary percentage tables by subsets of one variables.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-summary-percentage-tables-by-subsets-of-one-variables/m-p/427235#M105345</link>
      <description>If this is for a report, consider using PROC TABULATE instead. You have more control over the output there, including percentages.</description>
      <pubDate>Fri, 12 Jan 2018 16:04:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-summary-percentage-tables-by-subsets-of-one-variables/m-p/427235#M105345</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-01-12T16:04:25Z</dc:date>
    </item>
    <item>
      <title>Re: create summary percentage tables by subsets of one variables.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-summary-percentage-tables-by-subsets-of-one-variables/m-p/427282#M105354</link>
      <description>&lt;P&gt;A report table could look something like:&lt;/P&gt;
&lt;PRE&gt;proc tabulate data=have;
   class age sex race ;
   table sex race ,
         age=''*colpctn=''
         /misstext='0'
         ;
run;&lt;/PRE&gt;
&lt;P&gt;add other categorical variables to the class and table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that this will only work if all records have values for all of the variables as tabulate by default excludes records with any missing values for the variables on a class statement OR add /missing to the Class statement to get missing treated as a category.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jan 2018 17:14:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-summary-percentage-tables-by-subsets-of-one-variables/m-p/427282#M105354</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-01-12T17:14:11Z</dc:date>
    </item>
  </channel>
</rss>

