<?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 How to compute incidence rate in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-compute-incidence-rate/m-p/421982#M22207</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;This is my first time writing here. I have mortality data from a cohort study. I've been trying to calculate incidence rates for mortality with no success. I used proc genmod with lsmeans to estimate the IR using Poisson, but the results are very very different from those obtained by my colleague using STATA.This is the code I've been using:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc genmod data=muj;&lt;BR /&gt;class muerto diabetes(ref=first) educacion(ref=first) sexo(ref=last);&lt;BR /&gt;model muerto=edad educacion&amp;nbsp; diabetes/dist=poisson&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;link=log&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;offset=logpyears;&lt;BR /&gt;lsmeans diabetes/ilink exp cl diff OM;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;The stata code used for this is the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;poisson muerto i.diabetes i.cat_edad i.educacion, exposure(pyears) irr&lt;BR /&gt;margins diabetes, predict(ir)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there some procedure or code that gives me adjusted incidence rates?&lt;/P&gt;&lt;P&gt;Thanks to all in advance&lt;/P&gt;</description>
    <pubDate>Tue, 19 Dec 2017 20:29:42 GMT</pubDate>
    <dc:creator>Ximena_O</dc:creator>
    <dc:date>2017-12-19T20:29:42Z</dc:date>
    <item>
      <title>How to compute incidence rate</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-compute-incidence-rate/m-p/421982#M22207</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;This is my first time writing here. I have mortality data from a cohort study. I've been trying to calculate incidence rates for mortality with no success. I used proc genmod with lsmeans to estimate the IR using Poisson, but the results are very very different from those obtained by my colleague using STATA.This is the code I've been using:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc genmod data=muj;&lt;BR /&gt;class muerto diabetes(ref=first) educacion(ref=first) sexo(ref=last);&lt;BR /&gt;model muerto=edad educacion&amp;nbsp; diabetes/dist=poisson&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;link=log&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;offset=logpyears;&lt;BR /&gt;lsmeans diabetes/ilink exp cl diff OM;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;The stata code used for this is the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;poisson muerto i.diabetes i.cat_edad i.educacion, exposure(pyears) irr&lt;BR /&gt;margins diabetes, predict(ir)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there some procedure or code that gives me adjusted incidence rates?&lt;/P&gt;&lt;P&gt;Thanks to all in advance&lt;/P&gt;</description>
      <pubDate>Tue, 19 Dec 2017 20:29:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-compute-incidence-rate/m-p/421982#M22207</guid>
      <dc:creator>Ximena_O</dc:creator>
      <dc:date>2017-12-19T20:29:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to compute incidence rate</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-compute-incidence-rate/m-p/421989#M22208</link>
      <description>Hi, it maybe helpful to post the Stata code as well?</description>
      <pubDate>Mon, 18 Dec 2017 14:26:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-compute-incidence-rate/m-p/421989#M22208</guid>
      <dc:creator>Miracle</dc:creator>
      <dc:date>2017-12-18T14:26:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to compute incidence rate</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-compute-incidence-rate/m-p/421991#M22209</link>
      <description>&lt;P&gt;I moved this to the SAS/STAT community, so that the experts for that may be notified of your question.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Dec 2017 14:28:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-compute-incidence-rate/m-p/421991#M22209</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-12-18T14:28:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to compute incidence rate</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-compute-incidence-rate/m-p/421992#M22210</link>
      <description>&lt;P&gt;Thanks &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Dec 2017 14:30:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-compute-incidence-rate/m-p/421992#M22210</guid>
      <dc:creator>Ximena_O</dc:creator>
      <dc:date>2017-12-18T14:30:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to compute incidence rate</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-compute-incidence-rate/m-p/421999#M22212</link>
      <description>Thanks for the tip, just included the stata code in the question. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Mon, 18 Dec 2017 15:03:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-compute-incidence-rate/m-p/421999#M22212</guid>
      <dc:creator>Ximena_O</dc:creator>
      <dc:date>2017-12-18T15:03:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to compute incidence rate</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-compute-incidence-rate/m-p/422009#M22216</link>
      <description>&lt;P&gt;The SAS code looks correct and follows what is discussed in &lt;A href="http://support.sas.com/kb/24188" target="_self"&gt;this note&lt;/A&gt;. But your Stata code looks like the model only has one predictor while your SAS code has three, so that will clearly cause a difference. Additionally, note that the predictive margin computed in Stata is not the same as an LS-mean.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Dec 2017 15:43:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-compute-incidence-rate/m-p/422009#M22216</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2017-12-18T15:43:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to compute incidence rate</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-compute-incidence-rate/m-p/422012#M22219</link>
      <description>What would be the equivalent in SAS fro the margin computed in STATA?&lt;BR /&gt;(we've been varying the covariates, so it is possible that the codes are a little different, but the results we get are different anyway)</description>
      <pubDate>Mon, 18 Dec 2017 15:45:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-compute-incidence-rate/m-p/422012#M22219</guid>
      <dc:creator>Ximena_O</dc:creator>
      <dc:date>2017-12-18T15:45:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to compute incidence rate</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-compute-incidence-rate/m-p/422025#M22223</link>
      <description>&lt;P&gt;You would need to fit exactly the same model in both SAS and Stata since any difference in the fitted model can cause a difference, large or small, in estimated values. A predictive margin for a level of your predictor is the average predicted value when all observations in your data have the predictor set to that level. So, you could easily compute the point estimate of the margin by creating a copy of your data set with your predictor set to one level and then compute all the predicted values and average them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Dec 2017 16:08:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-compute-incidence-rate/m-p/422025#M22223</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2017-12-18T16:08:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to compute incidence rate</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-compute-incidence-rate/m-p/422473#M22247</link>
      <description>Just updated the code for STATA...thanks</description>
      <pubDate>Tue, 19 Dec 2017 20:30:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-compute-incidence-rate/m-p/422473#M22247</guid>
      <dc:creator>Ximena_O</dc:creator>
      <dc:date>2017-12-19T20:30:20Z</dc:date>
    </item>
  </channel>
</rss>

