<?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 generate a list of random numbers in SAS in SAS Data Science</title>
    <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-generate-a-list-of-random-numbers-in-SAS/m-p/202649#M2717</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is found in Chapter 2 of &lt;EM&gt;Simulating Data with SAS. &lt;/EM&gt;In the DATA step, use the RAND function within a loop to generate the data. Use the PROPPLOT statement in the UNIVARIATE procedure to construct the probability plot:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data Random;&lt;/P&gt;&lt;P&gt;N = 100;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* sample size */&lt;/P&gt;&lt;P&gt;family = "Normal";&amp;nbsp; /* or "Lognormal" */&lt;/P&gt;&lt;P&gt;mean = 8;&lt;/P&gt;&lt;P&gt;stdDev = 3;&lt;/P&gt;&lt;P&gt;do i = 1 to N;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; x = rand(family, mean, stdDev);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* draw propability plot */&lt;/P&gt;&lt;P&gt;proc univariate data=Random;&lt;/P&gt;&lt;P&gt;var x;&lt;/P&gt;&lt;P&gt;probplot x / square normal; /* or lognormal; optionally specify popluation parameters */&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 Jun 2015 21:00:03 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2015-06-10T21:00:03Z</dc:date>
    <item>
      <title>How to generate a list of random numbers in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-generate-a-list-of-random-numbers-in-SAS/m-p/202646#M2714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I wish to simulate(generate) a list of random numbers, where I specify the number of observations that I wish, the underlying distribution(normal,lognormal), the mean, the std. deviation and I want as&amp;nbsp; output a list of random numbers from this distribution.&lt;/P&gt;&lt;P&gt;Further I wish to draw a probability plot of these numbers, conforming to stathe distribution that they were drawn from.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to do it in SAS?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jun 2015 18:53:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/How-to-generate-a-list-of-random-numbers-in-SAS/m-p/202646#M2714</guid>
      <dc:creator>eagles_dare13</dc:creator>
      <dc:date>2015-06-10T18:53:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate a list of random numbers in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-generate-a-list-of-random-numbers-in-SAS/m-p/202647#M2715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This book is essential for what you want to do. Absolutely recommended!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sas.com/store/books/categories/usage-and-reference/simulating-data-with-sas-/prodBK_65378_en.html" title="http://www.sas.com/store/books/categories/usage-and-reference/simulating-data-with-sas-/prodBK_65378_en.html"&gt;Simulating Data with SAS®&lt;/A&gt; by &lt;A __default_attr="129106" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jun 2015 18:58:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/How-to-generate-a-list-of-random-numbers-in-SAS/m-p/202647#M2715</guid>
      <dc:creator>M_Maldonado</dc:creator>
      <dc:date>2015-06-10T18:58:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate a list of random numbers in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-generate-a-list-of-random-numbers-in-SAS/m-p/202648#M2716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This might be a good place to start:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000202908.htm"&gt;http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000202908.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The example in the "Details" section is pretty close to one of your objectives.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jun 2015 19:01:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/How-to-generate-a-list-of-random-numbers-in-SAS/m-p/202648#M2716</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2015-06-10T19:01:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate a list of random numbers in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-generate-a-list-of-random-numbers-in-SAS/m-p/202649#M2717</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is found in Chapter 2 of &lt;EM&gt;Simulating Data with SAS. &lt;/EM&gt;In the DATA step, use the RAND function within a loop to generate the data. Use the PROPPLOT statement in the UNIVARIATE procedure to construct the probability plot:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data Random;&lt;/P&gt;&lt;P&gt;N = 100;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* sample size */&lt;/P&gt;&lt;P&gt;family = "Normal";&amp;nbsp; /* or "Lognormal" */&lt;/P&gt;&lt;P&gt;mean = 8;&lt;/P&gt;&lt;P&gt;stdDev = 3;&lt;/P&gt;&lt;P&gt;do i = 1 to N;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; x = rand(family, mean, stdDev);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* draw propability plot */&lt;/P&gt;&lt;P&gt;proc univariate data=Random;&lt;/P&gt;&lt;P&gt;var x;&lt;/P&gt;&lt;P&gt;probplot x / square normal; /* or lognormal; optionally specify popluation parameters */&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jun 2015 21:00:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/How-to-generate-a-list-of-random-numbers-in-SAS/m-p/202649#M2717</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2015-06-10T21:00:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate a list of random numbers in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-generate-a-list-of-random-numbers-in-SAS/m-p/202650#M2718</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks. How come the probplot does not represent a bell curve but more like a 45 degree straight line?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jun 2015 13:27:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/How-to-generate-a-list-of-random-numbers-in-SAS/m-p/202650#M2718</guid>
      <dc:creator>eagles_dare13</dc:creator>
      <dc:date>2015-06-11T13:27:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate a list of random numbers in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-generate-a-list-of-random-numbers-in-SAS/m-p/202651#M2719</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The probplot isn't plotting the distribution of x, but a probability plot, similar to a Q-Q plot.&amp;nbsp; This is from the doc:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The PROBPLOT statement creates a probability plot, which compares ordered variable values with the percentiles of a specified theoretical distribution. If the data distribution matches the theoretical distribution, the points on the plot form a linear pattern. Consequently, you can use a probability plot to determine how well a theoretical distribution models a set of measurements.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jun 2015 16:38:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/How-to-generate-a-list-of-random-numbers-in-SAS/m-p/202651#M2719</guid>
      <dc:creator>WendyCzika</dc:creator>
      <dc:date>2015-06-11T16:38:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate a list of random numbers in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-generate-a-list-of-random-numbers-in-SAS/m-p/202652#M2720</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks. How to get the plot of the distribution? I am looking for something like xyplot(x, p);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jun 2015 16:46:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/How-to-generate-a-list-of-random-numbers-in-SAS/m-p/202652#M2720</guid>
      <dc:creator>eagles_dare13</dc:creator>
      <dc:date>2015-06-11T16:46:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate a list of random numbers in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-generate-a-list-of-random-numbers-in-SAS/m-p/202653#M2721</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;proc univariate distribution plot&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/procstat/63104/HTML/default/viewer.htm#procstat_univariate_sect005.htm" title="http://support.sas.com/documentation/cdl/en/procstat/63104/HTML/default/viewer.htm#procstat_univariate_sect005.htm"&gt;Base SAS(R) 9.2 Procedures Guide: Statistical Procedures, Third Edition&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jun 2015 16:51:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/How-to-generate-a-list-of-random-numbers-in-SAS/m-p/202653#M2721</guid>
      <dc:creator>M_Maldonado</dc:creator>
      <dc:date>2015-06-11T16:51:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate a list of random numbers in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-generate-a-list-of-random-numbers-in-SAS/m-p/202654#M2722</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can get a histogram of the simulated sample by using the HISTOGRAM statement in PROC UNIVARIATE. To overlay a line plot of the distribution, specify the distribution name and any known parameters after a "slash" (/) :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;histogram x / normal; /* or lognormal; optionally specify popluation parameters */&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jun 2015 19:12:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/How-to-generate-a-list-of-random-numbers-in-SAS/m-p/202654#M2722</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2015-06-11T19:12:04Z</dc:date>
    </item>
  </channel>
</rss>

