<?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: Zero-truncated Negative Binomial Regression in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Zero-truncated-Negative-Binomial-Regression/m-p/941749#M47017</link>
    <description>&lt;P&gt;In follow-up to proc nlmixed vs. proc fmm, I was able to run my model with both procedures, but they yielded nonidentical (albeit similar) results. Is one more accurate than the other? From this &lt;A href="https://stats.oarc.ucla.edu/sas/dae/zero-truncated-poisson-regression/" target="_self"&gt;note:&lt;/A&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;Although compared to proc nlmixed, proc fmm provides a much easier way to specify a zero-truncated poisson regression, it has much more limited postestimation options. For example, estimate and predict statements are not available with proc fmm. Additionally, proc fmm like most other SAS procs, uses the last group within a categorical variable as the reference group.&lt;/P&gt;&lt;P&gt;I included dummy variables for my multilevel categorical predictors, omitting the referent, so I'm not sure the difference in estimates btw nlmixed and fmm can be explained by fmm using the last group as the referent.&lt;/P&gt;</description>
    <pubDate>Thu, 29 Aug 2024 15:06:00 GMT</pubDate>
    <dc:creator>amyip</dc:creator>
    <dc:date>2024-08-29T15:06:00Z</dc:date>
    <item>
      <title>Zero-truncated Negative Binomial Regression</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Zero-truncated-Negative-Binomial-Regression/m-p/939325#M46863</link>
      <description>&lt;P&gt;I'm trying ZTNB for the first time (SAS EG 8.2) to model cumulative days' supply of prescription meds based on individual-level characteristics (e.g. binary long-term care, sex, age group), where all subjects have at least one day's supply, ie, no zeroes. I found the following code from:&lt;/P&gt;&lt;P&gt;&lt;A href="https://stats.oarc.ucla.edu/sas/dae/zero-truncated-negative-binomial/" target="_blank"&gt;https://stats.oarc.ucla.edu/sas/dae/zero-truncated-negative-binomial/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://jbhender.github.io/Stats506/F18/GP/Group6.html" target="_blank"&gt;https://jbhender.github.io/Stats506/F18/GP/Group6.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;proc nlmixed data=ZTNB;&lt;/P&gt;&lt;P&gt;log_mu = intercept + b_long_term_care*long_term_care + b_female*female + b_agegr1*agegr1;&lt;BR /&gt;mu = exp(log_mu);&lt;BR /&gt;het = 1/alpha;&lt;BR /&gt;ll = lgamma(CumDays+het) - lgamma(CumDays + 1) - lgamma(het) - het*log(1+alpha*mu)&lt;BR /&gt;+ CumDays*log(alpha*mu) - CumDays*log(1+alpha*mu) - log(1 - (1 + alpha * mu)**-het);&lt;BR /&gt;model CumDays ~ general(ll);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Running this code, I get the following in the log:&lt;/P&gt;&lt;P&gt;NOTE: To assign starting values to parameters, use the PARMS statement. The default starting value of 1.0 is in effect for all parameters.&lt;/P&gt;&lt;P&gt;ERROR: QUANEW Optimization cannot be completed.&lt;/P&gt;&lt;P&gt;NOTE: Optimization routine cannot improve the function value.&lt;/P&gt;&lt;P&gt;NOTE:The SAS System stopped processing this step because of errors.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any guidance on how to run this procedure will be appreciated.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2024 19:38:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Zero-truncated-Negative-Binomial-Regression/m-p/939325#M46863</guid>
      <dc:creator>amyip</dc:creator>
      <dc:date>2024-08-14T19:38:28Z</dc:date>
    </item>
    <item>
      <title>Re: Zero-truncated Negative Binomial Regression</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Zero-truncated-Negative-Binomial-Regression/m-p/939345#M46864</link>
      <description>&lt;P&gt;See &lt;A href="http://support.sas.com/kb/43522" target="_self"&gt;this note&lt;/A&gt; that shows how to fit the zero truncated Poisson and negative binomial models using PROC FMM and PROC NLMIXED. As shown there, it's easiest to do with FMM.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2024 22:58:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Zero-truncated-Negative-Binomial-Regression/m-p/939345#M46864</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2024-08-14T22:58:41Z</dc:date>
    </item>
    <item>
      <title>Re: Zero-truncated Negative Binomial Regression</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Zero-truncated-Negative-Binomial-Regression/m-p/939659#M46880</link>
      <description>&lt;P&gt;Thanks for taking the time to reply. Are you able to troubleshoot how to run my SAS program? I already set up the regression using proc nlmixed, using sample code from the two references I listed.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Aug 2024 16:58:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Zero-truncated-Negative-Binomial-Regression/m-p/939659#M46880</guid>
      <dc:creator>amyip</dc:creator>
      <dc:date>2024-08-16T16:58:22Z</dc:date>
    </item>
    <item>
      <title>Re: Zero-truncated Negative Binomial Regression</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Zero-truncated-Negative-Binomial-Regression/m-p/939706#M46886</link>
      <description>&lt;P&gt;Just plug your model into the&amp;nbsp; code shown in the Note I referred to.&amp;nbsp; I assume that your data is individual level data (not aggregated data) and that each of the predictors in your model are numeric.&amp;nbsp; In NLMIXED, you can start without the PARMS statement to set initial parameter values, but if you run into fitting problems then you might need to include the PARMS statement to set initial values for one or more of your model parameters.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;      proc nlmixed data=ZTNB;
         y=CumDays;
         mean = exp(intercept + b_long_term_care*long_term_care + b_female*female + b_agegr1*agegr1);
         ll = lgamma(y+1/k) - lgamma(1/k) - lgamma(y+1) + y*log(k*mean) -
              (y+(1/k))*log(1+k*mean) - log(1-(1+k*mean)**(-1/k));
         model y ~ general(ll);
         run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or just use PROC FMM:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;      proc fmm data=ZTNB;
         model y = long_term_care female agegr1 / dist=truncnegbin;
         run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 16 Aug 2024 21:22:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Zero-truncated-Negative-Binomial-Regression/m-p/939706#M46886</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2024-08-16T21:22:05Z</dc:date>
    </item>
    <item>
      <title>Re: Zero-truncated Negative Binomial Regression</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Zero-truncated-Negative-Binomial-Regression/m-p/940026#M46919</link>
      <description>&lt;P&gt;Thank you -- it worked! Can the estimates be transformed to facilitate interpretation (our target audience would be clinicians, not statisticians), e.g. exponentiation or taking the natural logarithm?&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2024 23:42:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Zero-truncated-Negative-Binomial-Regression/m-p/940026#M46919</guid>
      <dc:creator>amyip</dc:creator>
      <dc:date>2024-08-19T23:42:16Z</dc:date>
    </item>
    <item>
      <title>Re: Zero-truncated Negative Binomial Regression</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Zero-truncated-Negative-Binomial-Regression/m-p/940107#M46926</link>
      <description>&lt;P&gt;Just add a PREDICT statement to get predicted values in the OUT= data set for each of the observations in the input data set.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;predict mean out=preds;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you have one or more particular settings of the predictor(s) that you want a predicted value for, you can use one (or more) ESTIMATE statements. For example, to get the predicted mean for MENT=30 in the ZTNB example using the Long data in the second half of the note I referred to earlier:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;estimate 'pred for ment=30' exp(b0+b1*30);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Aug 2024 15:11:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Zero-truncated-Negative-Binomial-Regression/m-p/940107#M46926</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2024-08-20T15:11:19Z</dc:date>
    </item>
    <item>
      <title>Re: Zero-truncated Negative Binomial Regression</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Zero-truncated-Negative-Binomial-Regression/m-p/940461#M46959</link>
      <description>&lt;P&gt;My question may not have been clear. Running the model yields an estimate for the covariate of interest, long-term care, of 0.2757 (95% CI 0.2254, 0.3261), p&amp;lt;0.0001, which is difficult to interpret. Would it be appropriate to report the corresponding e^β of 1.32 (95% CI 1.26, 1.39) as a pseudo relative risk, such that those in long-term care were prescribed on average 1.32X the total days' supply of medication as their community-dwelling counterparts?&lt;/P&gt;</description>
      <pubDate>Thu, 22 Aug 2024 14:35:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Zero-truncated-Negative-Binomial-Regression/m-p/940461#M46959</guid>
      <dc:creator>amyip</dc:creator>
      <dc:date>2024-08-22T14:35:21Z</dc:date>
    </item>
    <item>
      <title>Re: Zero-truncated Negative Binomial Regression</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Zero-truncated-Negative-Binomial-Regression/m-p/941749#M47017</link>
      <description>&lt;P&gt;In follow-up to proc nlmixed vs. proc fmm, I was able to run my model with both procedures, but they yielded nonidentical (albeit similar) results. Is one more accurate than the other? From this &lt;A href="https://stats.oarc.ucla.edu/sas/dae/zero-truncated-poisson-regression/" target="_self"&gt;note:&lt;/A&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;Although compared to proc nlmixed, proc fmm provides a much easier way to specify a zero-truncated poisson regression, it has much more limited postestimation options. For example, estimate and predict statements are not available with proc fmm. Additionally, proc fmm like most other SAS procs, uses the last group within a categorical variable as the reference group.&lt;/P&gt;&lt;P&gt;I included dummy variables for my multilevel categorical predictors, omitting the referent, so I'm not sure the difference in estimates btw nlmixed and fmm can be explained by fmm using the last group as the referent.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2024 15:06:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Zero-truncated-Negative-Binomial-Regression/m-p/941749#M47017</guid>
      <dc:creator>amyip</dc:creator>
      <dc:date>2024-08-29T15:06:00Z</dc:date>
    </item>
  </channel>
</rss>

