<?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 PLM and Zero Inflated Model Prediction in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-PLM-and-Zero-Inflated-Model-Prediction/m-p/164581#M8600</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It actually doesn't.&amp;nbsp; The results from proc genmod predict take both models into account.&amp;nbsp; The results from proc plm only apply the poisson or negative binomial model, not the logit model.&amp;nbsp; The predictions are different.&amp;nbsp; Consider this self contained code.&amp;nbsp; It generates a poisson distribution, forces 50% to 0, models and predicts with genmod, and then predicts with plm.&amp;nbsp; The predictions are different.&amp;nbsp; I calculated the results by hand, and plm matched using the poisson coeff's only. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA DIST (KEEP=X0-X2);&lt;/P&gt;&lt;P&gt; CALL STREAMINIT(4321);&lt;/P&gt;&lt;P&gt; BETA0 = 1; BETA1 = .2;&lt;/P&gt;&lt;P&gt; DO I = 1 TO 1000;&lt;/P&gt;&lt;P&gt;&amp;nbsp; X0 = RAND("Bernoilli", .5);&lt;/P&gt;&lt;P&gt;&amp;nbsp; X1 = RAND("Uniform");&lt;/P&gt;&lt;P&gt;&amp;nbsp; X2 = RAND("Poisson", EXP((BETA1*X1)+BETA0)) * X0;&lt;/P&gt;&lt;P&gt; OUTPUT;&lt;/P&gt;&lt;P&gt; END;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;PROC UNIVARIATE DATA=DIST NOPRINT;&lt;/P&gt;&lt;P&gt; HISTOGRAM X1-X2;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;PROC GENMOD DATA = DIST; /*ZERO INFLATED POISSON*/&lt;/P&gt;&lt;P&gt; MODEL X2 = X1 / DIST = ZIP;&lt;/P&gt;&lt;P&gt; ZEROMODEL X1 / LINK = LOGIT;&lt;/P&gt;&lt;P&gt; STORE OUT=MOD;&lt;/P&gt;&lt;P&gt; OUTPUT OUT=PRED PRED=ESTIMATE;&lt;/P&gt;&lt;P&gt; *ODS OUTPUT PARAMETERESTIMATES=PE MODELFIT=MFIT ZEROPARAMETERESTIMATES=ZEROPE;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;PROC PLM SOURCE=MOD;&lt;/P&gt;&lt;P&gt; SCORE DATA=DIST OUT=PRED2 / ILINK;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Nov 2014 21:43:40 GMT</pubDate>
    <dc:creator>cjohnson</dc:creator>
    <dc:date>2014-11-13T21:43:40Z</dc:date>
    <item>
      <title>Proc PLM and Zero Inflated Model Prediction</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-PLM-and-Zero-Inflated-Model-Prediction/m-p/164575#M8594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have data that has been modeled with Proc Genmod using a zero inflated negative binomial model.&amp;nbsp; The original data had 85% zeros. However, when applying the Proc PLM to predict on the original dataset, it appears to only be using the negative binomial model, and ignoring the logistic model to select 0's.&amp;nbsp; The predicted data shows all nonzero values.&amp;nbsp; Am I applying these procs incorrectly?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROC GENMOD DATA = TESTING.CLAIMS, &lt;/P&gt;&lt;P&gt;MODEL TTD_DAYS_PAID = ODCUM TRAUMA AGE /DIST = ZINB;&lt;/P&gt;&lt;P&gt;ZEROMODEL ODCUM TRAUMA AGE / LINK = LOGIT;&lt;/P&gt;&lt;P&gt;STORE OUT=TESTING.ZINBMOD;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;PROC PLM SOURCE=TESTING.ZINBMOD;&lt;/P&gt;&lt;P&gt;SCORE DATA=TESTING.CLAIMS OUT=TESTING.CLAIMSPRED / ILINK;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2014 19:04:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-PLM-and-Zero-Inflated-Model-Prediction/m-p/164575#M8594</guid>
      <dc:creator>cjohnson</dc:creator>
      <dc:date>2014-11-10T19:04:06Z</dc:date>
    </item>
    <item>
      <title>Re: Proc PLM and Zero Inflated Model Prediction</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-PLM-and-Zero-Inflated-Model-Prediction/m-p/164576#M8595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That is the correct specification.&amp;nbsp; Equivalently, but more simply, just use the PRED= option in the OUTPUT statement of PROC GENMOD to get the predicted values.&amp;nbsp; Compare these predicted values to those you get from fitting just a negative binomial model to see the effect of the zero-inflated model. See &lt;A href="http://support.sas.com/kb/44/354.html"&gt;this note&lt;/A&gt; that gives more information.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2014 20:17:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-PLM-and-Zero-Inflated-Model-Prediction/m-p/164576#M8595</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2014-11-11T20:17:23Z</dc:date>
    </item>
    <item>
      <title>Re: Proc PLM and Zero Inflated Model Prediction</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-PLM-and-Zero-Inflated-Model-Prediction/m-p/164577#M8596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks.&amp;nbsp; I tried this, and I get smaller number for the prediction on the same rows, but still no 0's.&amp;nbsp; I just looked at the item store and saw the note that it only contains the negative binomial portion of the model. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How would I use Proc PLM to evaluate the zero-inflated (binomial) portion of the model, if its definition is not in the store?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, using the PRED= option, is this utilizing both models?&amp;nbsp; If so, is there a reason that I still don't get 0's?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks very much!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2014 20:32:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-PLM-and-Zero-Inflated-Model-Prediction/m-p/164577#M8596</guid>
      <dc:creator>cjohnson</dc:creator>
      <dc:date>2014-11-11T20:32:19Z</dc:date>
    </item>
    <item>
      <title>Re: Proc PLM and Zero Inflated Model Prediction</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-PLM-and-Zero-Inflated-Model-Prediction/m-p/164578#M8597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The predicted values from the SCORE statement in PROC PLM, as well as those from the PRED= option in the OUTPUT statement in PROC GENMOD, are the correct predicted values for the fitted zero-inflated negative binomial model.&amp;nbsp; Apparently none of the predictor settings in your SCORE DATA= data set result in predicted values of zero.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Nov 2014 18:43:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-PLM-and-Zero-Inflated-Model-Prediction/m-p/164578#M8597</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2014-11-12T18:43:54Z</dc:date>
    </item>
    <item>
      <title>Re: Proc PLM and Zero Inflated Model Prediction</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-PLM-and-Zero-Inflated-Model-Prediction/m-p/164579#M8598</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Proc PLM used the Store variable which houses the parameter estimates.&amp;nbsp; When you view this Store, it explicitly states that it is only the negative binomial portion, and when I checked the parameters, they did not include the logit parameters. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Nov 2014 19:45:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-PLM-and-Zero-Inflated-Model-Prediction/m-p/164579#M8598</guid>
      <dc:creator>cjohnson</dc:creator>
      <dc:date>2014-11-12T19:45:47Z</dc:date>
    </item>
    <item>
      <title>Re: Proc PLM and Zero Inflated Model Prediction</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-PLM-and-Zero-Inflated-Model-Prediction/m-p/164580#M8599</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunately the SHOW ALL info produced by PROC PLM &lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri',sans-serif; color: #1f497d;"&gt;does not reflect the fact that the PLM SCORE statement works fully with zero inflated models.&amp;nbsp; Since only the SCORE statement fully supports the ZI models currently, this information has not been updated.&amp;nbsp; But the predicted values from the SCORE statement are correct as evidenced by their agreement with the predicted values from PROC GENMOD.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Nov 2014 21:26:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-PLM-and-Zero-Inflated-Model-Prediction/m-p/164580#M8599</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2014-11-13T21:26:48Z</dc:date>
    </item>
    <item>
      <title>Re: Proc PLM and Zero Inflated Model Prediction</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-PLM-and-Zero-Inflated-Model-Prediction/m-p/164581#M8600</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It actually doesn't.&amp;nbsp; The results from proc genmod predict take both models into account.&amp;nbsp; The results from proc plm only apply the poisson or negative binomial model, not the logit model.&amp;nbsp; The predictions are different.&amp;nbsp; Consider this self contained code.&amp;nbsp; It generates a poisson distribution, forces 50% to 0, models and predicts with genmod, and then predicts with plm.&amp;nbsp; The predictions are different.&amp;nbsp; I calculated the results by hand, and plm matched using the poisson coeff's only. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA DIST (KEEP=X0-X2);&lt;/P&gt;&lt;P&gt; CALL STREAMINIT(4321);&lt;/P&gt;&lt;P&gt; BETA0 = 1; BETA1 = .2;&lt;/P&gt;&lt;P&gt; DO I = 1 TO 1000;&lt;/P&gt;&lt;P&gt;&amp;nbsp; X0 = RAND("Bernoilli", .5);&lt;/P&gt;&lt;P&gt;&amp;nbsp; X1 = RAND("Uniform");&lt;/P&gt;&lt;P&gt;&amp;nbsp; X2 = RAND("Poisson", EXP((BETA1*X1)+BETA0)) * X0;&lt;/P&gt;&lt;P&gt; OUTPUT;&lt;/P&gt;&lt;P&gt; END;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;PROC UNIVARIATE DATA=DIST NOPRINT;&lt;/P&gt;&lt;P&gt; HISTOGRAM X1-X2;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;PROC GENMOD DATA = DIST; /*ZERO INFLATED POISSON*/&lt;/P&gt;&lt;P&gt; MODEL X2 = X1 / DIST = ZIP;&lt;/P&gt;&lt;P&gt; ZEROMODEL X1 / LINK = LOGIT;&lt;/P&gt;&lt;P&gt; STORE OUT=MOD;&lt;/P&gt;&lt;P&gt; OUTPUT OUT=PRED PRED=ESTIMATE;&lt;/P&gt;&lt;P&gt; *ODS OUTPUT PARAMETERESTIMATES=PE MODELFIT=MFIT ZEROPARAMETERESTIMATES=ZEROPE;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;PROC PLM SOURCE=MOD;&lt;/P&gt;&lt;P&gt; SCORE DATA=DIST OUT=PRED2 / ILINK;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Nov 2014 21:43:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-PLM-and-Zero-Inflated-Model-Prediction/m-p/164581#M8600</guid>
      <dc:creator>cjohnson</dc:creator>
      <dc:date>2014-11-13T21:43:40Z</dc:date>
    </item>
    <item>
      <title>Re: Proc PLM and Zero Inflated Model Prediction</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-PLM-and-Zero-Inflated-Model-Prediction/m-p/164582#M8601</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Before we get too far into this, it is possible that it was corrected in an update that my company doesn't have.&amp;nbsp; We run a enterprise edition, so it isn't possible to update frequently.&amp;nbsp; We are running SAS and EG 4.2 and 9.3.&amp;nbsp; I know these aren't the latest versions, but I thought the zero-inflated models were added in 4.2.&amp;nbsp; If you can run my code above and get matching results through either method, then that may not be the case.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Nov 2014 02:56:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-PLM-and-Zero-Inflated-Model-Prediction/m-p/164582#M8601</guid>
      <dc:creator>cjohnson</dc:creator>
      <dc:date>2014-11-14T02:56:41Z</dc:date>
    </item>
    <item>
      <title>Re: Proc PLM and Zero Inflated Model Prediction</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-PLM-and-Zero-Inflated-Model-Prediction/m-p/164583#M8602</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You'll need SAS 9.4 TS1M1 or the current SAS 9.4 TS1M2.&amp;nbsp; The release of EG is immaterial.&amp;nbsp; Prior releases should issue an error from PROC PLM saying that scoring of zero-inflated models is not available.&amp;nbsp; In the two releases above, predicted results from a zero-inflated model in GENMOD and PLM are identical.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Nov 2014 18:26:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-PLM-and-Zero-Inflated-Model-Prediction/m-p/164583#M8602</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2014-11-14T18:26:10Z</dc:date>
    </item>
    <item>
      <title>Re: Proc PLM and Zero Inflated Model Prediction</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-PLM-and-Zero-Inflated-Model-Prediction/m-p/164584#M8603</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks.&amp;nbsp; I was not getting any error or warning message, so I was not aware.&amp;nbsp; I work toward getting the upgrade.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Nov 2014 19:00:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-PLM-and-Zero-Inflated-Model-Prediction/m-p/164584#M8603</guid>
      <dc:creator>cjohnson</dc:creator>
      <dc:date>2014-11-14T19:00:57Z</dc:date>
    </item>
  </channel>
</rss>

