<?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 How Do I Make a Frequency Table with variables and their subsets? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-Do-I-Make-a-Frequency-Table-with-variables-and-their-subsets/m-p/596662#M171829</link>
    <description>&lt;P&gt;Hi!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From my research I think proc freq or proc tabulate may be used to create a table that I would like to make:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have three variables, Ethnicity (Hispanic, non-hispanic), Race (White, AA, Asian, Pacific Islander, ...) and Gender (Male, Female, Unspecified)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to make a table that looks like the following:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;STRONG&gt;Racial Categories&amp;nbsp; &amp;nbsp;&lt;/STRONG&gt; &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; &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; &lt;STRONG&gt;&amp;nbsp;Ethnicity&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &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;Nonhispanic&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; Not Reported&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TOTAL&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&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; &amp;nbsp;&lt;STRONG&gt; Female Male not-reported&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;Female Male not-reported&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; Female Male not-reported&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;White&amp;nbsp;&lt;/P&gt;&lt;P&gt;African American&amp;nbsp;&lt;/P&gt;&lt;P&gt;Asian&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; &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; FREQUENCY COUNTS&amp;nbsp;&lt;/P&gt;&lt;P&gt;Pacific Islander&amp;nbsp;&lt;/P&gt;&lt;P&gt;etc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What would be the best way to create a table like this in SAS? I am fairly new to SAS, so a thorough explanation would be greatly appreciated.I believe I have SAS version 9.4&lt;BR /&gt;&lt;BR /&gt;.&lt;/P&gt;</description>
    <pubDate>Tue, 15 Oct 2019 21:21:37 GMT</pubDate>
    <dc:creator>awardell</dc:creator>
    <dc:date>2019-10-15T21:21:37Z</dc:date>
    <item>
      <title>How Do I Make a Frequency Table with variables and their subsets?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-Do-I-Make-a-Frequency-Table-with-variables-and-their-subsets/m-p/596662#M171829</link>
      <description>&lt;P&gt;Hi!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From my research I think proc freq or proc tabulate may be used to create a table that I would like to make:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have three variables, Ethnicity (Hispanic, non-hispanic), Race (White, AA, Asian, Pacific Islander, ...) and Gender (Male, Female, Unspecified)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to make a table that looks like the following:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;STRONG&gt;Racial Categories&amp;nbsp; &amp;nbsp;&lt;/STRONG&gt; &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; &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; &lt;STRONG&gt;&amp;nbsp;Ethnicity&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &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;Nonhispanic&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; Not Reported&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TOTAL&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&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; &amp;nbsp;&lt;STRONG&gt; Female Male not-reported&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;Female Male not-reported&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; Female Male not-reported&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;White&amp;nbsp;&lt;/P&gt;&lt;P&gt;African American&amp;nbsp;&lt;/P&gt;&lt;P&gt;Asian&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; &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; FREQUENCY COUNTS&amp;nbsp;&lt;/P&gt;&lt;P&gt;Pacific Islander&amp;nbsp;&lt;/P&gt;&lt;P&gt;etc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What would be the best way to create a table like this in SAS? I am fairly new to SAS, so a thorough explanation would be greatly appreciated.I believe I have SAS version 9.4&lt;BR /&gt;&lt;BR /&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Oct 2019 21:21:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-Do-I-Make-a-Frequency-Table-with-variables-and-their-subsets/m-p/596662#M171829</guid>
      <dc:creator>awardell</dc:creator>
      <dc:date>2019-10-15T21:21:37Z</dc:date>
    </item>
    <item>
      <title>Re: How Do I Make a Frequency Table with variables and their subsets?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-Do-I-Make-a-Frequency-Table-with-variables-and-their-subsets/m-p/596664#M171830</link>
      <description>Look into PROC TABULATE. &lt;BR /&gt;Something as simple as the following should get you started:&lt;BR /&gt;&lt;BR /&gt;proc tabulate data=have;&lt;BR /&gt;class ethnicity gender;&lt;BR /&gt;table ethnicity, gender;&lt;BR /&gt;run;</description>
      <pubDate>Tue, 15 Oct 2019 21:29:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-Do-I-Make-a-Frequency-Table-with-variables-and-their-subsets/m-p/596664#M171830</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-10-15T21:29:14Z</dc:date>
    </item>
    <item>
      <title>Re: How Do I Make a Frequency Table with variables and their subsets?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-Do-I-Make-a-Frequency-Table-with-variables-and-their-subsets/m-p/596667#M171832</link>
      <description>&lt;P&gt;Thanks for your speedy response. I have put this in SAS, and this gives me the gender by ethnicity table. I'm guessing I will need to do something similar to this to get the tables with all three variables:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc tabulate data=gender_p;&lt;BR /&gt;class race ethnicity gender;&lt;BR /&gt;table race, ethnicity*gender&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks so much!!!&lt;/P&gt;</description>
      <pubDate>Tue, 15 Oct 2019 21:37:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-Do-I-Make-a-Frequency-Table-with-variables-and-their-subsets/m-p/596667#M171832</guid>
      <dc:creator>awardell</dc:creator>
      <dc:date>2019-10-15T21:37:41Z</dc:date>
    </item>
    <item>
      <title>Re: How Do I Make a Frequency Table with variables and their subsets?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-Do-I-Make-a-Frequency-Table-with-variables-and-their-subsets/m-p/596681#M171842</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/172666"&gt;@awardell&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thanks for your speedy response. I have put this in SAS, and this gives me the gender by ethnicity table. I'm guessing I will need to do something similar to this to get the tables with all three variables:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc tabulate data=gender_p;&lt;BR /&gt;class race ethnicity gender;&lt;BR /&gt;table race, ethnicity*gender&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks so much!!!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;It depends on how you want to look at things.&lt;/P&gt;
&lt;P&gt;One thing it may be helpful to know is that Proc Tabulate supports multiple table statements.&lt;/P&gt;
&lt;P&gt;Second is the , separates dimensions (page, row and column)&amp;nbsp;and * nests variables and statistics within a dimension:&lt;/P&gt;
&lt;P&gt;so you might look at&lt;/P&gt;
&lt;PRE&gt;proc tabulate data=gender_p;
class race ethnicity gender;
table race, 
      ethnicity*gender 
;
table race, 
      ethnicity,
      gender
;
table race * ethnicity,
      gender
;
table race * ethnicity *  gender
;
table race ethnicity gender,
      race ethnicity gender
;



run;&lt;/PRE&gt;
&lt;P&gt;for a variety. The N statistic is assumed for class variables is no other is requested. There are a number of percentages that could be requested as well.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Oct 2019 23:13:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-Do-I-Make-a-Frequency-Table-with-variables-and-their-subsets/m-p/596681#M171842</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-10-15T23:13:28Z</dc:date>
    </item>
  </channel>
</rss>

