Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Zinb predictions


From   "Steichen, Thomas J." <[email protected]>
To   <[email protected]>
Subject   st: Zinb predictions
Date   Mon, 12 Mar 2007 12:52:17 -0400

List members,

Below is (version 9.2) output from the -zinb- program using the example 
data from the manual.  In this data, "count" is the number of fish caught 
by visitors to a national park and "persons", "livebait", "child" and 
"camper" are covariates.

 . use http://www.stata-press.com/data/r9/fish

 . zinb count persons livebait, inflate(child camper) nolog

Zero-inflated negative binomial regression  Number of obs   =        250
                                            Nonzero obs     =        108
                                            Zero obs        =        142

Inflation model = logit                     LR chi2(2)      =      82.23
Log likelihood  = -401.5478                 Prob > chi2     =     0.0000

------------------------------------------------------------------------
         |      Coef.   Std. Err.    z    P>|z|     [95% Conf. Interval]
---------+--------------------------------------------------------------
count    |
 persons |   .9742984   .1034938   9.41   0.000     .7714543    1.177142
livebait |   1.557523   .4124424   3.78   0.000     .7491503    2.365895
   _cons |  -2.730064    .476953  -5.72   0.000    -3.664874   -1.795253
---------+--------------------------------------------------------------
inflate  |
   child |   3.185999   .7468551   4.27   0.000      1.72219    4.649808
  camper |  -2.020951    .872054  -2.32   0.020    -3.730146   -.3117567
   _cons |  -2.695385   .8929071  -3.02   0.003     -4.44545   -.9453189
---------+--------------------------------------------------------------
/lnalpha |   .5110429   .1816816   2.81   0.005     .1549535    .8671323
---------+--------------------------------------------------------------
   alpha |   1.667029   .3028685                    1.167604    2.380076
------------------------------------------------------------------------

After fitting the model, one can use the -predict- command to generate 
the predicted number of events (ie., the number of fish caught):

 . predict pn

This works fine, however, to verify I understand what the model really is,
I'm trying to manually calculate the predicted number of events from the 
values of the variables and the model coefficients. 

So far, I'm failing miserably!

Can anyone suggest how to use these coefficients to manually generate
predicted # of events?

Tom

-----------------------------------
Thomas J. Steichen
[email protected]
-----------------------------------
 

-----------------------------------------
CONFIDENTIALITY NOTE: This e-mail message, including any
attachment(s), contains information that may be confidential,
protected by the attorney-client or other legal privileges, and/or
proprietary non-public information. If you are not an intended
recipient of this message or an authorized assistant to an intended
recipient, please notify the sender by replying to this message and
then delete it from your system. Use, dissemination, distribution,
or reproduction of this message and/or any of its attachments (if
any) by unintended recipients is not authorized and may be
unlawful.


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index