<?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: How to I generate random numbers using an increasing linear probability distribution? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/How-to-I-generate-random-numbers-using-an-increasing-linear/m-p/217399#M53489</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You may be looking for the Rand('TABLE',p1,p2,...) function where p1=probability of selecting 1, p2= probability of selecting 2 and so forth. Admittedly that's a somewhat long statement to code but without more description of what kind of shape you might want...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Apr 2015 17:56:29 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2015-04-07T17:56:29Z</dc:date>
    <item>
      <title>How to I generate random numbers using an increasing linear probability distribution?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-I-generate-random-numbers-using-an-increasing-linear/m-p/217398#M53488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;I'm trying to generate two sets of 5,000 random numbers.&amp;nbsp; I have successfully generated the first set, which is a uniform distribution of integers from 0 to 120. For the second set, I would like to sample from a function with a linear (monotonic) increase in probability over that interval.&amp;nbsp; So, the probability of randomly generating the number 0 is near 0 and the probability of randomly generating the number 120 is greater than all other numbers.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;I apologize if this seems basic but I'm having a hard time phrasing my issue and so have been unable to find any technical support on this issue.&amp;nbsp; If anyone has any references for me to review, I'd greatly appreciate it. My current thinking is that I somehow need to transform the rand("uniform") distribution to increase linearly, but I can't seem to figure out. I'd prefer if I could adjust the slope of the line.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;I've pasted some code below that shows how I've been trying to code this.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/SPAN&gt; Random_numbers;&lt;/P&gt;&lt;P class="p2"&gt;&lt;SPAN class="s2"&gt;call&lt;/SPAN&gt;&lt;SPAN class="s3"&gt; streaminit(&lt;/SPAN&gt;&lt;SPAN class="s4"&gt;&lt;STRONG&gt;123&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN class="s3"&gt;); &lt;/SPAN&gt;/* set random number seed */&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s2"&gt;do&lt;/SPAN&gt; i = &lt;SPAN class="s4"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN class="s2"&gt;to&lt;/SPAN&gt; &lt;SPAN class="s4"&gt;&lt;STRONG&gt;5000&lt;/STRONG&gt;&lt;/SPAN&gt;;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&amp;nbsp; uniform = int(rand(&lt;SPAN class="s5"&gt;"uniform"&lt;/SPAN&gt;) *120);&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&amp;nbsp;&amp;nbsp; increasing = int((rand(&lt;/SPAN&gt;&lt;SPAN class="s5" style="font-size: 13.3333330154419px;"&gt;"uniform"&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;) * &lt;STRONG&gt;SOME TRANSFORMATION HERE?&lt;/STRONG&gt; )*120&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p3"&gt;&lt;SPAN class="s3"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;output&lt;SPAN class="s3"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p3"&gt;end&lt;SPAN class="s3"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p3"&gt;&lt;SPAN class="s3"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&lt;STRONG&gt;PROC&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN class="s1"&gt;&lt;STRONG&gt;FREQ&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN class="s2"&gt;DATA&lt;/SPAN&gt; = Random_numbers;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp; &lt;SPAN class="s2"&gt;TABLES&lt;/SPAN&gt; uniform increasing ;&lt;/P&gt;&lt;P class="p4"&gt;&lt;STRONG&gt;RUN&lt;/STRONG&gt;&lt;SPAN class="s3"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p4"&gt;&lt;SPAN class="s3"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p4"&gt;&lt;SPAN class="s3"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p4"&gt;&lt;SPAN class="s3"&gt;Thanks for your help!&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2015 17:34:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-I-generate-random-numbers-using-an-increasing-linear/m-p/217398#M53488</guid>
      <dc:creator>mconover</dc:creator>
      <dc:date>2015-04-07T17:34:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to I generate random numbers using an increasing linear probability distribution?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-I-generate-random-numbers-using-an-increasing-linear/m-p/217399#M53489</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You may be looking for the Rand('TABLE',p1,p2,...) function where p1=probability of selecting 1, p2= probability of selecting 2 and so forth. Admittedly that's a somewhat long statement to code but without more description of what kind of shape you might want...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2015 17:56:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-I-generate-random-numbers-using-an-increasing-linear/m-p/217399#M53489</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-04-07T17:56:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to I generate random numbers using an increasing linear probability distribution?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-I-generate-random-numbers-using-an-increasing-linear/m-p/217400#M53490</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;I'd prefer something that was more easily manipulated and changed (i.e. in an equation rather than a tabled form) if anyone has any other ideas.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, this will work for now and I appreciate the quick help!&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2015 18:26:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-I-generate-random-numbers-using-an-increasing-linear/m-p/217400#M53490</guid>
      <dc:creator>mconover</dc:creator>
      <dc:date>2015-04-07T18:26:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to I generate random numbers using an increasing linear probability distribution?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-I-generate-random-numbers-using-an-increasing-linear/m-p/217401#M53491</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The transformation you need here is the inverse CDF.&lt;/P&gt;&lt;P&gt;&lt;A href="https://csgillespie.wordpress.com/tag/inverse-cdf/" title="https://csgillespie.wordpress.com/tag/inverse-cdf/"&gt;inverse-cdf | Why?&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2015 20:58:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-I-generate-random-numbers-using-an-increasing-linear/m-p/217401#M53491</guid>
      <dc:creator>gergely_batho</dc:creator>
      <dc:date>2015-04-07T20:58:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to I generate random numbers using an increasing linear probability distribution?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-I-generate-random-numbers-using-an-increasing-linear/m-p/217402#M53492</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the response.&amp;nbsp; I looked at the link you recommended.&amp;nbsp; I also reviewed Paper 236-25 (&lt;SPAN style="font-size: 13.3333330154419px; line-height: 1.5em;"&gt;Pseudo-Random Numbers: Out of Uniform &lt;/SPAN&gt;&lt;A href="http://www2.sas.com/proceedings/sugi25/25/po/25p236.pdf" style="font-size: 13.3333330154419px; line-height: 1.5em;" title="http://www2.sas.com/proceedings/sugi25/25/po/25p236.pdf"&gt;http://www2.sas.com/proceedings/sugi25/25/po/25p236.pdf)&lt;/A&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;, which discusses this method.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I'm just having trouble figuring out how to code it.&amp;nbsp; Do I use the CDF function?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if I generate a uniform distribution of numbers from 0 to 1 my probability density function is (pdf) is 1.&amp;nbsp; Does this mean my cumulative density function (CDF) is X?&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Apr 2015 02:58:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-I-generate-random-numbers-using-an-increasing-linear/m-p/217402#M53492</guid>
      <dc:creator>mconover</dc:creator>
      <dc:date>2015-04-08T02:58:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to I generate random numbers using an increasing linear probability distribution?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-I-generate-random-numbers-using-an-increasing-linear/m-p/217403#M53493</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No: your PDF is a function with the following properties: f(0)=0, f(120)=A, it is linear between 0 and 120 and 0 otherwise (outside of [0,120] interval).&lt;/P&gt;&lt;P&gt;You will get the CDF by intergarting this function.&amp;nbsp; A is a fixed parameter, you need to calculate is so, that the area under the curve of PDF (=the area of the triangle) is 1.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Apr 2015 06:36:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-I-generate-random-numbers-using-an-increasing-linear/m-p/217403#M53493</guid>
      <dc:creator>gergely_batho</dc:creator>
      <dc:date>2015-04-08T06:36:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to I generate random numbers using an increasing linear probability distribution?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-I-generate-random-numbers-using-an-increasing-linear/m-p/217404#M53494</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;A proposed solution.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;In the following, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; yRnd1 = random variable with a uniform probability in the, say, 1-100 range.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; yRnd2 = random variable with a probability distribution linearly increasing from 1 to, say, 100.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; yRnd2 = random variable with a probability distribution quadratically increasing from 1 to, say, 100.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;/******************************/&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;/**** sample distributions ****/&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;/******************************/&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;data t_a;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; do _N_ = 1 to 100000;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xRnd&amp;nbsp; = ranuni(3);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; yRd1 = ceil(100*xRnd);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; yRd2 = ceil(100*(xRnd**(1/2)));&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; yRd3 = ceil(100*(xRnd**(1/3)));&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; end;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;/********************************************************/&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;/*** wanting to set 3 graphs with the same maximum wt ***/&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;/********************************************************/&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;proc sql;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; create table t_1 as&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; select a.yRd1, round((a.cnts/b.zMax),0.001) as wt&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; from&amp;nbsp;&amp;nbsp; (select yRd1, sum(1) as cnts from t_a group by yRd1) a,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (select max(cnts) as zMax &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (select yRd1, sum(1) as cnts from t_a group by yRd1)) b&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; order by a.yRd1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; create table t_2 as&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; select a.yRd2, round((a.cnts/b.zMax),0.001) as wt&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; from&amp;nbsp;&amp;nbsp; (select yRd2, sum(1) as cnts from t_a group by yRd2) a,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (select max(cnts) as zMax &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (select yRd2, sum(1) as cnts from t_a group by yRd2)) b&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; order by a.yRd2;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; create table t_3 as&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; select a.yRd3, round((a.cnts/b.zMax),0.001) as wt&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; from&amp;nbsp;&amp;nbsp; (select yRd3, sum(1) as cnts from t_a group by yRd3) a,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (select max(cnts) as zMax &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (select yRd3, sum(1) as cnts from t_a group by yRd3)) b&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; order by a.yRd3;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;quit;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;/******************************/&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;/*** plotting for, say, t_2 ***/&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;/******************************/&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;proc sgplot data=t_2;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp; scatter x=yRd2 y=wt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Apr 2015 16:29:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-I-generate-random-numbers-using-an-increasing-linear/m-p/217404#M53494</guid>
      <dc:creator>billfish</dc:creator>
      <dc:date>2015-04-08T16:29:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to I generate random numbers using an increasing linear probability distribution?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-I-generate-random-numbers-using-an-increasing-linear/m-p/217405#M53495</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You want to use the &lt;A href="http://blogs.sas.com/content/iml/2013/07/22/the-inverse-cdf-method.html"&gt;inverse CDF method for generating random numbers&lt;/A&gt;.&amp;nbsp; Sometimes you can use the QUANTILE function to help solve the inverse problem (see the &lt;A href="http://blogs.sas.com/content/iml/2011/10/26/implement-the-folded-normal-distribution-in-sas.html"&gt;example of the folded normal distribution&lt;/A&gt;), but other times you need to solve for the root of the cumulative distribution: F(x) = u, where u ~U(0,1).&amp;nbsp; In SAS/IML, you can &lt;A href="http://blogs.sas.com/content/iml/2014/02/05/find-the-root-of-a-function.html"&gt;use the FROOT function to solve for numerical roots&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your CDF is given explicitly by a formula or by empirical quantiles, you can use linear interpolation.&amp;nbsp; See &lt;A href="http://blogs.sas.com/content/iml/2014/06/18/distribution-from-quantiles.html"&gt;this blog post.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://blogs.sas.com/content/iml/2014/06/18/distribution-from-quantiles.html" title="http://blogs.sas.com/content/iml/2014/06/18/distribution-from-quantiles.html"&gt;http://blogs.sas.com/content/iml/2014/06/18/distribution-from-quantiles.html&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jun 2015 21:13:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-I-generate-random-numbers-using-an-increasing-linear/m-p/217405#M53495</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2015-06-10T21:13:08Z</dc:date>
    </item>
  </channel>
</rss>

