<?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 to Find Total Frequency for Each Response Across Multiple Variables in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Proc-Tabulate-to-Find-Total-Frequency-for-Each-Response-Across/m-p/569441#M11817</link>
    <description>&lt;P&gt;I can think of at least two different interpretations of "I want to find the mode response, or the response that respondents pick across all eleven variables." without even thinking hard.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You need to provide some actual example data and the desired result for that data. Likely an example with only 5 variables to reduce the scale would suffice but enough records to work with. The desired result should match the example data exactly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best is to provide the data in the form of a data step so we can test code. Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt; will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the {i} icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Proc Tabulate isn't going to work, at least not with out a lot of preprocessing because is only reports on statistics for single variables.&lt;/P&gt;</description>
    <pubDate>Thu, 27 Jun 2019 14:22:30 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2019-06-27T14:22:30Z</dc:date>
    <item>
      <title>Proc Tabulate to Find Total Frequency for Each Response Across Multiple Variables</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Proc-Tabulate-to-Find-Total-Frequency-for-Each-Response-Across/m-p/569381#M11796</link>
      <description>&lt;P&gt;I am trying to find the total frequency of a response across several variables. In my example, I have the following 11&amp;nbsp;&lt;STRONG&gt;categorical&lt;/STRONG&gt; variables:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A1Q1, A2Q1, RFQ1, SE1Q1, SE2Q1, SE3Q1, SE4Q1, I1Q1, I2Q1, I3Q1, I4Q1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The possible responses for each of the variables is . (Missing), 0, 1, 2, 3, 4, and 5. I want to find the mode response, or the response that respondents pick across all eleven variables. I realize that I cannot use proc univariate, as these variables are not continuous; they are categorical.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Proc freq is not useful, as it presents all of the variables individually, and the frequency of a response (., 0, 1, 2, 3, 4, 5) for that particular variable, not the frequency of the response across all eleven variables (a total frequency).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to use proc tabulate using this code:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc tabulate data=six;&lt;BR /&gt;class A1Q1 A2Q1 RFQ1 SE1Q1 SE2Q1 SE3Q1 SE4Q1 I1Q1 I2Q1 I3Q1 I4Q1;&lt;BR /&gt;table A1Q1 A2Q1 RFQ1 SE1Q1 SE2Q1 SE3Q1 SE4Q1 I1Q1 I2Q1 I3Q1 I4Q1;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, this code just provides all of the proc freq tables squished into one. I have attached a photo of the truncated table to show what I mean. Is there any way for me to find the total number of missing responses, responses for 1, responses for 2, responses for 3, responses for 4, and responses for 5 across all eleven variables so that I do not manually have to sum up the frequency for a particular response of each of the variables? Thanks!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tabulate.PNG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/30593i459BD0B33293356B/image-size/large?v=v2&amp;amp;px=999" role="button" title="tabulate.PNG" alt="tabulate.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2019 10:51:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Proc-Tabulate-to-Find-Total-Frequency-for-Each-Response-Across/m-p/569381#M11796</guid>
      <dc:creator>JackZ295</dc:creator>
      <dc:date>2019-06-27T10:51:21Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Tabulate to Find Total Frequency for Each Response Across Multiple Variables</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Proc-Tabulate-to-Find-Total-Frequency-for-Each-Response-Across/m-p/569441#M11817</link>
      <description>&lt;P&gt;I can think of at least two different interpretations of "I want to find the mode response, or the response that respondents pick across all eleven variables." without even thinking hard.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You need to provide some actual example data and the desired result for that data. Likely an example with only 5 variables to reduce the scale would suffice but enough records to work with. The desired result should match the example data exactly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best is to provide the data in the form of a data step so we can test code. Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt; will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the {i} icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Proc Tabulate isn't going to work, at least not with out a lot of preprocessing because is only reports on statistics for single variables.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2019 14:22:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Proc-Tabulate-to-Find-Total-Frequency-for-Each-Response-Across/m-p/569441#M11817</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-06-27T14:22:30Z</dc:date>
    </item>
  </channel>
</rss>

