<?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  counts in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-counts/m-p/258129#M49669</link>
    <description>&lt;P&gt;The code is almost identical, just add the two Variables to a class statement and change the weight to freq.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 22 Mar 2016 05:13:52 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2016-03-22T05:13:52Z</dc:date>
    <item>
      <title>proc tabulate  counts</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-counts/m-p/258127#M49668</link>
      <description>&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Hi all, I want to determine the number of counts for each case using proc tabulate.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data have;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;input gender $ jail count;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;datalines;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1 Y 15&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1 Y 11&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1 N 21&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2 Y 67&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2 N 31&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I understand in proc freq using the weight&amp;nbsp;statement allows to get&amp;nbsp;the frequency of the counts in each case.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc freq data = have;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;weight count;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;table gender*jail;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;any thoughts on getting the frequency counts using proc tabulate?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2016 04:36:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-counts/m-p/258127#M49668</guid>
      <dc:creator>archibald</dc:creator>
      <dc:date>2016-03-22T04:36:37Z</dc:date>
    </item>
    <item>
      <title>Re: proc tabulate  counts</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-counts/m-p/258129#M49669</link>
      <description>&lt;P&gt;The code is almost identical, just add the two Variables to a class statement and change the weight to freq.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2016 05:13:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-counts/m-p/258129#M49669</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-03-22T05:13:52Z</dc:date>
    </item>
    <item>
      <title>Re: proc tabulate  counts</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-counts/m-p/258218#M49695</link>
      <description>&lt;P&gt;Here's a few different ways:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc tabulate data=have;
   class gender jail;
   freq count;
   table gender*jail*n='count';
   table gender,
         jail*n='count';
   table gender,
         jail=''*n='count';
   table gender,
         jail=''*n='';
run;

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;with an appropriate format for gender the label for gender probably wouldn't be needed either.&lt;/P&gt;
&lt;P&gt;Advantage of Tabulate over freq is control of appearance so might as well use it. Note the comma separates page, row and column dimensions.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2016 14:54:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-counts/m-p/258218#M49695</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-03-22T14:54:46Z</dc:date>
    </item>
    <item>
      <title>Re: proc tabulate  counts</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-counts/m-p/258685#M49883</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw﻿&lt;/a&gt;This exactly what&amp;nbsp;Ineeded and some more. Thank you very much!&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2016 00:19:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-counts/m-p/258685#M49883</guid>
      <dc:creator>archibald</dc:creator>
      <dc:date>2016-03-24T00:19:34Z</dc:date>
    </item>
    <item>
      <title>Re: proc tabulate  counts</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-counts/m-p/258686#M49884</link>
      <description>&lt;P&gt;ok, thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2016 00:21:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-counts/m-p/258686#M49884</guid>
      <dc:creator>archibald</dc:creator>
      <dc:date>2016-03-24T00:21:04Z</dc:date>
    </item>
  </channel>
</rss>

