<?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 Simulate all the Dataset with N sample and combination of X and Y in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Simulate-all-the-Dataset-with-N-sample-and-combination-of-X-and/m-p/514173#M138632</link>
    <description>&lt;P&gt;Hello everyone, I'm a freshly new Sas User, I need to generate various dataset of N sample numerosity with every possible combination of the value of X and Y.&lt;/P&gt;&lt;P&gt;Y is a binary variable (0, 1) and X can vary (it can be binary or -1,0,1 or -2,-1,0,1,2 etc, but always with integers number).&lt;/P&gt;&lt;P&gt;I need to simulate every possible dataset which has N numerosity and every observation of the dataset has an X and a Y value.&lt;/P&gt;&lt;P&gt;So if I have N=5 X=(0, 1) Y=(0, 1) my datasets will look like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;X Y&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; X Y&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; X Y&amp;nbsp; &amp;nbsp; &amp;nbsp; X Y&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;0 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;0 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;0 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;since order doesn't count.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;P.S. it's not strictly necessary that the result are in different dataset, and&amp;nbsp; the datasets must have ALL the combination of X and Y&amp;nbsp; (in this case 1 1,&amp;nbsp; 1 0,&amp;nbsp; 0 1,&amp;nbsp; 0 0)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I had tried to find a function but i&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;can't find anything...&lt;/P&gt;&lt;P&gt;Thanks Everyone&lt;/P&gt;</description>
    <pubDate>Sun, 18 Nov 2018 10:20:19 GMT</pubDate>
    <dc:creator>SquashingOtters</dc:creator>
    <dc:date>2018-11-18T10:20:19Z</dc:date>
    <item>
      <title>Simulate all the Dataset with N sample and combination of X and Y</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Simulate-all-the-Dataset-with-N-sample-and-combination-of-X-and/m-p/514173#M138632</link>
      <description>&lt;P&gt;Hello everyone, I'm a freshly new Sas User, I need to generate various dataset of N sample numerosity with every possible combination of the value of X and Y.&lt;/P&gt;&lt;P&gt;Y is a binary variable (0, 1) and X can vary (it can be binary or -1,0,1 or -2,-1,0,1,2 etc, but always with integers number).&lt;/P&gt;&lt;P&gt;I need to simulate every possible dataset which has N numerosity and every observation of the dataset has an X and a Y value.&lt;/P&gt;&lt;P&gt;So if I have N=5 X=(0, 1) Y=(0, 1) my datasets will look like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;X Y&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; X Y&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; X Y&amp;nbsp; &amp;nbsp; &amp;nbsp; X Y&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;0 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;0 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;0 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;since order doesn't count.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;P.S. it's not strictly necessary that the result are in different dataset, and&amp;nbsp; the datasets must have ALL the combination of X and Y&amp;nbsp; (in this case 1 1,&amp;nbsp; 1 0,&amp;nbsp; 0 1,&amp;nbsp; 0 0)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I had tried to find a function but i&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;can't find anything...&lt;/P&gt;&lt;P&gt;Thanks Everyone&lt;/P&gt;</description>
      <pubDate>Sun, 18 Nov 2018 10:20:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Simulate-all-the-Dataset-with-N-sample-and-combination-of-X-and/m-p/514173#M138632</guid>
      <dc:creator>SquashingOtters</dc:creator>
      <dc:date>2018-11-18T10:20:19Z</dc:date>
    </item>
    <item>
      <title>Generate every possible dataset of N sample for every possible values of X and Y</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Simulate-all-the-Dataset-with-N-sample-and-combination-of-X-and/m-p/513919#M138634</link>
      <description>&lt;P&gt;Hello everyone, I'm a freshly new Sas User, I need to generate various dataset of N sample numerosity with every possible combination of the value of X and Y.&lt;/P&gt;&lt;P&gt;Y is a binary variable (0, 1) and X can vary (it can be binary or -1,0,1 or -2,-1,0,1,2 etc, but always with integers number).&lt;/P&gt;&lt;P&gt;I need to simulate every possible dataset which has N numerosity and every observation of the dataset has an X and a Y value.&lt;/P&gt;&lt;P&gt;So if I have N=5 X=(0, 1) Y=(0, 1) my datasets will look like:&lt;/P&gt;&lt;P&gt;X&amp;nbsp; &amp;nbsp;Y&amp;nbsp; ID&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;SPAN&gt;X&amp;nbsp; &amp;nbsp;Y&amp;nbsp; ID&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;X&amp;nbsp; &amp;nbsp;Y&amp;nbsp; &amp;nbsp;ID&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&amp;nbsp; &amp;nbsp; 0&amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp;1&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; 0&amp;nbsp; &amp;nbsp;2&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; 0&amp;nbsp; &amp;nbsp;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; 0&amp;nbsp; &amp;nbsp;3&lt;/P&gt;&lt;P&gt;0&amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp;4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp;4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp;4&lt;/P&gt;&lt;P&gt;0&amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp;5&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp;5&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp;5&amp;nbsp; &amp;nbsp; &amp;nbsp;etc.. etc..&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;And so on with every possibly combination&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;P.S. it's not strictly necessary that the result are in different dataset, and it's better if there are only the datasets with ALL the combination of X and Y&amp;nbsp; (in this case 1 1,&amp;nbsp; 1 0,&amp;nbsp; 0 1,&amp;nbsp; 0 0)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I had tried to find a function but i can't find anything...&lt;/P&gt;&lt;P&gt;Thanks Everyone&lt;/P&gt;</description>
      <pubDate>Sun, 18 Nov 2018 00:34:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Simulate-all-the-Dataset-with-N-sample-and-combination-of-X-and/m-p/513919#M138634</guid>
      <dc:creator>SquashingOtters</dc:creator>
      <dc:date>2018-11-18T00:34:22Z</dc:date>
    </item>
    <item>
      <title>Re: Generate every possible dataset of N sample for every possible values of X and Y</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Simulate-all-the-Dataset-with-N-sample-and-combination-of-X-and/m-p/513928#M138635</link>
      <description>&lt;P&gt;You can use an SQL cross join here or a do loop.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the cross join, first make tables that have the list of values for each variable and then do a select *.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data a;
input X;
cards;
0
1
;
data b;
do y=-1 to 1;
output;
end;
run;

proc sql;
create table allcomb as
select *
from a, b;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or use nested do loops to get all combinations:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want_option2;
do x=0 to 1;
	do y= -1 to 1;
		output;
	end;
end;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You haven't really explained where N sample comes inthough, so I guess I can help with that after you've clarified it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/246894"&gt;@SquashingOtters&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello everyone, I'm a freshly new Sas User, I have to study the convergence of the log-binomial model, however I need to generate various dataset of N numerosity with every possible combination of the value of X and Y.&lt;/P&gt;
&lt;P&gt;Y is a binary variable (0, 1) and X can vary (it can be binary or -1,0,1 or -2,-1,0,1,2 etc, but always with integers number) and I need to generate every possible dataset with N observations and combinations between X and Y.&lt;/P&gt;
&lt;P&gt;EXAMPLE:&lt;/P&gt;
&lt;P&gt;If I want to have N=4 Obs and X and Y can be only 0 or 1, I could have only the following dataset:&lt;/P&gt;
&lt;P&gt;0 0&amp;nbsp; &amp;nbsp; &amp;nbsp; 0 0&amp;nbsp; &amp;nbsp; &amp;nbsp;0 0&amp;nbsp; &amp;nbsp; &amp;nbsp;0 0&amp;nbsp; &amp;nbsp; 1 0&amp;nbsp; &amp;nbsp; &amp;nbsp;1 0&amp;nbsp; &amp;nbsp; &amp;nbsp;1 0&amp;nbsp; &amp;nbsp; &amp;nbsp;1 0&amp;nbsp; &amp;nbsp; &amp;nbsp;0 1&amp;nbsp; &amp;nbsp; &amp;nbsp;0 1&amp;nbsp; &amp;nbsp; 0 1&amp;nbsp; &amp;nbsp; 0 1&amp;nbsp; &amp;nbsp; &amp;nbsp;1 1&amp;nbsp; &amp;nbsp; &amp;nbsp;1 1&amp;nbsp; &amp;nbsp; &amp;nbsp;1 1&amp;nbsp; &amp;nbsp; &amp;nbsp;1 1&lt;/P&gt;
&lt;P&gt;0 0&amp;nbsp; &amp;nbsp; &amp;nbsp; 0 1&amp;nbsp; &amp;nbsp; &amp;nbsp;1 0&amp;nbsp; &amp;nbsp; &amp;nbsp;1 1&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;SPAN&gt;0 0&amp;nbsp; &amp;nbsp; &amp;nbsp;0 1&amp;nbsp; &amp;nbsp; &amp;nbsp;1 0&amp;nbsp; &amp;nbsp; &amp;nbsp;1 1&amp;nbsp; &amp;nbsp; &amp;nbsp;0 0&amp;nbsp; &amp;nbsp; &amp;nbsp;0 1&amp;nbsp; &amp;nbsp; 1 0&amp;nbsp; &amp;nbsp; 1 1&amp;nbsp; &amp;nbsp; &amp;nbsp;0 0&amp;nbsp; &amp;nbsp; &amp;nbsp;0 1&amp;nbsp; &amp;nbsp; &amp;nbsp;1 0&amp;nbsp; &amp;nbsp; &amp;nbsp;1 1&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I had tried for a week but I can't find a function that could help me.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;P.S. it's not strictly necessary that the result are in different dataset.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks a lot and sorry for the bad English, I hope that my message is clear.&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Nov 2018 15:53:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Simulate-all-the-Dataset-with-N-sample-and-combination-of-X-and/m-p/513928#M138635</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-11-16T15:53:51Z</dc:date>
    </item>
    <item>
      <title>Re: Generate every possible dataset of N sample for every possible values of X and Y</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Simulate-all-the-Dataset-with-N-sample-and-combination-of-X-and/m-p/513933#M138636</link>
      <description>&lt;P&gt;If I understand what you want I think this may be the easiest way to go.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data example;
   do n=1 to 4;
      do y=0,1;
         do x= 0,1;
            output;
         end;
      end;
   end;
run;&lt;/PRE&gt;
&lt;P&gt;The key to this is that you can specify individual values on a do loop.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want your x to be -1, -0.5, 0, 0.5 and 1 then place then in a comma delimited list on the DO X= loop control.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think that you should keep the N value around as in my example data set.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Nov 2018 15:57:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Simulate-all-the-Dataset-with-N-sample-and-combination-of-X-and/m-p/513933#M138636</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-11-16T15:57:34Z</dc:date>
    </item>
    <item>
      <title>Re: Generate every possible dataset of N sample for every possible values of X and Y</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Simulate-all-the-Dataset-with-N-sample-and-combination-of-X-and/m-p/514108#M138637</link>
      <description>&lt;P&gt;If I understood, you need the help of allcombi routine. For example, for x = (-1, 0, 1), y = (0, 1), N = 4 :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data values;
do y = 0, 1;
    do x = -1, 0, 1;
        i + 1;
        output;
        end;
    end;
run;

%let N=4;

data comb;
if 0 then set values nobs=M;
array a{&amp;amp;N};
do k = 1 to comb(M, &amp;amp;N);
    call allcombi(M, &amp;amp;N, of a{*});
    do j = 1 to dim(a);
        i = a{j};
        output;
        end;
    end;
stop;
keep k i;
run;

proc sql;
create table combVal as
select
    k, x, y
from comb inner join values on comb.i=values.i
order by k, x, y;
quit;

proc print data=combVal noobs; run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 17 Nov 2018 06:19:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Simulate-all-the-Dataset-with-N-sample-and-combination-of-X-and/m-p/514108#M138637</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2018-11-17T06:19:17Z</dc:date>
    </item>
    <item>
      <title>Re: Simulate all the Dataset with N sample and combination of X and Y</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Simulate-all-the-Dataset-with-N-sample-and-combination-of-X-and/m-p/514174#M138633</link>
      <description>Did you check your post from yesterday? You have not replied or marked it as solved and this question seems identical. &lt;BR /&gt;&lt;A href="https://communities.sas.com/t5/New-SAS-User/Generate-every-possible-dataset-of-N-sample-for-every-possible/m-p/513919" target="_blank"&gt;https://communities.sas.com/t5/New-SAS-User/Generate-every-possible-dataset-of-N-sample-for-every-possible/m-p/513919&lt;/A&gt;</description>
      <pubDate>Sun, 18 Nov 2018 00:41:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Simulate-all-the-Dataset-with-N-sample-and-combination-of-X-and/m-p/514174#M138633</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-11-18T00:41:41Z</dc:date>
    </item>
    <item>
      <title>Re: Generate every possible dataset of N sample for every possible values of X and Y</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Simulate-all-the-Dataset-with-N-sample-and-combination-of-X-and/m-p/514189#M138640</link>
      <description>&lt;P&gt;So, given your example N=5 X=(0, 1) Y=(0, 1), how many datasets do you expect to get?&lt;/P&gt;</description>
      <pubDate>Sun, 18 Nov 2018 05:40:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Simulate-all-the-Dataset-with-N-sample-and-combination-of-X-and/m-p/514189#M138640</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2018-11-18T05:40:13Z</dc:date>
    </item>
    <item>
      <title>Re: Generate every possible dataset of N sample for every possible values of X and Y</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Simulate-all-the-Dataset-with-N-sample-and-combination-of-X-and/m-p/514216#M138653</link>
      <description>&lt;P&gt;If i have&amp;nbsp;&lt;SPAN&gt;N=5 X=(0, 1) Y=(0, 1) I expect to have 4 unique datasets with every combination of X and Y:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;X Y&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; X Y&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; X Y&amp;nbsp; &amp;nbsp; &amp;nbsp; X Y&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;0 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;0 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;0 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;since order doesn't count.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I know the number of different unique dataset by this formula: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;N=given numerosity of the sample&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;K=number of combination of X and Y (0 0, 0 1, 1 0, 1 1 in this case)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(n-1)!/[(k-1)!(n-k)!]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Nov 2018 10:18:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Simulate-all-the-Dataset-with-N-sample-and-combination-of-X-and/m-p/514216#M138653</guid>
      <dc:creator>SquashingOtters</dc:creator>
      <dc:date>2018-11-18T10:18:37Z</dc:date>
    </item>
    <item>
      <title>Re: Generate every possible dataset of N sample for every possible values of X and Y</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Simulate-all-the-Dataset-with-N-sample-and-combination-of-X-and/m-p/514222#M138655</link>
      <description>&lt;P&gt;Hi, I wrong explain my problems in first place, sorry...&lt;/P&gt;&lt;P&gt;the N value is the number of the sample size that I want, for example, if I want to simulate a case-control study, N is the number of the patient, and the combinations of X and Y are all the possible conditions of the patient (X=disease(1 yes, 0 no), Y=exposure(1 yes, 0 no)).&lt;/P&gt;&lt;P&gt;What i need is every dataset of N numerosity that contain all the possible case of the data (the order doesn't count),&amp;nbsp;and&amp;nbsp;all the possible combination of X and Y (1 1, 1 0, 0 1, 0 0)&lt;/P&gt;</description>
      <pubDate>Sun, 18 Nov 2018 10:41:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Simulate-all-the-Dataset-with-N-sample-and-combination-of-X-and/m-p/514222#M138655</guid>
      <dc:creator>SquashingOtters</dc:creator>
      <dc:date>2018-11-18T10:41:11Z</dc:date>
    </item>
    <item>
      <title>Re: Generate every possible dataset of N sample for every possible values of X and Y</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Simulate-all-the-Dataset-with-N-sample-and-combination-of-X-and/m-p/514242#M138661</link>
      <description>&lt;P&gt;Hi, I explain wrong my problems in first place, sorry... the N value is the number of the sample size that I want, for example, if I want to simulate a case-control study, N is the number of the patient, and the combinations of X and Y are all the possible conditions of the patient (X=disease(1 yes, 0 no), Y=exposure(1 yes, 0 no)). What i need is every dataset of N numerosity that contain all the possible case of the data (the order doesn't count), and all the possible combination of X and Y (1 1, 1 0, 0 1, 0 0)&lt;/P&gt;</description>
      <pubDate>Sun, 18 Nov 2018 14:51:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Simulate-all-the-Dataset-with-N-sample-and-combination-of-X-and/m-p/514242#M138661</guid>
      <dc:creator>SquashingOtters</dc:creator>
      <dc:date>2018-11-18T14:51:27Z</dc:date>
    </item>
    <item>
      <title>Re: Generate every possible dataset of N sample for every possible values of X and Y</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Simulate-all-the-Dataset-with-N-sample-and-combination-of-X-and/m-p/514269#M138670</link>
      <description>Do none of the answers above answer that? I feel like they do at the moment. If not please explain in detail how they do  not.</description>
      <pubDate>Sun, 18 Nov 2018 19:03:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Simulate-all-the-Dataset-with-N-sample-and-combination-of-X-and/m-p/514269#M138670</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-11-18T19:03:00Z</dc:date>
    </item>
    <item>
      <title>Re: Generate every possible dataset of N sample for every possible values of X and Y</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Simulate-all-the-Dataset-with-N-sample-and-combination-of-X-and/m-p/514297#M138678</link>
      <description>&lt;P&gt;Unfortunately no...&amp;nbsp;&lt;/P&gt;&lt;P&gt;Allcombi give me an error when I use a N&amp;gt;k where k are the number of possible combinations between X and Y, that's cause it computes the number of&amp;nbsp;&lt;SPAN&gt;combinations of&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="emph"&gt;K&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;elements taken&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="emph"&gt;N&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;at a time.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;While the Do loop of ballardw and your code give all the possible combinations between X and Y, but what I need is every possible dataset that contains not only all the combination of X and Y, but also simulate other data (which are other combination of X and Y) for a given N sample size.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Basically every dataset/tables is unique and should contain at least once every combinations of X and Y plus other data that can assume the combination of X and Y.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;For example if i have&amp;nbsp;&lt;SPAN&gt;N=5 X=(0, 1) Y=(0, 1)&amp;nbsp;the dataset that I should have are:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;X Y&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; X Y&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; X Y&amp;nbsp; &amp;nbsp; &amp;nbsp; X Y&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;0 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;0 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;0 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The order doesn't count so all that matters are the frequencies of the data.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Other dataset like:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;X Y&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;0 0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;0 0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;0 0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1 0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;0 1&amp;nbsp; &amp;nbsp; have N sample size, but it doesn't contain all the possible combination of X and Y&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I hope that I had explained better...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you for the interesting&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Nov 2018 21:42:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Simulate-all-the-Dataset-with-N-sample-and-combination-of-X-and/m-p/514297#M138678</guid>
      <dc:creator>SquashingOtters</dc:creator>
      <dc:date>2018-11-18T21:42:21Z</dc:date>
    </item>
  </channel>
</rss>

