<?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 Simulating Poisson data in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Simulating-Poisson-data/m-p/956458#M47863</link>
    <description>&lt;P&gt;Hi everybody,&lt;/P&gt;
&lt;P&gt;I am trying to simulate Poisson data but not sure if I am doing it correctly.&lt;/P&gt;
&lt;P&gt;I know that in a given population, an event occurs at a rate of 1.2 per year.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I would like to simulate 1000 set of data each containing 50 patients, is this how the code should be written?&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;
&lt;P&gt;data Poisson;&lt;BR /&gt;call streaminit(4321);&lt;BR /&gt;lambda = 0.8;&lt;/P&gt;
&lt;P&gt;do SimID = 1 to 1000;&lt;BR /&gt;do i = 1 to 50;&lt;BR /&gt;x = rand("Poisson", lambda); &lt;BR /&gt;output;&lt;BR /&gt;end;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;/P&gt;</description>
    <pubDate>Fri, 17 Jan 2025 19:32:32 GMT</pubDate>
    <dc:creator>CHELS</dc:creator>
    <dc:date>2025-01-17T19:32:32Z</dc:date>
    <item>
      <title>Simulating Poisson data</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Simulating-Poisson-data/m-p/956458#M47863</link>
      <description>&lt;P&gt;Hi everybody,&lt;/P&gt;
&lt;P&gt;I am trying to simulate Poisson data but not sure if I am doing it correctly.&lt;/P&gt;
&lt;P&gt;I know that in a given population, an event occurs at a rate of 1.2 per year.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I would like to simulate 1000 set of data each containing 50 patients, is this how the code should be written?&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;
&lt;P&gt;data Poisson;&lt;BR /&gt;call streaminit(4321);&lt;BR /&gt;lambda = 0.8;&lt;/P&gt;
&lt;P&gt;do SimID = 1 to 1000;&lt;BR /&gt;do i = 1 to 50;&lt;BR /&gt;x = rand("Poisson", lambda); &lt;BR /&gt;output;&lt;BR /&gt;end;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jan 2025 19:32:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Simulating-Poisson-data/m-p/956458#M47863</guid>
      <dc:creator>CHELS</dc:creator>
      <dc:date>2025-01-17T19:32:32Z</dc:date>
    </item>
    <item>
      <title>Re: Simulating Poisson data</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Simulating-Poisson-data/m-p/956466#M47865</link>
      <description>&lt;P&gt;I think you want to set lambda to 1.2 in your case:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
do i=1 to 10000;
  x=rand('poisson',1.2);
  output;
end;
run;

proc univariate data=test noprint;
histogram x / midpoints=0 to 7 by 1;
inset mean median max / position=NE;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="quickbluefish_0-1737148505113.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/103779i6F0FE4BC8A04F596/image-size/medium?v=v2&amp;amp;px=400" role="button" title="quickbluefish_0-1737148505113.png" alt="quickbluefish_0-1737148505113.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jan 2025 21:15:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Simulating-Poisson-data/m-p/956466#M47865</guid>
      <dc:creator>quickbluefish</dc:creator>
      <dc:date>2025-01-17T21:15:11Z</dc:date>
    </item>
    <item>
      <title>Re: Simulating Poisson data</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Simulating-Poisson-data/m-p/956510#M47871</link>
      <description>&lt;A href="https://blogs.sas.com/content/iml/2024/08/07/simulate-poisson-regression.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2024/08/07/simulate-poisson-regression.html&lt;/A&gt;</description>
      <pubDate>Sat, 18 Jan 2025 08:31:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Simulating-Poisson-data/m-p/956510#M47871</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2025-01-18T08:31:51Z</dc:date>
    </item>
  </channel>
</rss>

