<?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 proc genmond and proc nlmixed give the different results for ZIP in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/proc-genmond-and-proc-nlmixed-give-the-different-results-for-ZIP/m-p/444796#M23359</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm running the following two codes on the attached data and getting two different results. Moreover the results for the Zero inflation do not appear correct. I don't know whether it is a problem with some code or It's a sign that zero inflation is not the best for this data! because even the significance of the Zero inflation estimates is way off from proc nlmixed&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc genmod data = bbbb;
  model y_c = x1 x2/dist=zip;
  zeromodel x1 x2 /link = logit;
run;

/*********************************************************************************************************/

proc nlmixed data=bbbb;
   parameters b0=0 b1=0 b2=0 
              a0=0 a1 = 0 a2=0 ;
   linpinfl = a0 + a1*x1 + a2*x2;
  infprob  = 1/(1+exp(-linpinfl));
   lambda   = exp(b0 + b1*x1 + b2*x2 );
   if y_c=0 then 
        ll = log(infprob + (1-infprob)*exp(-lambda));
   else ll = log((1-infprob)) - lambda  + y_c*log(lambda) - lgamma(y_c + 1);
   model y_c ~ general(ll);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 12 Mar 2018 15:32:06 GMT</pubDate>
    <dc:creator>john1111</dc:creator>
    <dc:date>2018-03-12T15:32:06Z</dc:date>
    <item>
      <title>proc genmond and proc nlmixed give the different results for ZIP</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-genmond-and-proc-nlmixed-give-the-different-results-for-ZIP/m-p/444796#M23359</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm running the following two codes on the attached data and getting two different results. Moreover the results for the Zero inflation do not appear correct. I don't know whether it is a problem with some code or It's a sign that zero inflation is not the best for this data! because even the significance of the Zero inflation estimates is way off from proc nlmixed&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc genmod data = bbbb;
  model y_c = x1 x2/dist=zip;
  zeromodel x1 x2 /link = logit;
run;

/*********************************************************************************************************/

proc nlmixed data=bbbb;
   parameters b0=0 b1=0 b2=0 
              a0=0 a1 = 0 a2=0 ;
   linpinfl = a0 + a1*x1 + a2*x2;
  infprob  = 1/(1+exp(-linpinfl));
   lambda   = exp(b0 + b1*x1 + b2*x2 );
   if y_c=0 then 
        ll = log(infprob + (1-infprob)*exp(-lambda));
   else ll = log((1-infprob)) - lambda  + y_c*log(lambda) - lgamma(y_c + 1);
   model y_c ~ general(ll);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 12 Mar 2018 15:32:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-genmond-and-proc-nlmixed-give-the-different-results-for-ZIP/m-p/444796#M23359</guid>
      <dc:creator>john1111</dc:creator>
      <dc:date>2018-03-12T15:32:06Z</dc:date>
    </item>
    <item>
      <title>Re: proc genmond and proc nlmixed give the different results for ZIP</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-genmond-and-proc-nlmixed-give-the-different-results-for-ZIP/m-p/445176#M23360</link>
      <description>&lt;P&gt;I suggest you simulate data that matches the model. You will then know the true values of the parameters and you can assess which method performs as expected. Simulation enables you to generate a large data set (such as 10,000 observations) so that the standard errors for the statistics are very small.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Mar 2018 14:19:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-genmond-and-proc-nlmixed-give-the-different-results-for-ZIP/m-p/445176#M23360</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2018-03-13T14:19:17Z</dc:date>
    </item>
    <item>
      <title>Re: proc genmond and proc nlmixed give the different results for ZIP</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-genmond-and-proc-nlmixed-give-the-different-results-for-ZIP/m-p/445386#M23363</link>
      <description>&lt;P&gt;Thanks a lot for this idea! I noticed the problem! I messed up the data unknowingly and I didn't realize that I had deleted all the observations with the Zero counts.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Mar 2018 06:24:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-genmond-and-proc-nlmixed-give-the-different-results-for-ZIP/m-p/445386#M23363</guid>
      <dc:creator>john1111</dc:creator>
      <dc:date>2018-03-14T06:24:46Z</dc:date>
    </item>
  </channel>
</rss>

