<?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: Exponential Distribution mean too high in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Exponential-Distribution-mean-too-high/m-p/419960#M280574</link>
    <description>&lt;P&gt;The function is exactly as I posted above, what part of that are you having difficulty with?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Post your new code if you're having issues and explain what new issues you now have.&lt;/P&gt;</description>
    <pubDate>Sun, 10 Dec 2017 19:15:53 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2017-12-10T19:15:53Z</dc:date>
    <item>
      <title>Exponential Distribution mean too high</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exponential-Distribution-mean-too-high/m-p/419950#M280569</link>
      <description>&lt;P&gt;When it comes to Simulation using the ranexp function, what would I do if the exponential distribution is greater than 1? For example when I use the following code the output produced is a blank table:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data list1;&lt;/P&gt;&lt;P&gt;do i=1 to 50;&lt;/P&gt;&lt;P&gt;between=.4*ranexp(1.2);&lt;/P&gt;&lt;P&gt;serve=.4*ranexp(1.2);&lt;/P&gt;&lt;P&gt;output list1;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;proc print data=list1;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How would I get this to work and have an output produced? Any help would be much appreaciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 10 Dec 2017 18:46:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exponential-Distribution-mean-too-high/m-p/419950#M280569</guid>
      <dc:creator>SASUSER97</dc:creator>
      <dc:date>2017-12-10T18:46:43Z</dc:date>
    </item>
    <item>
      <title>SAS Simulation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exponential-Distribution-mean-too-high/m-p/419940#M280570</link>
      <description>When it comes to Simulation using the ranexp function, what would I do if the exponential distribution is greater than 1? For example an exponential distribution of 1.2 doesn't produce an Output because 1.2 &amp;gt; 1.</description>
      <pubDate>Sun, 10 Dec 2017 17:27:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exponential-Distribution-mean-too-high/m-p/419940#M280570</guid>
      <dc:creator>SASUSER97</dc:creator>
      <dc:date>2017-12-10T17:27:06Z</dc:date>
    </item>
    <item>
      <title>Re: Exponential Distribution mean too high</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exponential-Distribution-mean-too-high/m-p/419952#M280571</link>
      <description>&lt;P&gt;The RANEXP() function is deprecated. And the parameter for the function is the SEED,&amp;nbsp;which controls the random number stream not the function. &lt;A href="http://documentation.sas.com/?docsetId=lefunctionsref&amp;amp;docsetTarget=p1c00yq5o0l7amn1d1bs5m6dka4z.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_self"&gt;Make sure to read the latest version of the docs&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN class="xis-userSuppliedValue"&gt;This function is deprecated.&lt;/SPAN&gt;&lt;SPAN&gt; The function is suitable for small samples and for applications that do not require a sophisticated random-number generator. It is not suitable for parallel and distributed processing. For more demanding applications, use the STREAMINIT subroutine and the RAND('Exponential') function.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The RAND() function however, does support the Exponential distribution with a scale parameter.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A href="http://documentation.sas.com/?docsetId=lefunctionsref&amp;amp;docsetTarget=p0fpeei0opypg8n1b06qe4r040lv.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en#n1t0hn9cy53yozn1rxqbajpgoux9" target="_blank"&gt;http://documentation.sas.com/?docsetId=lefunctionsref&amp;amp;docsetTarget=p0fpeei0opypg8n1b06qe4r040lv.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en#n1t0hn9cy53yozn1rxqbajpgoux9&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="xis-userSuppliedSyntaxValue"&gt;&lt;A class="ng-scope" tabindex="0" title="Description of syntax: x" href="http://documentation.sas.com/?docsetId=lefunctionsref&amp;amp;docsetTarget=p0fpeei0opypg8n1b06qe4r040lv.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en#n064ql6gfh19nvn0z3etr8u62a0m" rel="nofollow" data-docset-id="lefunctionsref" data-docset-version="9.4" data-original-href="p0fpeei0opypg8n1b06qe4r040lv.htm#n064ql6gfh19nvn0z3etr8u62a0m"&gt;x&lt;/A&gt;&lt;/SPAN&gt;=&lt;SPAN class="xis-keyword"&gt;RAND&lt;/SPAN&gt;('EXPONENTIAL', &lt;SPAN class="xis-argOptional"&gt;&amp;lt;&lt;SPAN class="xis-userSuppliedSyntaxValue"&gt;&lt;A class="ng-scope" tabindex="0" title="Description of syntax: σ" href="http://documentation.sas.com/?docsetId=lefunctionsref&amp;amp;docsetTarget=p0fpeei0opypg8n1b06qe4r040lv.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en#n1ew4pa3pokydtn1eegwb1agixl1" rel="nofollow" data-docset-id="lefunctionsref" data-docset-version="9.4" data-original-href="p0fpeei0opypg8n1b06qe4r040lv.htm#n1ew4pa3pokydtn1eegwb1agixl1"&gt;σ&lt;/A&gt;&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Sun, 10 Dec 2017 18:53:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exponential-Distribution-mean-too-high/m-p/419952#M280571</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-12-10T18:53:25Z</dc:date>
    </item>
    <item>
      <title>Re: Exponential Distribution mean too high</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exponential-Distribution-mean-too-high/m-p/419953#M280572</link>
      <description>&lt;P&gt;Oh, and just to close the loop the RANEXP() function takes integer parameters which is why 1.2 doesn't work. Try 2, 3 or 12.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 10 Dec 2017 18:56:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exponential-Distribution-mean-too-high/m-p/419953#M280572</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-12-10T18:56:50Z</dc:date>
    </item>
    <item>
      <title>Re: Exponential Distribution mean too high</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exponential-Distribution-mean-too-high/m-p/419958#M280573</link>
      <description>&lt;P&gt;Thanks for this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just tried this out and can see that all integers seem to work. However, I'm still struggling to know what function to use to be able to generate results with a 1.2 exponential distribution mean. I've seen the docs you've recommended but I'm struggling to make sense of them.&lt;/P&gt;</description>
      <pubDate>Sun, 10 Dec 2017 19:13:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exponential-Distribution-mean-too-high/m-p/419958#M280573</guid>
      <dc:creator>SASUSER97</dc:creator>
      <dc:date>2017-12-10T19:13:19Z</dc:date>
    </item>
    <item>
      <title>Re: Exponential Distribution mean too high</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exponential-Distribution-mean-too-high/m-p/419960#M280574</link>
      <description>&lt;P&gt;The function is exactly as I posted above, what part of that are you having difficulty with?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Post your new code if you're having issues and explain what new issues you now have.&lt;/P&gt;</description>
      <pubDate>Sun, 10 Dec 2017 19:15:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exponential-Distribution-mean-too-high/m-p/419960#M280574</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-12-10T19:15:53Z</dc:date>
    </item>
    <item>
      <title>Re: Exponential Distribution mean too high</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exponential-Distribution-mean-too-high/m-p/419963#M280575</link>
      <description>&lt;P&gt;This is the new code I tried to use to generate my results, but the between and serve columns still produce blank results.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=" block-mark"&gt;&lt;SPAN class="sec-keyword"&gt;data&lt;/SPAN&gt;&lt;SPAN class="text"&gt;&amp;nbsp;list1&lt;/SPAN&gt;&lt;SPAN class="sep"&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class="keyword"&gt;do&lt;/SPAN&gt;&lt;SPAN class="text"&gt; i&lt;/SPAN&gt;&lt;SPAN class="sep"&gt;=&lt;/SPAN&gt;&lt;SPAN class="numeric"&gt;1&lt;/SPAN&gt; &lt;SPAN class="keyword"&gt;to&lt;/SPAN&gt; &lt;SPAN class="numeric"&gt;20&lt;/SPAN&gt;&lt;SPAN class="sep"&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class="text"&gt;between&lt;/SPAN&gt;&lt;SPAN class="sep"&gt;=&lt;/SPAN&gt;&lt;SPAN class="numeric"&gt;.4&lt;/SPAN&gt;&lt;SPAN class="sep"&gt;*&lt;/SPAN&gt;&lt;SPAN class="text"&gt;Rand&lt;/SPAN&gt;&lt;SPAN class="sep"&gt;(&lt;/SPAN&gt;&lt;SPAN class="numeric"&gt;1.2&lt;/SPAN&gt;&lt;SPAN class="sep"&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class="text"&gt;serve&lt;/SPAN&gt;&lt;SPAN class="sep"&gt;=&lt;/SPAN&gt;&lt;SPAN class="numeric"&gt;.4&lt;/SPAN&gt;&lt;SPAN class="sep"&gt;*&lt;/SPAN&gt;&lt;SPAN class="text"&gt;Rand&lt;/SPAN&gt;&lt;SPAN class="sep"&gt;(&lt;/SPAN&gt;&lt;SPAN class="numeric"&gt;1.2&lt;/SPAN&gt;&lt;SPAN class="sep"&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class="keyword"&gt;output&lt;/SPAN&gt;&lt;SPAN class="text"&gt; queue1&lt;/SPAN&gt;&lt;SPAN class="sep"&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class="keyword"&gt;end&lt;/SPAN&gt;&lt;SPAN class="sep"&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=" block-mark"&gt;&lt;SPAN class="sec-keyword"&gt;proc&lt;/SPAN&gt; &lt;SPAN class="sec-keyword"&gt;print&lt;/SPAN&gt; &lt;SPAN class="keyword"&gt;data&lt;/SPAN&gt;&lt;SPAN class="sep"&gt;=list&lt;/SPAN&gt;&lt;SPAN class="text"&gt;1&lt;/SPAN&gt;&lt;SPAN class="sep"&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class="sec-keyword"&gt;run&lt;/SPAN&gt;&lt;SPAN class="sep"&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class="sep"&gt;I know it's probably a mistake I've made on my behalf but I can't seem to see where I've gone wrong. Once again thanks for your help.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Sun, 10 Dec 2017 19:25:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exponential-Distribution-mean-too-high/m-p/419963#M280575</guid>
      <dc:creator>SASUSER97</dc:creator>
      <dc:date>2017-12-10T19:25:16Z</dc:date>
    </item>
    <item>
      <title>Re: Exponential Distribution mean too high</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exponential-Distribution-mean-too-high/m-p/420008#M280576</link>
      <description>&lt;P&gt;&lt;SPAN class="xis-userSuppliedSyntaxValue"&gt;&lt;A class="ng-scope" tabindex="0" title="Description of syntax: x" href="http://documentation.sas.com/?docsetId=lefunctionsref&amp;amp;docsetTarget=p0fpeei0opypg8n1b06qe4r040lv.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en#n064ql6gfh19nvn0z3etr8u62a0m" rel="nofollow noopener noreferrer" data-docset-id="lefunctionsref" data-docset-version="9.4" data-original-href="p0fpeei0opypg8n1b06qe4r040lv.htm#n064ql6gfh19nvn0z3etr8u62a0m"&gt;x&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN class="xis-keyword"&gt;RAND&lt;/SPAN&gt;&lt;SPAN&gt;('EXPONENTIAL', &lt;/SPAN&gt;&lt;SPAN class="xis-argOptional"&gt;&amp;lt;&lt;SPAN class="xis-userSuppliedSyntaxValue"&gt;&lt;A class="ng-scope" tabindex="0" title="Description of syntax: σ" href="http://documentation.sas.com/?docsetId=lefunctionsref&amp;amp;docsetTarget=p0fpeei0opypg8n1b06qe4r040lv.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en#n1ew4pa3pokydtn1eegwb1agixl1" rel="nofollow noopener noreferrer" data-docset-id="lefunctionsref" data-docset-version="9.4" data-original-href="p0fpeei0opypg8n1b06qe4r040lv.htm#n1ew4pa3pokydtn1eegwb1agixl1"&gt;σ&lt;/A&gt;&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You forgot the exponential&amp;nbsp;part...in the formula.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Remember to check the documentation, and that each documentation has an example of how the&amp;nbsp;function is used.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data list1;
do i=1 to 20;
    between = 0.4 * Rand('exponential', 1.2);
    serve = 0.4*Rand('exponential', 1.2);

output queue1; &amp;lt;- this is wrong and changed from your previous code. It needs to match what's on the data line;
end;

RUN; &amp;lt;- You're missing this, technically not needed, but what I'd consider good practice, especially as you learn;

proc print data=list1; &amp;lt;-You (tried to) output your results to Queu1, not list1?;
run;&lt;/CODE&gt;&lt;/PRE&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>Mon, 11 Dec 2017 04:15:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exponential-Distribution-mean-too-high/m-p/420008#M280576</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-12-11T04:15:34Z</dc:date>
    </item>
    <item>
      <title>Re: Exponential Distribution mean too high</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exponential-Distribution-mean-too-high/m-p/420021#M280577</link>
      <description>Thanks for all the help, it was extremely useful. I managed to figure out where I went wrong in the end and I've got it done now</description>
      <pubDate>Mon, 11 Dec 2017 07:13:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exponential-Distribution-mean-too-high/m-p/420021#M280577</guid>
      <dc:creator>SASUSER97</dc:creator>
      <dc:date>2017-12-11T07:13:57Z</dc:date>
    </item>
  </channel>
</rss>

