<?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: Variable Combination Count in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Variable-Combination-Count/m-p/240304#M268348</link>
    <description>What does your data actually look like? You can calculate the number of combinations via the comb() function.  &lt;BR /&gt;&lt;BR /&gt;data have;&lt;BR /&gt;do i=1 to 5;&lt;BR /&gt;x=comb(5,i);&lt;BR /&gt;y=sum(x,y);&lt;BR /&gt;output;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;proc print data=have;run;&lt;BR /&gt;&lt;BR /&gt;Counting the instances may be as simple as a proc freq.</description>
    <pubDate>Mon, 21 Dec 2015 20:15:41 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2015-12-21T20:15:41Z</dc:date>
    <item>
      <title>Variable Combination Count</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Variable-Combination-Count/m-p/240302#M268347</link>
      <description>&lt;P&gt;Hi Everyone I have come across an issue that I was hoping someone could help me solve. I have a data set with 120 observations. I would like to see how many times various combinations of five variables present themselves within the data. According to my calculations there are 31 possible unique combinations of the 5 variables. What I would like to see is how many times each of these 31 combinations are present within these 120 observations. A table of the possible combinations is listed with the 5 variables represented as A, B, C, D, and E.&amp;nbsp; Any help would be greatly appreciated!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/12154iC88837C1AC48FA32/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="combo.JPG" title="combo.JPG" /&gt;</description>
      <pubDate>Mon, 21 Dec 2015 20:03:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Variable-Combination-Count/m-p/240302#M268347</guid>
      <dc:creator>Aves9019</dc:creator>
      <dc:date>2015-12-21T20:03:57Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Combination Count</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Variable-Combination-Count/m-p/240304#M268348</link>
      <description>What does your data actually look like? You can calculate the number of combinations via the comb() function.  &lt;BR /&gt;&lt;BR /&gt;data have;&lt;BR /&gt;do i=1 to 5;&lt;BR /&gt;x=comb(5,i);&lt;BR /&gt;y=sum(x,y);&lt;BR /&gt;output;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;proc print data=have;run;&lt;BR /&gt;&lt;BR /&gt;Counting the instances may be as simple as a proc freq.</description>
      <pubDate>Mon, 21 Dec 2015 20:15:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Variable-Combination-Count/m-p/240304#M268348</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-12-21T20:15:41Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Combination Count</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Variable-Combination-Count/m-p/240306#M268349</link>
      <description>&lt;P&gt;This should do it:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc freq data=have;&lt;/P&gt;
&lt;P&gt;tables a * b * c * d * e / missing list;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The number of combinations of values could be much larger depending on what values your variables take on.&amp;nbsp; But you'll see that soon enough.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good luck.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Dec 2015 20:18:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Variable-Combination-Count/m-p/240306#M268349</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2015-12-21T20:18:54Z</dc:date>
    </item>
  </channel>
</rss>

