<?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 Producing all possible 3 way, 4 way and 5 way frequencies using PROC FREQ in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Producing-all-possible-3-way-4-way-and-5-way-frequencies-using/m-p/35713#M8847</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi Astounding,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your response. I'm currently identifying certain specific products and producing association rules using proc freq. Its worked well for me and has not put too much constraint on the system resources.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I plan to revisit the approach using your technique in the coming days as my end goal is to have a complete picture. I'll let you know how it works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks once again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Prakash &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 30 Jan 2012 04:46:23 GMT</pubDate>
    <dc:creator>PrakashSridharan</dc:creator>
    <dc:date>2012-01-30T04:46:23Z</dc:date>
    <item>
      <title>Producing all possible 3 way, 4 way and 5 way frequencies using PROC FREQ</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Producing-all-possible-3-way-4-way-and-5-way-frequencies-using/m-p/35703#M8837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm working with a sas dataset containing 72 Binary Variables (indicating occurence/non - occurence of an item in the transaction) and 1 ID variable similar to the following setup:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="3" cellspacing="0" class="jiveBorder" style="width: 100%; border: 1px solid #000000;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;ID&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Item 1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Item 2&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Item 3&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Item 4&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Item 5&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Item 6&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Item 7&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Item 8&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Item 9&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Item 10&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to use PROC FREQ or PROC SQL to produce all possible 3, 4 and 5 way frequencies of these binary variables. I want the outputs is tables respectively designed for 3, 4 and 5 way possibilities as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="3" cellspacing="0" class="jiveBorder" style="width: 100%; border: 1px solid #000000;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Variable 1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Variable 2&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Variable 3&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Count&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Item 1&lt;/TD&gt;&lt;TD&gt;Item 2&lt;/TD&gt;&lt;TD&gt;Item 3&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Item 1&lt;/TD&gt;&lt;TD&gt;Item 5&lt;/TD&gt;&lt;TD&gt;Item 6&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;I tried producing this using sas looping macros with a mix of PROC FREQ, DATA STEP and PROC APPEND. I'm unable to produce the code here due to confidentiality reasons. I keep getting an out of memory error (in my Unix Server based SAS EG with a Windows Frontend) beyond a certain point of time which typically runs for several hours (only to discover the error). I was able to get this done for 2 way frequencies beyond which I have been without any luck.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My end goal is to produce a market basket analysis. Please let me know if there is a more efficient alternative to get this done. Thanks in advance for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Prakash &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jan 2012 10:03:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Producing-all-possible-3-way-4-way-and-5-way-frequencies-using/m-p/35703#M8837</guid>
      <dc:creator>PrakashSridharan</dc:creator>
      <dc:date>2012-01-23T10:03:02Z</dc:date>
    </item>
    <item>
      <title>Producing all possible 3 way, 4 way and 5 way frequencies using PROC FREQ</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Producing-all-possible-3-way-4-way-and-5-way-frequencies-using/m-p/35704#M8838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's no wonder that you ran out of memory, you are looking at about 15 million rows of output.&amp;nbsp; 60K for the 3 way, 1+ million for the 4 way and 13+ million for the 5 way combination. (Google &amp;lt;72 chose 3&amp;gt; to get the exact count for 3-way).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rather than this brute-force approach, see what others have done first.&amp;nbsp; It's not my field, but I did find a lot just by Googling&lt;/P&gt;&lt;P&gt;market basket analysis site:sas.com&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Doc Muhlbaier&lt;/P&gt;&lt;P&gt;Duke&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jan 2012 15:16:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Producing-all-possible-3-way-4-way-and-5-way-frequencies-using/m-p/35704#M8838</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2012-01-23T15:16:33Z</dc:date>
    </item>
    <item>
      <title>Re: Producing all possible 3 way, 4 way and 5 way frequencies using PROC FREQ</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Producing-all-possible-3-way-4-way-and-5-way-frequencies-using/m-p/35705#M8839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi ... here's one idea using PROC SUMMARY, the test data has 100 people and 10 binary variables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(but I agree with Doc ... it's a MUCH LARGER problem with many more variables)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it answers "3 at a time" and you can modify for 4 and/or 5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;* test data;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;data x;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;array x(10);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;do id&amp;nbsp; = 1 to 100;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;do _n_ = 1 to 10;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; x(_n_) = (ranuni(999) gt .5);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;end;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;output;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;end;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;* use summary with no var statement;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;proc summary data=x ;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;class x1-x10;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;output out=counts;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;* look for observations with only 3 occurrences of 1;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;data group3 (keep=v: _freq_);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;array x(10);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;array v(3) $32;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;set counts;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;if n(of x1-x10) eq 3 and sum(of x1-x10,0) eq 3;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;loc = find(catt(of x1-x10),'1');&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;v1 = vname(x(loc));&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;loc = find(catt(of x1-x10),'1',loc+1);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;v2 = vname(x(loc));&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;loc = find(catt(of x1-x10),'1',loc+1);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;v3 = vname(x(loc));&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;* change the order of the data set (x1 x2 x3 1st, x1 x2 x4 2nd, etc. );&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;proc sort data=group3 sortseq=linguistic(numeric_collation=on);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;by v1 v2 v3;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a portion of the output ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;v1&amp;nbsp;&amp;nbsp;&amp;nbsp; v2&amp;nbsp;&amp;nbsp;&amp;nbsp; v3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _FREQ_&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;x1&amp;nbsp;&amp;nbsp;&amp;nbsp; x2&amp;nbsp;&amp;nbsp;&amp;nbsp; x3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;x1&amp;nbsp;&amp;nbsp;&amp;nbsp; x2&amp;nbsp;&amp;nbsp;&amp;nbsp; x4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;x1&amp;nbsp;&amp;nbsp;&amp;nbsp; x2&amp;nbsp;&amp;nbsp;&amp;nbsp; x5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 15&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;x1&amp;nbsp;&amp;nbsp;&amp;nbsp; x2&amp;nbsp;&amp;nbsp;&amp;nbsp; x6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 15&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;x1&amp;nbsp;&amp;nbsp;&amp;nbsp; x2&amp;nbsp;&amp;nbsp;&amp;nbsp; x7&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;x1&amp;nbsp;&amp;nbsp;&amp;nbsp; x2&amp;nbsp;&amp;nbsp;&amp;nbsp; x8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;x1&amp;nbsp;&amp;nbsp;&amp;nbsp; x2&amp;nbsp;&amp;nbsp;&amp;nbsp; x9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;x1&amp;nbsp;&amp;nbsp;&amp;nbsp; x2&amp;nbsp;&amp;nbsp;&amp;nbsp; x10&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 13&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;x1&amp;nbsp;&amp;nbsp;&amp;nbsp; x3&amp;nbsp;&amp;nbsp;&amp;nbsp; x4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;x1&amp;nbsp;&amp;nbsp;&amp;nbsp; x3&amp;nbsp;&amp;nbsp;&amp;nbsp; x5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 18&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;x1&amp;nbsp;&amp;nbsp;&amp;nbsp; x3&amp;nbsp;&amp;nbsp;&amp;nbsp; x6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 15&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;x1&amp;nbsp;&amp;nbsp;&amp;nbsp; x3&amp;nbsp;&amp;nbsp;&amp;nbsp; x7&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 14&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;x1&amp;nbsp;&amp;nbsp;&amp;nbsp; x3&amp;nbsp;&amp;nbsp;&amp;nbsp; x8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;x1&amp;nbsp;&amp;nbsp;&amp;nbsp; x3&amp;nbsp;&amp;nbsp;&amp;nbsp; x9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;x1&amp;nbsp;&amp;nbsp;&amp;nbsp; x3&amp;nbsp;&amp;nbsp;&amp;nbsp; x10&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 19&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;x1&amp;nbsp;&amp;nbsp;&amp;nbsp; x4&amp;nbsp;&amp;nbsp;&amp;nbsp; x5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 16&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;x1&amp;nbsp;&amp;nbsp;&amp;nbsp; x4&amp;nbsp;&amp;nbsp;&amp;nbsp; x6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;x1&amp;nbsp;&amp;nbsp;&amp;nbsp; x4&amp;nbsp;&amp;nbsp;&amp;nbsp; x7&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 14&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;x1&amp;nbsp;&amp;nbsp;&amp;nbsp; x4&amp;nbsp;&amp;nbsp;&amp;nbsp; x8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;x1&amp;nbsp;&amp;nbsp;&amp;nbsp; x4&amp;nbsp;&amp;nbsp;&amp;nbsp; x9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;x1&amp;nbsp;&amp;nbsp;&amp;nbsp; x4&amp;nbsp;&amp;nbsp;&amp;nbsp; x10&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 13&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jan 2012 15:53:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Producing-all-possible-3-way-4-way-and-5-way-frequencies-using/m-p/35705#M8839</guid>
      <dc:creator>MikeZdeb</dc:creator>
      <dc:date>2012-01-23T15:53:59Z</dc:date>
    </item>
    <item>
      <title>Producing all possible 3 way, 4 way and 5 way frequencies using PROC FREQ</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Producing-all-possible-3-way-4-way-and-5-way-frequencies-using/m-p/35706#M8840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi Doc,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your response. I did realize up front that the number of combinations that can be possible is pretty high. I actually had put in a control within the code where I filter for and add only those frequencies with a compulsary positive value i.e. something like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; proc freq data = dataset;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tables Item1*Item2*Item3/out = freqset;&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; where Item1 = 1 and Item2 = 1 and Item3 = 1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Item1, Item2 and Item3 will be controlled using a loop to ensure there are no repeats and scenarios where Item1 = Item2. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From your comments above I think 3 way should have worked because 60K rows should have been handled by SAS, but it looks like the brute force method is too intensive for SAS. I do agree that 1+ million and 13 million was always going to be iffy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Prakash &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jan 2012 16:16:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Producing-all-possible-3-way-4-way-and-5-way-frequencies-using/m-p/35706#M8840</guid>
      <dc:creator>PrakashSridharan</dc:creator>
      <dc:date>2012-01-23T16:16:57Z</dc:date>
    </item>
    <item>
      <title>Producing all possible 3 way, 4 way and 5 way frequencies using PROC FREQ</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Producing-all-possible-3-way-4-way-and-5-way-frequencies-using/m-p/35707#M8841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi MikeZDeb,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me try this approach first thing in the morning and let you know how it worked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Prakash&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jan 2012 16:18:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Producing-all-possible-3-way-4-way-and-5-way-frequencies-using/m-p/35707#M8841</guid>
      <dc:creator>PrakashSridharan</dc:creator>
      <dc:date>2012-01-23T16:18:43Z</dc:date>
    </item>
    <item>
      <title>Re: Producing all possible 3 way, 4 way and 5 way frequencies using PROC FREQ</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Producing-all-possible-3-way-4-way-and-5-way-frequencies-using/m-p/35708#M8842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;WAYS&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;summary&lt;/STRONG&gt; &lt;SPAN style="font-size: 10pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;=x &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;chartype&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;class&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; x1-x10;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;ways&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;3&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;output&lt;/SPAN&gt; &lt;SPAN style="font-size: 10pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;out&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;=counts;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;STRONG style="color: navy; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; counts;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; counts;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; n(of x:) eq sum(of x:);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;STRONG style="color: navy; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;print&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;STRONG style="color: navy; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jan 2012 16:27:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Producing-all-possible-3-way-4-way-and-5-way-frequencies-using/m-p/35708#M8842</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2012-01-23T16:27:19Z</dc:date>
    </item>
    <item>
      <title>Re: Producing all possible 3 way, 4 way and 5 way frequencies using PROC FREQ</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Producing-all-possible-3-way-4-way-and-5-way-frequencies-using/m-p/35709#M8843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi ... thanks, forgot about WAYS and gave up on trying to figure out how to use _TYPE_&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it's too bad that WHERE does not support "OF" to make this a bit better ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;* only use observations with at least three occurrences of 1;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff;"&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;proc summary data=x (where=(sum (of x:) ge 3));&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff;"&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;class x1-x10;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff;"&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;&lt;CODE class="jive-code"&gt;ways 3;&lt;/CODE&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff;"&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;output out=counts;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff;"&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;run;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so why doesn't WHERE support "OF" ... I resorted to writing this to use when you'd like to use "OF" with WHERE ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;%macro whereof(func,var,n,also);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;where &amp;amp;also &amp;amp;func(&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;%do j=1 %to %eval(&amp;amp;n-1);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; &amp;amp;var&amp;amp;j ,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;%end;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;&amp;amp;var&amp;amp;j )&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;%mend;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;proc summary data=x ;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff;"&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;&lt;STRONG style="background-color: #ffffff; font-family: 'courier new', courier;"&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;%whereof(sum,x,10) ge 3;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff;"&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;class x1-x10;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff;"&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;&lt;CODE class="jive-code"&gt;ways 3;&lt;/CODE&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff;"&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;output out=counts;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff;"&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;run;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jan 2012 16:50:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Producing-all-possible-3-way-4-way-and-5-way-frequencies-using/m-p/35709#M8843</guid>
      <dc:creator>MikeZdeb</dc:creator>
      <dc:date>2012-01-23T16:50:51Z</dc:date>
    </item>
    <item>
      <title>Producing all possible 3 way, 4 way and 5 way frequencies using PROC FREQ</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Producing-all-possible-3-way-4-way-and-5-way-frequencies-using/m-p/35710#M8844</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hard Luck with this approach as well.:smileyconfused: I'm encountering the same lengthy runs followed by the out of memory error. I think this is a SAS environment issue versus the aproach we are taking. I'm going to talk to my admin to see if something can be done.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Prakash&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jan 2012 05:06:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Producing-all-possible-3-way-4-way-and-5-way-frequencies-using/m-p/35710#M8844</guid>
      <dc:creator>PrakashSridharan</dc:creator>
      <dc:date>2012-01-24T05:06:43Z</dc:date>
    </item>
    <item>
      <title>Re: Producing all possible 3 way, 4 way and 5 way frequencies using PROC FREQ</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Producing-all-possible-3-way-4-way-and-5-way-frequencies-using/m-p/35711#M8845</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;TOO many combinations....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'SAS Monospace';"&gt;369&amp;nbsp; data _null_;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'SAS Monospace';"&gt;370&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do way=3,4,5;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'SAS Monospace';"&gt;371&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x=comb(72,way);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'SAS Monospace';"&gt;372&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; put x=;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'SAS Monospace';"&gt;373&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'SAS Monospace';"&gt;374&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'SAS Monospace';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'SAS Monospace';"&gt;x=59640&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'SAS Monospace';"&gt;x=1028790&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'SAS Monospace';"&gt;x=13991544&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jan 2012 12:32:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Producing-all-possible-3-way-4-way-and-5-way-frequencies-using/m-p/35711#M8845</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2012-01-24T12:32:34Z</dc:date>
    </item>
    <item>
      <title>Re: Producing all possible 3 way, 4 way and 5 way frequencies using PROC FREQ</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Producing-all-possible-3-way-4-way-and-5-way-frequencies-using/m-p/35712#M8846</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Prakash,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you have seen, you may strain the resources of your hardware.&amp;nbsp; Here is the way I typically try to work with this sort of data to lessen the burden.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data subset;&lt;/P&gt;&lt;P&gt;set choices;&lt;/P&gt;&lt;P&gt;n_items = sum(of item_1 - item_72);&lt;/P&gt;&lt;P&gt;if (3 &amp;lt;= n_items &amp;lt;= 5);&lt;/P&gt;&lt;P&gt;length presented $ 14;&lt;/P&gt;&lt;P&gt;array items {72} item_1 - item_72;&lt;/P&gt;&lt;P&gt;position = 1;&lt;/P&gt;&lt;P&gt;do _i_=1 to 72;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; if items{_i_}=1 then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; substr(presented, position, 2) = put(_i_, z2.);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; position = position + 3;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;drop position _i_;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By stringing the selections into one variable (presented), you get a lot of flexibility.&amp;nbsp; For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc freq data=subset;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; where n_items=3; /* or 4 or 5 */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; tables presented;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Jan 2012 00:44:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Producing-all-possible-3-way-4-way-and-5-way-frequencies-using/m-p/35712#M8846</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2012-01-28T00:44:10Z</dc:date>
    </item>
    <item>
      <title>Producing all possible 3 way, 4 way and 5 way frequencies using PROC FREQ</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Producing-all-possible-3-way-4-way-and-5-way-frequencies-using/m-p/35713#M8847</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi Astounding,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your response. I'm currently identifying certain specific products and producing association rules using proc freq. Its worked well for me and has not put too much constraint on the system resources.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I plan to revisit the approach using your technique in the coming days as my end goal is to have a complete picture. I'll let you know how it works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks once again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Prakash &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2012 04:46:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Producing-all-possible-3-way-4-way-and-5-way-frequencies-using/m-p/35713#M8847</guid>
      <dc:creator>PrakashSridharan</dc:creator>
      <dc:date>2012-01-30T04:46:23Z</dc:date>
    </item>
    <item>
      <title>Producing all possible 3 way, 4 way and 5 way frequencies using PROC FREQ</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Producing-all-possible-3-way-4-way-and-5-way-frequencies-using/m-p/35714#M8848</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi Astounding,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I carefully reviewed your code i realized it doesn't produce what I exactly wanted. For Example, if you take a row with n_items = 5, it only produces the 5 items in the presented variables. However, there are 5C3 three way interactions and 5C4 4 way interations which do not get produced. Thats the whole idea of frequent item sets which we are trying to arrive at here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let us know your thoughts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Prakash&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jan 2012 08:47:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Producing-all-possible-3-way-4-way-and-5-way-frequencies-using/m-p/35714#M8848</guid>
      <dc:creator>PrakashSridharan</dc:creator>
      <dc:date>2012-01-31T08:47:43Z</dc:date>
    </item>
    <item>
      <title>Producing all possible 3 way, 4 way and 5 way frequencies using PROC FREQ</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Producing-all-possible-3-way-4-way-and-5-way-frequencies-using/m-p/35715#M8849</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Prakash,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess I'm misinterpreting the question.&amp;nbsp; Maybe you can clarify.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose there is a single incoming observation with n_items=5.&amp;nbsp; There would be 5 5C4 combinations and 10 5C3 combinations.&amp;nbsp;&amp;nbsp; Are trying to count across all observations how many times each 5C3 combination appears?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jan 2012 14:10:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Producing-all-possible-3-way-4-way-and-5-way-frequencies-using/m-p/35715#M8849</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2012-01-31T14:10:54Z</dc:date>
    </item>
    <item>
      <title>Producing all possible 3 way, 4 way and 5 way frequencies using PROC FREQ</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Producing-all-possible-3-way-4-way-and-5-way-frequencies-using/m-p/35716#M8850</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; That is correct. The goal is to count every possible 3 way/4 way and 5 way occurence i.e. in the above binary matrix all possibilities of 3 way, 4 way and 5 way frequencies of combinations of each item. Your idea was very interesting in terms of using the sum to determine the combinations. The way we should look to do it is to try and iteratively sum the binary variables within each row. So, to evaluate 3 way combinations you need to create 72C3 variables and scan for variables where we have sum = 3. Likewise for 4 and 5 way combinations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; To my knowledge this can be accomplished using macros but thats where I feel the root cause of our problems exist - Memory. I think the iterations are prohibitively high for my system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let us know your thoughts. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Prakash &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jan 2012 14:38:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Producing-all-possible-3-way-4-way-and-5-way-frequencies-using/m-p/35716#M8850</guid>
      <dc:creator>PrakashSridharan</dc:creator>
      <dc:date>2012-01-31T14:38:00Z</dc:date>
    </item>
    <item>
      <title>Producing all possible 3 way, 4 way and 5 way frequencies using PROC FREQ</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Producing-all-possible-3-way-4-way-and-5-way-frequencies-using/m-p/35717#M8851</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Prakash,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is feasible, if you shift your approach.&amp;nbsp; Instead of creating many variables, create many observations instead.&amp;nbsp; Here is the simplest case example, assuming that you have already created the data set SUBSET containing N_ITEMS and PRESENTED.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _5C4_ (keep=_5C4_);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; set subset (keep=n_items presented);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; where n_items=5;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; do i=1 to 13 by 3;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _5C4_ = presented;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; substr(_5C4_, i, 2) = '&amp;nbsp; ';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _5C4_ = left(compbl(_5C4_));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The idea is to calculate each possible 5C4 combination by blanking out one of the choices.&amp;nbsp; Then standardize the format by getting rid of extra blanks.&amp;nbsp; Finally, output the result as a separate observation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You won't run out of memory creating the data set.&amp;nbsp; At some point, however, you could run out of memory if you use PROC FREQ to do the counting.&amp;nbsp; You may have to switch to brute force:&amp;nbsp; SORT, then count in a DATA step.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The processing for 5C3 combinations is a little fancier, but follows the same general idea.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _5C3_ (keep=_5C3_);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; set subset (keep=n_items presented);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; where n_items=5;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; do i=1 to 10 by 3;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do j=i+3 to 13 by 3;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _5C3_ = presented;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; substr(_5C3_, i, 2) = '&amp;nbsp; ';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; substr(_5C3_, j, 2) = '&amp;nbsp; ';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _5C3_ = left(compbl(_5C3_));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is untested code, so you may need to tweak it.&amp;nbsp; If you get ambitious, you could manage to use one data step instead of two.&amp;nbsp; But once you switch to creating multiple observations, you will trade your memory issues for storage space consumption.&amp;nbsp; Also note that if you are starting with choice sets of more than 5 items, you will need to increase the length of PRESENTED accordingly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jan 2012 15:06:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Producing-all-possible-3-way-4-way-and-5-way-frequencies-using/m-p/35717#M8851</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2012-01-31T15:06:39Z</dc:date>
    </item>
    <item>
      <title>Producing all possible 3 way, 4 way and 5 way frequencies using PROC FREQ</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Producing-all-possible-3-way-4-way-and-5-way-frequencies-using/m-p/35718#M8852</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Prakash,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just in case I'm still misinterpeting the problem, here's an approach that uses your original data set as input.&amp;nbsp; It creates an observation for each 72C3 combination that have all 3 items equal to 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _72C3_ (keep=_72C3_);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; set original;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; array items {72} item_1 - item_72;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; do i = 1 to 70;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do j = i+1 to 71;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do k = j + 1 to 72;&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; if items{i} = items{j} = items{k} = 1 then do;&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; _72C3_ = put(i, z2.) || ' ' || put(j, z2.) || ' ' || put(k, z2.);&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; output;&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; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then get counts for each value of _72C3_.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jan 2012 16:30:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Producing-all-possible-3-way-4-way-and-5-way-frequencies-using/m-p/35718#M8852</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2012-01-31T16:30:52Z</dc:date>
    </item>
  </channel>
</rss>

