<?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: Table Count (N) and Percent (%)? in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Table-Count-N-and-Percent/m-p/826878#M40948</link>
    <description>The dis_order comment seems complicated.  Does the data need to be sorted out first, then I have to figure out which needs to be listed in the order?  Any other simpler procedure could be used?</description>
    <pubDate>Wed, 03 Aug 2022 14:25:51 GMT</pubDate>
    <dc:creator>ybz12003</dc:creator>
    <dc:date>2022-08-03T14:25:51Z</dc:date>
    <item>
      <title>Table Count (N) and Percent (%)?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Table-Count-N-and-Percent/m-p/826873#M40946</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I could like to create a table for listing the Counts and Percentages (One digit behind decimal) of three categories (Gender/Race/Premature) in two classes of Patients (ER and Hospital).&amp;nbsp; Gender contains two subgroups, M and F.&amp;nbsp; &amp;nbsp;Race contains five subgroups, and I only need 1-3 subgroups.&amp;nbsp; Premature contains Y/N subgroups.&amp;nbsp; &amp;nbsp;All the variables are numeric.&amp;nbsp; &amp;nbsp;The final result I would like to get is similar to the table shown below.&amp;nbsp; Please advise how to approach it; Proc Freq, Proc tabulate, or something else.&amp;nbsp;&amp;nbsp;Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;Hospital Patient&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;ER Patient&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;
&lt;P&gt;Gender&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Male&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Female&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;
&lt;P&gt;Race&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;White&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Black&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Hispanic&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;Premature (Y)&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Wed, 03 Aug 2022 14:04:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Table-Count-N-and-Percent/m-p/826873#M40946</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2022-08-03T14:04:59Z</dc:date>
    </item>
    <item>
      <title>Re: Table Count (N) and Percent (%)?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Table-Count-N-and-Percent/m-p/826874#M40947</link>
      <description>&lt;P&gt;I believe that the %TABLEN macro will do what you want.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/Demographic-Table-and-Subgroup-Summary-Macro-TABLEN/ta-p/634030" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/Demographic-Table-and-Subgroup-Summary-Macro-TABLEN/ta-p/634030&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2022 14:06:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Table-Count-N-and-Percent/m-p/826874#M40947</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-08-03T14:06:37Z</dc:date>
    </item>
    <item>
      <title>Re: Table Count (N) and Percent (%)?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Table-Count-N-and-Percent/m-p/826878#M40948</link>
      <description>The dis_order comment seems complicated.  Does the data need to be sorted out first, then I have to figure out which needs to be listed in the order?  Any other simpler procedure could be used?</description>
      <pubDate>Wed, 03 Aug 2022 14:25:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Table-Count-N-and-Percent/m-p/826878#M40948</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2022-08-03T14:25:51Z</dc:date>
    </item>
    <item>
      <title>Re: Table Count (N) and Percent (%)?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Table-Count-N-and-Percent/m-p/826881#M40949</link>
      <description>&lt;P&gt;I still think the easiest thing to do is to use the %TABLEN macro. Other approaches would seem to require even more work.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2022 14:28:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Table-Count-N-and-Percent/m-p/826881#M40949</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-08-03T14:28:19Z</dc:date>
    </item>
    <item>
      <title>Re: Table Count (N) and Percent (%)?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Table-Count-N-and-Percent/m-p/826882#M40950</link>
      <description>&lt;P&gt;You need to define exactly what "Race contains five subgroups, and I only need 1-3 subgroups." means. Does this mean to exclude any observations that have race not in the desired subgroups entirely from the table? Combine some of the groups (which you did not define) into those shown, or just ignore 2 classes and not include them in the report but count the observations in the Gender and Premature? This requirement may impose a bit of data restructuring depending on your answer&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;By "Premature contains Y/N subgroups. All the variables are numeric" does this mean that Premature has a numeric value of 1 for Yes and 0 for No? If not what is the actual coding?&lt;/P&gt;
&lt;P&gt;If it is coded 1/0 then the SUM statistic gives you the number of Yes and Mean will give you a decimal percentage of yes&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2022 14:28:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Table-Count-N-and-Percent/m-p/826882#M40950</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-08-03T14:28:56Z</dc:date>
    </item>
    <item>
      <title>Re: Table Count (N) and Percent (%)?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Table-Count-N-and-Percent/m-p/826883#M40951</link>
      <description>Yes.&lt;BR /&gt;Race has 1-5 subgroups, and I only need 1-3 groups.  Group 4 and 5 will be discharged.&lt;BR /&gt;Premature = 1 is the one I need.</description>
      <pubDate>Wed, 03 Aug 2022 14:33:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Table-Count-N-and-Percent/m-p/826883#M40951</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2022-08-03T14:33:11Z</dc:date>
    </item>
    <item>
      <title>Re: Table Count (N) and Percent (%)?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Table-Count-N-and-Percent/m-p/826917#M40952</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/67134"&gt;@ybz12003&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Yes.&lt;BR /&gt;Race has 1-5 subgroups, and I only need 1-3 groups. Group 4 and 5 will be discharged.&lt;BR /&gt;Premature = 1 is the one I need.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Does not quite answer the questions. Are the observations for race where it is 4 or 5 removed from the data entirely?&lt;/P&gt;
&lt;P&gt;And what other value does Premature take? If it is not 0 we need to know.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best, as has been requested for many projects is to include an actual example of the data set as data step code so we do not have to guess.&lt;/P&gt;
&lt;P&gt;Then show the desired result given the example data set.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/67134"&gt;@ybz12003&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Yes.&lt;BR /&gt;Race has 1-5 subgroups, and I only need 1-3 groups. Group 4 and 5 will be discharged.&lt;BR /&gt;Premature = 1 is the one I need.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2022 15:29:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Table-Count-N-and-Percent/m-p/826917#M40952</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-08-03T15:29:31Z</dc:date>
    </item>
    <item>
      <title>Re: Table Count (N) and Percent (%)?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Table-Count-N-and-Percent/m-p/826919#M40953</link>
      <description>Race 4 = other, Race 5 = unknown&lt;BR /&gt;Premature = 1 or 0</description>
      <pubDate>Wed, 03 Aug 2022 15:34:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Table-Count-N-and-Percent/m-p/826919#M40953</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2022-08-03T15:34:00Z</dc:date>
    </item>
    <item>
      <title>Re: Table Count (N) and Percent (%)?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Table-Count-N-and-Percent/m-p/826921#M40954</link>
      <description>I have the other extra ten variables that need to be counted.  I would like to avoid figuring out the order of each category.</description>
      <pubDate>Wed, 03 Aug 2022 15:36:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Table-Count-N-and-Percent/m-p/826921#M40954</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2022-08-03T15:36:02Z</dc:date>
    </item>
    <item>
      <title>Re: Table Count (N) and Percent (%)?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Table-Count-N-and-Percent/m-p/826929#M40955</link>
      <description>You don't need to figure out the order of each category that I can see unless you want it different than the default output. Do you want it different than the default? If so, how?</description>
      <pubDate>Wed, 03 Aug 2022 15:58:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Table-Count-N-and-Percent/m-p/826929#M40955</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-08-03T15:58:17Z</dc:date>
    </item>
  </channel>
</rss>

