<?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 Multiple Frequency Table in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Multiple-Frequency-Table/m-p/632461#M187520</link>
    <description>&lt;P&gt;I have a table that contains individual rows of data for customers, with various other variables that have a 1 or a 0.&amp;nbsp; You can use this to get a feel for what I mean:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input ID ColumnA StatusB CategoryF UnderPerf;
datalines ;
1 1 0 0 1
2 1 0 1 1
3 0 1 1 1
4 0 0 0 0
5 1 1 1 1
;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;What I would like off the back of this is to get a frequency of each of the variables by each other in one big matrix such as this:&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="Want" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/36910iB1441D2132B886C1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Want.jpg" alt="Want" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Want&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Please bear in mind that these are made up variables, and in total there about 20.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks!&lt;/P&gt;&lt;P&gt;Jamie&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 16 Mar 2020 15:23:37 GMT</pubDate>
    <dc:creator>Jamie_H</dc:creator>
    <dc:date>2020-03-16T15:23:37Z</dc:date>
    <item>
      <title>Multiple Frequency Table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiple-Frequency-Table/m-p/632461#M187520</link>
      <description>&lt;P&gt;I have a table that contains individual rows of data for customers, with various other variables that have a 1 or a 0.&amp;nbsp; You can use this to get a feel for what I mean:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input ID ColumnA StatusB CategoryF UnderPerf;
datalines ;
1 1 0 0 1
2 1 0 1 1
3 0 1 1 1
4 0 0 0 0
5 1 1 1 1
;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;What I would like off the back of this is to get a frequency of each of the variables by each other in one big matrix such as this:&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="Want" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/36910iB1441D2132B886C1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Want.jpg" alt="Want" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Want&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Please bear in mind that these are made up variables, and in total there about 20.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks!&lt;/P&gt;&lt;P&gt;Jamie&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Mar 2020 15:23:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiple-Frequency-Table/m-p/632461#M187520</guid>
      <dc:creator>Jamie_H</dc:creator>
      <dc:date>2020-03-16T15:23:37Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Frequency Table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiple-Frequency-Table/m-p/632466#M187523</link>
      <description>&lt;P&gt;I do not grasp the logic that lets you go from input data to output table. Please explain.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Mar 2020 15:40:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiple-Frequency-Table/m-p/632466#M187523</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-03-16T15:40:15Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Frequency Table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiple-Frequency-Table/m-p/632467#M187524</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/129266"&gt;@Jamie_H&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use PROC CORR to achieve this (cf. similar post &lt;A href="https://communities.sas.com/t5/SAS-Programming/Calculating-Product-Overlap-in-a-Basket/m-p/631529#M187126" target="_self"&gt;https://communities.sas.com/t5/SAS-Programming/Calculating-Product-Overlap-in-a-Basket/m-p/631529#M187126&lt;/A&gt; and great&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;solution!)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc corr data=have out=have_corr sscp noprint ;
	var ColumnA StatusB CategoryF UnderPerf;
run;

data want;
	set have_corr;
	where _type_='SSCP' and _name_ ne 'Intercept';
	keep _name_ ColumnA StatusB CategoryF UnderPerf;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Capture d’écran 2020-03-16 à 16.40.01.png" style="width: 295px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/36911i0C953CD7EFFADB04/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Capture d’écran 2020-03-16 à 16.40.01.png" alt="Capture d’écran 2020-03-16 à 16.40.01.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Mar 2020 15:41:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiple-Frequency-Table/m-p/632467#M187524</guid>
      <dc:creator>ed_sas_member</dc:creator>
      <dc:date>2020-03-16T15:41:43Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Frequency Table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiple-Frequency-Table/m-p/632468#M187525</link>
      <description>&lt;P&gt;That's perfect Ed and so useful to get to play with a Proc that I had heard of before but never had the opportunity to use.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 16 Mar 2020 15:48:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiple-Frequency-Table/m-p/632468#M187525</guid>
      <dc:creator>Jamie_H</dc:creator>
      <dc:date>2020-03-16T15:48:01Z</dc:date>
    </item>
  </channel>
</rss>

