<?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: Assign ranks in random by group in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Assign-ranks-in-random-by-group/m-p/652788#M196037</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/138205"&gt;@novinosrin&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I am just wondering what are chances of duplication caused by rand('uniform')? I did the read the docs, but something is not registering in my head.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Hi &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/138205"&gt;@novinosrin&lt;/a&gt;: Good question. According to section&amp;nbsp;&lt;A href="https://documentation.sas.com/?docsetId=lefunctionsref&amp;amp;docsetTarget=p0fpeei0opypg8n1b06qe4r040lv.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en#p04b3euoqp9oewn1g8ckgx2ljawl" target="_blank" rel="noopener"&gt;Duplicate Values&lt;/A&gt; in the RAND function documentation (which I think is even more relevant to this than the information about cycle lengths) the default 32-bit Mersenne Twister algorithm used here would result in at least one duplicate rank for the OP's sample data with an approximate probability of&amp;nbsp;&lt;FONT face="courier new,courier"&gt;1-(1-25/2**33)**2≈5.82E-9&lt;/FONT&gt; (assuming independence between BY groups), which is indeed "very, very small."&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, if the real HAVE dataset was much larger, say, 10,000 IDs with 50 observations each, the corresponding probability would be&amp;nbsp;&lt;FONT face="courier new,courier"&gt;1-(1-2500/2**33)**10000≈0.002906&lt;/FONT&gt;&amp;nbsp;and merely&amp;nbsp;&lt;FONT face="courier new,courier"&gt;ceil(-0.0001/log2(1-2500/2**33))=&lt;STRONG&gt;239&lt;/STRONG&gt;&lt;/FONT&gt; independent experiments of this size would suffice to observe a duplicate rank with a probability &amp;gt;=50%.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let's try it:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data temp;
call streaminit(27182818);
do r=1 to 239;
  do id=1 to 10000;
    do _n_=1 to 50;
      rnd = rand("uniform");
      output;
    end;
  end;
end;
run;

proc rank data=temp out=want;
by r id;
var rnd;
run;

proc freq data=want;
tables rnd;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Partial PROC FREQ output shows that it really happened (and, no, I did not tinker with the random seed):&lt;/P&gt;
&lt;PRE&gt;                                Cumulative    Cumulative
rnd    Frequency     Percent     Frequency      Percent
--------------------------------------------------------
  1     2390000        2.00       2390000         2.00
  2     2390000        2.00       4780000         4.00
  3     2389999        2.00       7169999         6.00
&lt;FONT color="#FF0000"&gt;3.5           2&lt;/FONT&gt;        0.00       7170001         6.00
  4     2389999        2.00       9560000         8.00
  5     2390000        2.00      11950000        10.00
  6     2390000        2.00      14340000        12.00&lt;/PRE&gt;
&lt;P&gt;Find the culprit:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc print data=want;
where rnd=3.5;
run;

proc print data=temp;
where r=147 &amp;amp; id=8807;
format rnd best16.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Voilà:&lt;/P&gt;
&lt;PRE&gt;Obs     r      id                  rnd

 73440301    147    8807    0.91091977874748
 73440302    147    8807    0.04118569614366
 73440303    147    8807    0.14874891191721
 73440304    147    8807    0.93303100718185
 73440305    147    8807    &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;0.04243680997752&lt;/FONT&gt;&lt;/STRONG&gt;
 73440306    147    8807    0.23993166047148
 73440307    147    8807    0.46066979528405
 73440308    147    8807    0.32410094887018
 73440309    147    8807    0.09882239229046
 73440310    147    8807    0.44069946813397
 73440311    147    8807    0.56899999175221
 73440312    147    8807    &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;0.04243680997752&lt;/FONT&gt;&lt;/STRONG&gt;
 73440313    147    8807    0.79902740451507
 ...&lt;/PRE&gt;
&lt;P&gt;The HEX16. representations of the two highlighted numbers are&amp;nbsp;&lt;FONT face="courier new,courier"&gt;3FA5BA470DFFFFFF&lt;/FONT&gt; and in fact the representations of &lt;EM&gt;all&lt;/EM&gt; 119.5 million RND values end in "&lt;FONT face="courier new,courier"&gt;FFFFF&lt;/FONT&gt;" showing their 32-bit nature. So, one of the available &lt;A href="https://documentation.sas.com/?docsetId=lefunctionsref&amp;amp;docsetTarget=p026ygl6toz3tgn14lt4iu6cl5bb.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en#n09a15dlkeddxzn12risyziasts2" target="_blank" rel="noopener"&gt;&lt;EM&gt;64&lt;/EM&gt;-bit RNGs&lt;/A&gt; would be a better choice if the risk of duplicates is an issue, e.g.,&lt;/P&gt;
&lt;PRE&gt;&amp;nbsp;call streaminit(&lt;STRONG&gt;'PCG'&lt;/STRONG&gt;, 27182818);&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 03 Jun 2020 08:47:55 GMT</pubDate>
    <dc:creator>FreelanceReinh</dc:creator>
    <dc:date>2020-06-03T08:47:55Z</dc:date>
    <item>
      <title>Assign ranks in random by group</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Assign-ranks-in-random-by-group/m-p/652671#M195978</link>
      <description>&lt;P&gt;Hi SAS Users,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like your help with the following.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Raw data:&lt;/P&gt;&lt;P&gt;data have;&lt;BR /&gt;input ID ;&lt;BR /&gt;cards;&lt;BR /&gt;11&lt;BR /&gt;11&lt;BR /&gt;11&lt;BR /&gt;11&lt;BR /&gt;11&lt;BR /&gt;12&lt;BR /&gt;12&lt;BR /&gt;12&lt;BR /&gt;12&lt;BR /&gt;12&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to assign ranks 1 - 5 to the above rows. Each ID should have all the ranks but randomly assigned.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is appreciated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your time.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2020 21:09:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Assign-ranks-in-random-by-group/m-p/652671#M195978</guid>
      <dc:creator>shasank</dc:creator>
      <dc:date>2020-06-02T21:09:11Z</dc:date>
    </item>
    <item>
      <title>Re: Assign ranks in random by group</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Assign-ranks-in-random-by-group/m-p/652672#M195979</link>
      <description>Please show an example of what you expect? &lt;BR /&gt;Should 1 to 5 be assigned randomly to each row? or by ID so that each ID has the same random value?</description>
      <pubDate>Tue, 02 Jun 2020 21:09:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Assign-ranks-in-random-by-group/m-p/652672#M195979</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-06-02T21:09:12Z</dc:date>
    </item>
    <item>
      <title>Re: Assign ranks in random by group</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Assign-ranks-in-random-by-group/m-p/652673#M195980</link>
      <description>Each ID has 5 rows so 1 - 5 ranks must be randomly assigned and not repeated. in the same ID</description>
      <pubDate>Tue, 02 Jun 2020 21:11:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Assign-ranks-in-random-by-group/m-p/652673#M195980</guid>
      <dc:creator>shasank</dc:creator>
      <dc:date>2020-06-02T21:11:07Z</dc:date>
    </item>
    <item>
      <title>Re: Assign ranks in random by group</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Assign-ranks-in-random-by-group/m-p/652675#M195981</link>
      <description>Example:&lt;BR /&gt;11 2&lt;BR /&gt;11 1&lt;BR /&gt;11 4&lt;BR /&gt;11 3&lt;BR /&gt;11 5&lt;BR /&gt;12 5&lt;BR /&gt;12 1&lt;BR /&gt;12 4&lt;BR /&gt;12 3&lt;BR /&gt;12 2</description>
      <pubDate>Tue, 02 Jun 2020 21:12:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Assign-ranks-in-random-by-group/m-p/652675#M195981</guid>
      <dc:creator>shasank</dc:creator>
      <dc:date>2020-06-02T21:12:31Z</dc:date>
    </item>
    <item>
      <title>Re: Assign ranks in random by group</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Assign-ranks-in-random-by-group/m-p/652680#M195984</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data temp;
set have;
by ID;
if first.ID then order=1; else order+1;

x=rand('normal', 50, 4);
run;

proc sort data=temp;
by ID x;
run;

data want;
set have;
by id;
if first.id then rank=1; else rank+1;
run;

proc sort data=want;
by id order;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or essentially use PROC SURVEYSELECT with a 100% samprate.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2020 21:23:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Assign-ranks-in-random-by-group/m-p/652680#M195984</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-06-02T21:23:03Z</dc:date>
    </item>
    <item>
      <title>Re: Assign ranks in random by group</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Assign-ranks-in-random-by-group/m-p/652681#M195985</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data temp;
set have;
rnd = rand("uniform");
run;

proc rank data=temp out=want;
by id;
var rnd;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 02 Jun 2020 21:23:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Assign-ranks-in-random-by-group/m-p/652681#M195985</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2020-06-02T21:23:46Z</dc:date>
    </item>
    <item>
      <title>Re: Assign ranks in random by group</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Assign-ranks-in-random-by-group/m-p/652685#M195986</link>
      <description>&lt;P&gt;Thank you for your time. This worked too.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2020 21:30:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Assign-ranks-in-random-by-group/m-p/652685#M195986</guid>
      <dc:creator>shasank</dc:creator>
      <dc:date>2020-06-02T21:30:48Z</dc:date>
    </item>
    <item>
      <title>Re: Assign ranks in random by group</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Assign-ranks-in-random-by-group/m-p/652687#M195987</link>
      <description>&lt;P&gt;Nice one Sir&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/462"&gt;@PGStats&lt;/a&gt;&amp;nbsp; . I am just wondering what are chances of duplication caused by rand('uniform')? I did the read the docs, but something is not registering in my head.&lt;/P&gt;
&lt;P&gt;@Reeza, Please chime in too. I need this education plz&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2020 21:39:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Assign-ranks-in-random-by-group/m-p/652687#M195987</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2020-06-02T21:39:35Z</dc:date>
    </item>
    <item>
      <title>Re: Assign ranks in random by group</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Assign-ranks-in-random-by-group/m-p/652694#M195991</link>
      <description>&lt;P&gt;An exact duplicate that would cause RANK to consider them the same value?&lt;/P&gt;
&lt;P&gt;Very, very small IMO to the point of negligible.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This wouldn't be an issue with my solution, which is more code than&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/462"&gt;@PGStats&lt;/a&gt;&amp;nbsp;, his is definitley more elegant. I'm pretty sure that there should be a way with PROC SURVEYSELECT.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2020 22:03:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Assign-ranks-in-random-by-group/m-p/652694#M195991</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-06-02T22:03:34Z</dc:date>
    </item>
    <item>
      <title>Re: Assign ranks in random by group</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Assign-ranks-in-random-by-group/m-p/652695#M195992</link>
      <description>&lt;P&gt;The likelyhood of getting exactly the same random value within 5 consecutive calls is very very small and depends on the chosen RNG. Read&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?docsetId=lefunctionsref&amp;amp;docsetTarget=p026ygl6toz3tgn14lt4iu6cl5bb.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en#n0v3ys0gt2xil7n1chvxs6gpbb4p" target="_self"&gt;https://documentation.sas.com/?docsetId=lefunctionsref&amp;amp;docsetTarget=p026ygl6toz3tgn14lt4iu6cl5bb.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en#n0v3ys0gt2xil7n1chvxs6gpbb4p&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2020 22:08:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Assign-ranks-in-random-by-group/m-p/652695#M195992</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2020-06-02T22:08:06Z</dc:date>
    </item>
    <item>
      <title>Re: Assign ranks in random by group</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Assign-ranks-in-random-by-group/m-p/652699#M195994</link>
      <description>&lt;P&gt;Marvelous documentation link. Jeez! how I&amp;nbsp;wish I had read that earlier. Hmm, There's a time for everything.&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/462"&gt;@PGStats&lt;/a&gt;&amp;nbsp; Needless to mention my usual i.e "Prodigygeniusstats" as you have&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;cycled&lt;/STRONG&gt; &lt;/EM&gt;faster to grasp the cycle lengths. Kudos! and Thank you!!!&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2020 23:00:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Assign-ranks-in-random-by-group/m-p/652699#M195994</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2020-06-02T23:00:10Z</dc:date>
    </item>
    <item>
      <title>Re: Assign ranks in random by group</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Assign-ranks-in-random-by-group/m-p/652788#M196037</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/138205"&gt;@novinosrin&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I am just wondering what are chances of duplication caused by rand('uniform')? I did the read the docs, but something is not registering in my head.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Hi &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/138205"&gt;@novinosrin&lt;/a&gt;: Good question. According to section&amp;nbsp;&lt;A href="https://documentation.sas.com/?docsetId=lefunctionsref&amp;amp;docsetTarget=p0fpeei0opypg8n1b06qe4r040lv.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en#p04b3euoqp9oewn1g8ckgx2ljawl" target="_blank" rel="noopener"&gt;Duplicate Values&lt;/A&gt; in the RAND function documentation (which I think is even more relevant to this than the information about cycle lengths) the default 32-bit Mersenne Twister algorithm used here would result in at least one duplicate rank for the OP's sample data with an approximate probability of&amp;nbsp;&lt;FONT face="courier new,courier"&gt;1-(1-25/2**33)**2≈5.82E-9&lt;/FONT&gt; (assuming independence between BY groups), which is indeed "very, very small."&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, if the real HAVE dataset was much larger, say, 10,000 IDs with 50 observations each, the corresponding probability would be&amp;nbsp;&lt;FONT face="courier new,courier"&gt;1-(1-2500/2**33)**10000≈0.002906&lt;/FONT&gt;&amp;nbsp;and merely&amp;nbsp;&lt;FONT face="courier new,courier"&gt;ceil(-0.0001/log2(1-2500/2**33))=&lt;STRONG&gt;239&lt;/STRONG&gt;&lt;/FONT&gt; independent experiments of this size would suffice to observe a duplicate rank with a probability &amp;gt;=50%.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let's try it:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data temp;
call streaminit(27182818);
do r=1 to 239;
  do id=1 to 10000;
    do _n_=1 to 50;
      rnd = rand("uniform");
      output;
    end;
  end;
end;
run;

proc rank data=temp out=want;
by r id;
var rnd;
run;

proc freq data=want;
tables rnd;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Partial PROC FREQ output shows that it really happened (and, no, I did not tinker with the random seed):&lt;/P&gt;
&lt;PRE&gt;                                Cumulative    Cumulative
rnd    Frequency     Percent     Frequency      Percent
--------------------------------------------------------
  1     2390000        2.00       2390000         2.00
  2     2390000        2.00       4780000         4.00
  3     2389999        2.00       7169999         6.00
&lt;FONT color="#FF0000"&gt;3.5           2&lt;/FONT&gt;        0.00       7170001         6.00
  4     2389999        2.00       9560000         8.00
  5     2390000        2.00      11950000        10.00
  6     2390000        2.00      14340000        12.00&lt;/PRE&gt;
&lt;P&gt;Find the culprit:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc print data=want;
where rnd=3.5;
run;

proc print data=temp;
where r=147 &amp;amp; id=8807;
format rnd best16.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Voilà:&lt;/P&gt;
&lt;PRE&gt;Obs     r      id                  rnd

 73440301    147    8807    0.91091977874748
 73440302    147    8807    0.04118569614366
 73440303    147    8807    0.14874891191721
 73440304    147    8807    0.93303100718185
 73440305    147    8807    &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;0.04243680997752&lt;/FONT&gt;&lt;/STRONG&gt;
 73440306    147    8807    0.23993166047148
 73440307    147    8807    0.46066979528405
 73440308    147    8807    0.32410094887018
 73440309    147    8807    0.09882239229046
 73440310    147    8807    0.44069946813397
 73440311    147    8807    0.56899999175221
 73440312    147    8807    &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;0.04243680997752&lt;/FONT&gt;&lt;/STRONG&gt;
 73440313    147    8807    0.79902740451507
 ...&lt;/PRE&gt;
&lt;P&gt;The HEX16. representations of the two highlighted numbers are&amp;nbsp;&lt;FONT face="courier new,courier"&gt;3FA5BA470DFFFFFF&lt;/FONT&gt; and in fact the representations of &lt;EM&gt;all&lt;/EM&gt; 119.5 million RND values end in "&lt;FONT face="courier new,courier"&gt;FFFFF&lt;/FONT&gt;" showing their 32-bit nature. So, one of the available &lt;A href="https://documentation.sas.com/?docsetId=lefunctionsref&amp;amp;docsetTarget=p026ygl6toz3tgn14lt4iu6cl5bb.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en#n09a15dlkeddxzn12risyziasts2" target="_blank" rel="noopener"&gt;&lt;EM&gt;64&lt;/EM&gt;-bit RNGs&lt;/A&gt; would be a better choice if the risk of duplicates is an issue, e.g.,&lt;/P&gt;
&lt;PRE&gt;&amp;nbsp;call streaminit(&lt;STRONG&gt;'PCG'&lt;/STRONG&gt;, 27182818);&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jun 2020 08:47:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Assign-ranks-in-random-by-group/m-p/652788#M196037</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2020-06-03T08:47:55Z</dc:date>
    </item>
    <item>
      <title>Re: Assign ranks in random by group</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Assign-ranks-in-random-by-group/m-p/652827#M196062</link>
      <description>&lt;P&gt;Good morning/afternoon Sir&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/32733"&gt;@FreelanceReinh&lt;/a&gt;&amp;nbsp; Thank you and I really feel obliged for that beautiful description. I should pay for it : ) Understood well and clear. Cheers!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jun 2020 11:37:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Assign-ranks-in-random-by-group/m-p/652827#M196062</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2020-06-03T11:37:15Z</dc:date>
    </item>
  </channel>
</rss>

