<?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: What do I have to write inside Ranuni function? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/What-do-I-have-to-write-inside-Ranuni-function/m-p/365983#M87003</link>
    <description>&lt;P&gt;But you should be aware that the RAND function is the preferred way to generate random numbers. See &lt;A href="http://blogs.sas.com/content/iml/2013/07/10/stop-using-ranuni.html" target="_self"&gt;"Six reasons you should stop using the RANUNI function to generate random numbers"&lt;/A&gt;&amp;nbsp;Item #3 addresses your question.&lt;/P&gt;</description>
    <pubDate>Sun, 11 Jun 2017 10:56:30 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2017-06-11T10:56:30Z</dc:date>
    <item>
      <title>What do I have to write inside Ranuni function?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-do-I-have-to-write-inside-Ranuni-function/m-p/365976#M86999</link>
      <description>&lt;P&gt;Hi, I have been studying RANUNI function and I don't understand why sometimes people uses it with this expression: int(RANUNI(36830)*n) .&amp;nbsp;&lt;/P&gt;&lt;P&gt;What does the number inside of the function mean and why is it sometimes multiplied with "n"?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Sun, 11 Jun 2017 07:11:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-do-I-have-to-write-inside-Ranuni-function/m-p/365976#M86999</guid>
      <dc:creator>wV17</dc:creator>
      <dc:date>2017-06-11T07:11:19Z</dc:date>
    </item>
    <item>
      <title>Re: What do I have to write inside Ranuni function?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-do-I-have-to-write-inside-Ranuni-function/m-p/365979#M87001</link>
      <description>The link below could help you &lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a001281561.htm#a001281562" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a001281561.htm#a001281562&lt;/A&gt;</description>
      <pubDate>Sun, 11 Jun 2017 07:55:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-do-I-have-to-write-inside-Ranuni-function/m-p/365979#M87001</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2017-06-11T07:55:05Z</dc:date>
    </item>
    <item>
      <title>Re: What do I have to write inside Ranuni function?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-do-I-have-to-write-inside-Ranuni-function/m-p/365980#M87002</link>
      <description>&lt;P&gt;&lt;SPAN&gt;The number is called the random number seed. The seed value controls the sequence of random numbers. See this article&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A href="http://blogs.sas.com/content/iml/2011/08/31/random-number-streams-in-sas-how-do-they-work.html" target="_blank"&gt;http://blogs.sas.com/content/iml/2011/08/31/random-number-streams-in-sas-how-do-they-work.html&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 11 Jun 2017 07:55:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-do-I-have-to-write-inside-Ranuni-function/m-p/365980#M87002</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2017-06-11T07:55:23Z</dc:date>
    </item>
    <item>
      <title>Re: What do I have to write inside Ranuni function?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-do-I-have-to-write-inside-Ranuni-function/m-p/365983#M87003</link>
      <description>&lt;P&gt;But you should be aware that the RAND function is the preferred way to generate random numbers. See &lt;A href="http://blogs.sas.com/content/iml/2013/07/10/stop-using-ranuni.html" target="_self"&gt;"Six reasons you should stop using the RANUNI function to generate random numbers"&lt;/A&gt;&amp;nbsp;Item #3 addresses your question.&lt;/P&gt;</description>
      <pubDate>Sun, 11 Jun 2017 10:56:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-do-I-have-to-write-inside-Ranuni-function/m-p/365983#M87003</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2017-06-11T10:56:30Z</dc:date>
    </item>
    <item>
      <title>Re: What do I have to write inside Ranuni function?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-do-I-have-to-write-inside-Ranuni-function/m-p/365986#M87004</link>
      <description>&lt;P&gt;I see that you've already got half your answer .. so here is the other half. The *n is there to get a number between 1 and n.&lt;/P&gt;
&lt;P&gt;A more general&amp;nbsp;way to specify it is: x=&lt;SPAN&gt;min + floor((1 + max - min) * rand("uniform"))&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That way you can select a random number between min and max.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, if you use a seed of zero, SAS will use time of day to select which "table" to use.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 11 Jun 2017 13:01:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-do-I-have-to-write-inside-Ranuni-function/m-p/365986#M87004</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-06-11T13:01:12Z</dc:date>
    </item>
    <item>
      <title>Re: What do I have to write inside Ranuni function?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-do-I-have-to-write-inside-Ranuni-function/m-p/366025#M87008</link>
      <description>&lt;P&gt;It looks like you are trying to generate a random integer in the range [a,b].&lt;/P&gt;
&lt;P&gt;See the article &lt;A href="http://blogs.sas.com/content/iml/2015/10/05/random-integers-sas.html" target="_self"&gt;"How to generate random integers in SAS"&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jun 2017 00:51:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-do-I-have-to-write-inside-Ranuni-function/m-p/366025#M87008</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2017-06-12T00:51:25Z</dc:date>
    </item>
  </channel>
</rss>

