<?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: Proc genmod for IR, underdispersion in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-genmod-for-IR-underdispersion/m-p/621196#M29925</link>
    <description>&lt;P&gt;Makes perfect sense, that it is used to compare competing models. I am glad that you mentioned, I kept wondering about the reference for "smaller is better".&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I will rerun my analysis and see how it goes&lt;/P&gt;</description>
    <pubDate>Thu, 30 Jan 2020 16:19:24 GMT</pubDate>
    <dc:creator>GreenTree1</dc:creator>
    <dc:date>2020-01-30T16:19:24Z</dc:date>
    <item>
      <title>Proc genmod for IR, underdispersion</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-genmod-for-IR-underdispersion/m-p/620227#M29870</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am calculating incidence rate ratio using proc genmod (poisson dist) and to my understanding, it shows underdispersion&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2020-01-27 at 10.24.11 AM.png" style="width: 385px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/35635i1245623F4FCD5EF8/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2020-01-27 at 10.24.11 AM.png" alt="Screen Shot 2020-01-27 at 10.24.11 AM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But when I run the following to code to assess&amp;nbsp; goodness of fit, I get a non signficant p value.&lt;/P&gt;&lt;PRE&gt;Title "goodness of fit_poisson";&lt;BR /&gt;data pvalue;&lt;BR /&gt;  df = 28561; chisq = 12304.4364 ;&lt;BR /&gt;  pvalue = 1 - probchi(chisq, df);&lt;BR /&gt;run;&lt;BR /&gt;proc print data = pvalue noobs;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;result as follows&lt;/P&gt;&lt;DIV class="systitleandfootercontainer"&gt;&lt;P&gt;&lt;SPAN class="c systemtitle"&gt;goodness of fit_poisson&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;df chisq pvalue&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2020-01-27 at 10.45.22 AM.png" style="width: 288px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/35636i756F335574F4393E/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2020-01-27 at 10.45.22 AM.png" alt="Screen Shot 2020-01-27 at 10.45.22 AM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My question is that how do infer these results, I tried running NB and zero-inflated and it gave me a convergence error. Are there any possible solutions to handling underdispersed data?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2020 16:46:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-genmod-for-IR-underdispersion/m-p/620227#M29870</guid>
      <dc:creator>GreenTree1</dc:creator>
      <dc:date>2020-01-27T16:46:34Z</dc:date>
    </item>
    <item>
      <title>Re: Proc genmod for IR, underdispersion</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-genmod-for-IR-underdispersion/m-p/620310#M29879</link>
      <description>&lt;P&gt;Unless there is sufficient number of observations in each of the covariate profiles, the chi-square test is not reliable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Concerning dispersion, see the section on this in &lt;A href="http://support.sas.com/kb/22630" target="_self"&gt;this note&lt;/A&gt; which offers several suggestions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You might want to try adding the NOLOGNB option in the MODEL statement in PROC GENMOD when fitting the negative binomial model. You might also want to try fitting the negative binomial model via a different procedure such as HPGENSELECT, GLIMMIX, FMM, or NLMIXED since differences in algorithms might allow one of them to succeed. If you have SAS/ETS, COUNTREG can fit the Poisson and negative binomial models, and it also offers the Conway-Maxwell model as another possible approach that can help with underdispersion. In these procedures, there are also options that allow you to tweak the fitting algorithm which might be helpful. But before concluding that there is over- or under-dispersion, you should first consider that the model might not be correctly specified. An alternative model specification might remove any evidence of dispersion problems.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2020 19:54:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-genmod-for-IR-underdispersion/m-p/620310#M29879</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2020-01-27T19:54:10Z</dc:date>
    </item>
    <item>
      <title>Re: Proc genmod for IR, underdispersion</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-genmod-for-IR-underdispersion/m-p/620316#M29880</link>
      <description>&lt;P&gt;Thank you, StatDave.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With regards to number of observations, my sample size is quite large approx. 130,000 (1:3 cases:controls). Thanks for the possible solutions, I will go over them and update this post.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2020 20:01:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-genmod-for-IR-underdispersion/m-p/620316#M29880</guid>
      <dc:creator>GreenTree1</dc:creator>
      <dc:date>2020-01-27T20:01:05Z</dc:date>
    </item>
    <item>
      <title>Re: Proc genmod for IR, underdispersion</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-genmod-for-IR-underdispersion/m-p/620844#M29911</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I went over the note and tried specifying the repeated statement in PROC GENMOD as mentioned in the following statement in the note&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#008000"&gt;&lt;SPAN&gt;"GEE models for clustered or longitudinal data&amp;nbsp;can be fit by specifying the REPEATED statement in PROC GENMOD and (beginning in SAS 9.4 TS1M2) in PROC GEE........However, a comparative statistic similar to AIC, known as QIC, is provided in PROC GENMOD and PROC GEE....&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Some background: I am using proc genmod to calculate the incidence rate ratio for count data, and here is how my data looks like&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ID&amp;nbsp; &amp;nbsp; &amp;nbsp;events&amp;nbsp; &amp;nbsp; &amp;nbsp;person-days&amp;nbsp; &amp;nbsp; &amp;nbsp;exposure&amp;nbsp; &amp;nbsp;log person-days&lt;/P&gt;
&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;80&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4.38&lt;/P&gt;
&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;11&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2.39&lt;/P&gt;
&lt;P&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;11&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;60&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4.09&lt;/P&gt;
&lt;P&gt;4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 19&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 30&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3.40&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Following is my code and QIC (attached image) from the output.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc genmod data= mydata descending;&lt;BR /&gt;class ID exposure (ref='0');&lt;BR /&gt;model events= exposure/offset=log persondays dist=poisson&lt;BR /&gt;link=log type3 ;&lt;BR /&gt;repeated subject= ID;&lt;BR /&gt;run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2020-01-29 at 9.32.40 AM.png" style="width: 296px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/35698i981278B39AB88C0D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2020-01-29 at 9.32.40 AM.png" alt="Screen Shot 2020-01-29 at 9.32.40 AM.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My questions are:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Being a new SAS user, I am not sure if I have specified the repeated statement correctly?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. In order to use the repeated statement, does my data need to in repeated ID format, where there are multiple observations by each ID? My current data has a number of events and total person-days contributed collapsed for each ID,&amp;nbsp; does the repeated statement apply to this, since the IDs are not repeated?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3. Looking at the QIC, I think the model is a good fit, but I am not too sure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please let me know if more clarification is needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jan 2020 15:40:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-genmod-for-IR-underdispersion/m-p/620844#M29911</guid>
      <dc:creator>GreenTree1</dc:creator>
      <dc:date>2020-01-29T15:40:21Z</dc:date>
    </item>
    <item>
      <title>Re: Proc genmod for IR, underdispersion</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-genmod-for-IR-underdispersion/m-p/620978#M29918</link>
      <description>&lt;P&gt;Your code seems fine. The data does not have to contain multiple observations per ID in order to use the Generalized Estimating Equations method (and get its robust "sandwich" variance estimator) provided by the REPEATED statement. See &lt;A href="http://support.sas.com/kb/24188" target="_self"&gt;this note&lt;/A&gt; that discusses modeling and estimating rates and rate ratios (but does not make use the REPEATED statement).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The QIC is used like the AIC and BIC statements in generalized models. That is, it is used to compare competing models. Used this way, models with smaller QIC values are better. But a QIC value for one model by itself cannot really be used to indicate if that model fits well or not.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jan 2020 20:05:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-genmod-for-IR-underdispersion/m-p/620978#M29918</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2020-01-29T20:05:27Z</dc:date>
    </item>
    <item>
      <title>Re: Proc genmod for IR, underdispersion</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-genmod-for-IR-underdispersion/m-p/621196#M29925</link>
      <description>&lt;P&gt;Makes perfect sense, that it is used to compare competing models. I am glad that you mentioned, I kept wondering about the reference for "smaller is better".&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I will rerun my analysis and see how it goes&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2020 16:19:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-genmod-for-IR-underdispersion/m-p/621196#M29925</guid>
      <dc:creator>GreenTree1</dc:creator>
      <dc:date>2020-01-30T16:19:24Z</dc:date>
    </item>
  </channel>
</rss>

