<?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: Creating random combinations of observations in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Creating-random-combinations-of-observations/m-p/979044#M378723</link>
    <description>&lt;P&gt;So the issue is the variables while having the same outcome, may have different biological activities/pathways which lead to the outcome, but I don't know what activity/pathway. If I knew which acted similarly to one another I could create a subset of including only these observations. In lieu of that I'm trying to figure out which combination of observations with the outcome yield significant results to the predictor variables in order to determine these subgroups to later test empirically to determine the mode of action.&lt;/P&gt;</description>
    <pubDate>Tue, 18 Nov 2025 20:11:09 GMT</pubDate>
    <dc:creator>Beanpot</dc:creator>
    <dc:date>2025-11-18T20:11:09Z</dc:date>
    <item>
      <title>Creating random combinations of observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-random-combinations-of-observations/m-p/979042#M378721</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a dataset with approximately 7,000 observations. There is one binary outcome variable (true/false) where about 2,000 observations have the outcome (=true). I suspect there may be combinations of the outcome positive observations which may be significant for certain variables but I have no way to know which variables in order to categorize them. I'd like to have SAS test combinations of the observations with the outcome to see which observations might be similar to each other based on the variables. Is there a way to have SAS categorize the "true" observations into smaller groups to test? I suspect this would be some sort of factorial (ex. observations 1+2, 1+3, 1+4, ... , n! where it only uses observations with the outcome of interest).&lt;/P&gt;</description>
      <pubDate>Tue, 18 Nov 2025 19:49:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-random-combinations-of-observations/m-p/979042#M378721</guid>
      <dc:creator>Beanpot</dc:creator>
      <dc:date>2025-11-18T19:49:23Z</dc:date>
    </item>
    <item>
      <title>Re: Creating random combinations of observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-random-combinations-of-observations/m-p/979043#M378722</link>
      <description>&lt;P&gt;I am struggling to understand the problem, and I really don't know what you are trying to do. It seems like you want to throw away some observations and keep others to achieve ... well, I don't really know but it sounds like you want to find observations to do a test ... what test? Shouldn't you keep all observations and do the test on all of them?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maybe you could write a more complete and clear problem statement, stating clearly what you are planning to learn from this data and what tests you might consider in the analysis.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Nov 2025 20:00:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-random-combinations-of-observations/m-p/979043#M378722</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2025-11-18T20:00:43Z</dc:date>
    </item>
    <item>
      <title>Re: Creating random combinations of observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-random-combinations-of-observations/m-p/979044#M378723</link>
      <description>&lt;P&gt;So the issue is the variables while having the same outcome, may have different biological activities/pathways which lead to the outcome, but I don't know what activity/pathway. If I knew which acted similarly to one another I could create a subset of including only these observations. In lieu of that I'm trying to figure out which combination of observations with the outcome yield significant results to the predictor variables in order to determine these subgroups to later test empirically to determine the mode of action.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Nov 2025 20:11:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-random-combinations-of-observations/m-p/979044#M378723</guid>
      <dc:creator>Beanpot</dc:creator>
      <dc:date>2025-11-18T20:11:09Z</dc:date>
    </item>
    <item>
      <title>Re: Creating random combinations of observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-random-combinations-of-observations/m-p/979045#M378724</link>
      <description>&lt;P&gt;I'm also having a hard time understanding your question.&amp;nbsp; The first two sentences are clear, but I can't understand "&lt;SPAN&gt;I suspect there may be combinations of the outcome positive observations which may be significant for certain variables"&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;In addition to more description to the problem, example data might help.&amp;nbsp; Perhaps an example dataset with say four variables (your one outcome/dependent variable and three variables that are predictors / independent variables).&amp;nbsp; Example data should help you&amp;nbsp; explain what you mean by "significant for certain variables" and "&lt;SPAN&gt;which observations might be similar to each other based on the variables."&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Nov 2025 20:16:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-random-combinations-of-observations/m-p/979045#M378724</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2025-11-18T20:16:35Z</dc:date>
    </item>
    <item>
      <title>Re: Creating random combinations of observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-random-combinations-of-observations/m-p/979050#M378728</link>
      <description>&lt;P&gt;Are you asking how to do CLUSTER analysis?&lt;/P&gt;</description>
      <pubDate>Tue, 18 Nov 2025 21:34:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-random-combinations-of-observations/m-p/979050#M378728</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2025-11-18T21:34:56Z</dc:date>
    </item>
    <item>
      <title>Re: Creating random combinations of observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-random-combinations-of-observations/m-p/979075#M378729</link>
      <description>&lt;P&gt;Are you trying to do some sort of bootstrapping?&amp;nbsp; I'm also not really following, but you might start by assigning a random number to all of your TRUE observations, separating them out, sorting them by that random number, and then just take chunks of them each time through the loop.&amp;nbsp; I'm sure there's some sort of fancy SURVEYSELECT way also.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
%let chunksize=1000;

data 
    false (drop=r)
    true
    ;
set have (end=last);
call streaminit(14561436);
retain ntrue 0;
if x="true" then do;
  r=rand('uniform');
  ntrue+1;
  output true;
end;
else output false;
if last then call symputx("nchunks", ceil(ntrue/&amp;amp;chunksize));
run;

proc sort data=true; by r; run;

%let startrow=1;
%do cnum=1 %to &amp;amp;nchunks;
    data sample_true;
    set true;
    if &amp;amp;startrow&amp;lt;=_N_&amp;lt;(&amp;amp;startrow+&amp;amp;chunksize);
    run;

    %let startrow=%eval(&amp;amp;startrow+&amp;amp;chunksize);

    *** other stuff for your model... ;
%end;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;...not tested -- obv. needs to be inside a macro.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Nov 2025 23:35:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-random-combinations-of-observations/m-p/979075#M378729</guid>
      <dc:creator>quickbluefish</dc:creator>
      <dc:date>2025-11-18T23:35:14Z</dc:date>
    </item>
    <item>
      <title>Re: Creating random combinations of observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-random-combinations-of-observations/m-p/979082#M378731</link>
      <description>&lt;P&gt;Plot a mosaic graph is a very good start:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2013/11/04/create-mosaic-plots-in-sas-by-using-proc-freq.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2013/11/04/create-mosaic-plots-in-sas-by-using-proc-freq.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data=sashelp.heart order=freq;
table status*bp_status/plot=(mosaic) ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1763538381777.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/111378i87E3D8C32225E20B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1763538381777.png" alt="Ksharp_0-1763538381777.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Nov 2025 07:46:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-random-combinations-of-observations/m-p/979082#M378731</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2025-11-19T07:46:43Z</dc:date>
    </item>
    <item>
      <title>Re: Creating random combinations of observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-random-combinations-of-observations/m-p/979083#M378732</link>
      <description>Or you want bin a variable and get the best WOE and IV?&lt;BR /&gt;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/WOE-IV-and-Evolution-of-AI-Driven-Credit-Scoring-Models/ta-p/949855" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/WOE-IV-and-Evolution-of-AI-Driven-Credit-Scoring-Models/ta-p/949855&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/subconsciousmusings/2019/01/18/building-credit-scorecards-using-statistical-methods-and-business-logic/" target="_blank"&gt;https://blogs.sas.com/content/subconsciousmusings/2019/01/18/building-credit-scorecards-using-statistical-methods-and-business-logic/&lt;/A&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 19 Nov 2025 07:50:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-random-combinations-of-observations/m-p/979083#M378732</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2025-11-19T07:50:48Z</dc:date>
    </item>
    <item>
      <title>Re: Creating random combinations of observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-random-combinations-of-observations/m-p/979113#M378739</link>
      <description>&lt;P&gt;Digging into the problem as stated&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;I suspect there may be combinations of the outcome positive observations which may be significant for certain variables&amp;nbsp;...&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Observations are never significant in the standard usage of the statistical term "significant". However, variables can be significant in a specified model or specified statistical test (which could be a simple t-test), but you don't ever in any statistical practice (that I am aware of) select certain observations that make the variable(s) significant. Furthermore if all you select are observations where the outcome variable is positive then no variable will ever be significant as there is no variability to predict or test.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;May I make a suggestion? Describe the data and describe what you would like to learn from this data, in relatively simple terms so that those of us not involved in this field of study can understand what the goals are. Do not try to describe the algorithm/mathematical/computational/statistical steps you might follow.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Nov 2025 14:04:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-random-combinations-of-observations/m-p/979113#M378739</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2025-11-19T14:04:55Z</dc:date>
    </item>
    <item>
      <title>Re: Creating random combinations of observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-random-combinations-of-observations/m-p/979151#M378748</link>
      <description>&lt;P&gt;Essentially but the clusters are unknown/undefined.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Nov 2025 20:49:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-random-combinations-of-observations/m-p/979151#M378748</guid>
      <dc:creator>Beanpot</dc:creator>
      <dc:date>2025-11-19T20:49:18Z</dc:date>
    </item>
    <item>
      <title>Re: Creating random combinations of observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-random-combinations-of-observations/m-p/979161#M378752</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/438906"&gt;@Beanpot&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Essentially but the clusters are unknown/undefined.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Isn't that what a cluster analysis intends to find out?&amp;nbsp; Instead of trying to fit a model that reduces the distance between the predicted value and the observed value you try to figure out how to the classify the observations into a clusters to reduce the within cluster distance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS has a number of PROCS for this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But if you think you did not directly measure the important variables then perhaps you need to consider latent variable analysis instead.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In any case you need to ask for STATISTICAL help and not PROGRAMMING help. Once you know what analysis you need to perform you can ask for help on how to program it.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Nov 2025 04:14:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-random-combinations-of-observations/m-p/979161#M378752</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2025-11-20T04:14:07Z</dc:date>
    </item>
    <item>
      <title>Re: Creating random combinations of observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-random-combinations-of-observations/m-p/979179#M378759</link>
      <description>&lt;P&gt;I said: "Describe the data and describe what you would like to learn from this data, in relatively simple terms so that those of us not involved in this field of study can understand what the goals are. Do not try to describe the algorithm/mathematical/computational/statistical steps you might follow."&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;said: "In any case you need to ask for STATISTICAL help and not PROGRAMMING help. Once you know what analysis you need to perform you can ask for help on how to program it."&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please don't ignore these requests. This is, in my opinion, the only way to move forward.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Nov 2025 10:17:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-random-combinations-of-observations/m-p/979179#M378759</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2025-11-20T10:17:16Z</dc:date>
    </item>
  </channel>
</rss>

