<?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: 95% confidence interval for incidence rate in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/95-confidence-interval-for-incidence-rate/m-p/788536#M38664</link>
    <description>Dear Koen,&lt;BR /&gt;&lt;BR /&gt;when I first saw your code, I thought I could use the vector of a dummy&lt;BR /&gt;variable indicating the occurrence of the event and a vector with&lt;BR /&gt;person-year for each participant.&lt;BR /&gt;But it did not work. Then I perceived that I should only put the zero and&lt;BR /&gt;the value of the person-years (116.42).&lt;BR /&gt;The value of 116.42 is obtained by adding the individual values.&lt;BR /&gt;&lt;BR /&gt;Thanks again for helping me.&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;&lt;BR /&gt;Iuri&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Wed, 05 Jan 2022 20:32:51 GMT</pubDate>
    <dc:creator>iuri_leite</dc:creator>
    <dc:date>2022-01-05T20:32:51Z</dc:date>
    <item>
      <title>95% confidence interval for incidence rate</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/95-confidence-interval-for-incidence-rate/m-p/788482#M38657</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am still struggling to estimate 95% confidence interval for a data set in which we did not observe the event.&amp;nbsp; I have a dummy variable that indicates the event occurrence&amp;nbsp; and the number of person-years.&lt;/P&gt;&lt;P&gt;I did not observe nay event and the number of person-years is equal to 116.42. Then, the incidence rate is zero (0/116.42). But I would like to estimate the confidence interval. I used Proc Genmod and it gives me a perfect result when events occurred. Whithout events I do not get the confidence intervals.It would be possible to estimate the confidence interval?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Iuri&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jan 2022 15:26:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/95-confidence-interval-for-incidence-rate/m-p/788482#M38657</guid>
      <dc:creator>iuri_leite</dc:creator>
      <dc:date>2022-01-05T15:26:45Z</dc:date>
    </item>
    <item>
      <title>Re: 95% confidence interval for incidence rate</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/95-confidence-interval-for-incidence-rate/m-p/788497#M38659</link>
      <description>&lt;P&gt;As I said in your original post:&lt;/P&gt;
&lt;P&gt;If you replace 100 with 116.42 in the code I provided earlier, then you will get the exact confidence interval from PROC GENMOD. You can also use the PROC FREQ code I provided since your response is binary, but PROC FREQ requires integer counts. If you use it with 116 and again with 117, you get very similar results and also quite similar to the interval from PROC GENMOD.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jan 2022 16:44:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/95-confidence-interval-for-incidence-rate/m-p/788497#M38659</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2022-01-05T16:44:28Z</dc:date>
    </item>
    <item>
      <title>Re: 95% confidence interval for incidence rate</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/95-confidence-interval-for-incidence-rate/m-p/788498#M38660</link>
      <description>&lt;P&gt;It's only the lower bound that is difficult to compute, but it is 0 by using common sense or a limiting argument applied to the quantile function of the chi-square distribution with df-&amp;gt;0.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* exact CIs from 
   Ulm K. A simple method to calculate the confidence interval of a standardized 
   mortality ratio. American Journal of Epidemiology 1990;131(2):373-375.
*/
data CI;
alpha = 0.05;
N = 0;           /* observed count */
R = N / 116.42;  /* observed rate = count / personYears */
if N = 0 then 
   LCL = 0;
else 
   LCL = quantile('chisq', alpha/2, 2*R)    / 2;
UCL = quantile('chisq', 1-alpha/2, 2*(1+R))    / 2;
run;

proc print data=CI; run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;For a derivation, see&amp;nbsp;&lt;A href="https://onbiostatistics.blogspot.com/2014/03/computing-confidence-interval-for.html" target="_blank"&gt;On Biostatistics and Clinical Trials: Computing Confidence Interval for Poisson Mean&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jan 2022 16:44:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/95-confidence-interval-for-incidence-rate/m-p/788498#M38660</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2022-01-05T16:44:43Z</dc:date>
    </item>
    <item>
      <title>Re: 95% confidence interval for incidence rate</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/95-confidence-interval-for-incidence-rate/m-p/788503#M38662</link>
      <description>Dear Dave,&lt;BR /&gt;&lt;BR /&gt;thanks. I used the code you provided but using the information of the&lt;BR /&gt;dataset instead of the number. I followed the code now and it worked fine.&lt;BR /&gt;&lt;BR /&gt;Is there any way to do that with the information in the dataset?&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;Iuri&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 05 Jan 2022 17:34:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/95-confidence-interval-for-incidence-rate/m-p/788503#M38662</guid>
      <dc:creator>iuri_leite</dc:creator>
      <dc:date>2022-01-05T17:34:51Z</dc:date>
    </item>
    <item>
      <title>Re: 95% confidence interval for incidence rate</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/95-confidence-interval-for-incidence-rate/m-p/788531#M38663</link>
      <description>&lt;P&gt;Hello &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/198343"&gt;@iuri_leite&lt;/a&gt; ,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What do you mean with : "information from / in the dataset"?&lt;/P&gt;
&lt;P&gt;The number of person-years (116.42) is coming from the data set.&lt;/P&gt;
&lt;P&gt;Just calculate that number by processing the data set and put that number in a macro variable (programmatically!!).&lt;BR /&gt;Then use the macro variable in PROC GENMOD.&lt;/P&gt;
&lt;P&gt;That's completely dynamic and nothing has to be hardcoded.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jan 2022 19:55:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/95-confidence-interval-for-incidence-rate/m-p/788531#M38663</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2022-01-05T19:55:37Z</dc:date>
    </item>
    <item>
      <title>Re: 95% confidence interval for incidence rate</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/95-confidence-interval-for-incidence-rate/m-p/788536#M38664</link>
      <description>Dear Koen,&lt;BR /&gt;&lt;BR /&gt;when I first saw your code, I thought I could use the vector of a dummy&lt;BR /&gt;variable indicating the occurrence of the event and a vector with&lt;BR /&gt;person-year for each participant.&lt;BR /&gt;But it did not work. Then I perceived that I should only put the zero and&lt;BR /&gt;the value of the person-years (116.42).&lt;BR /&gt;The value of 116.42 is obtained by adding the individual values.&lt;BR /&gt;&lt;BR /&gt;Thanks again for helping me.&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;&lt;BR /&gt;Iuri&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 05 Jan 2022 20:32:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/95-confidence-interval-for-incidence-rate/m-p/788536#M38664</guid>
      <dc:creator>iuri_leite</dc:creator>
      <dc:date>2022-01-05T20:32:51Z</dc:date>
    </item>
  </channel>
</rss>

