Can anyone show how to estimated the π of the zero-inflated-Poisson?

f(y)=π+(1−π)e^(−λ), if y=0;

=(1−π)λ^ye^(−λ)/y!, if y=1,2....

where π is the probability that the observation is zero by a binomial process and λ is the mean of the Poisson. zero inflated Poisson

I use zeroinfl to get the estimated coefficients, but I do not know how to get π:

zeroinfl(formula = Lambda ~ Profil + Trace + Larg + Long + Reg + Vit + Racc + Momcorr | Profil + Trace + Larg + Long + Reg + Vit + Racc + Momcorr, data = LambdaData)

Count model coefficients (poisson with log link):

             Estimate     Std. Error   z value  Pr(>|z|) 
(Intercept)  -5.320e+00    1.263e+00  -4.212   2.53e-05 
 Profil       5.560e-02    2.098e-01   0.265   0.790958    
 Trace        3.455e-01    1.013e-01   3.409   0.000652
 Larg         3.630e-02    6.828e-02   0.532   0.594990    
 Long         5.674e-03    1.826e-02   0.311   0.756018    
 Reg         -2.828e-02    7.315e-01  -0.039   0.969163    
 Vit          4.495e-05    2.629e-03   0.017   0.986358    
 Racc         5.281e-01    4.964e-01   1.064   0.287449    
 Momcorr      3.699e-03    6.009e-04   6.156   7.48e-10 

Zero-inflation model coefficients (binomial with logit link):

            Estimate   Std. Error   z value  Pr(>|z|)  
(Intercept)  7.070353     1.990167   3.553   0.000381 
Profil       0.678794     0.435449   1.559   0.119035    
Trace        0.203185     0.250496   0.811   0.417291    
Larg        -0.340889     0.191298  -1.782   0.074753   
Long        -0.041204     0.065708  -0.627   0.530607    
Reg         -3.507487     1.522579  -2.304   0.021242   
Vit         -0.011700     0.005227  -2.238   0.025203   
Racc        -0.336626     1.135956  -0.296   0.766973    
Momcorr     -0.025258     0.012428  -2.032   0.042120   

Number of iterations in BFGS optimization: 68 Log-likelihood: -2589 on 18 Df

  • $\begingroup$ Welcome to Cross Validated. Can you clarify if you are trying to calculate it manually or obtain it from the package you are using? Note that if you are asking about how to obtain it from your statistical package that it is off-topic for this site, and may be closed $\endgroup$ – Marquis de Carabas Nov 9 '16 at 18:02
  • $\begingroup$ I think there is a way to calculate it through the estimation results of "zeroinfl" function. $\endgroup$ – enzo liang Nov 10 '16 at 9:33

In zeroinfl() link functions are used to link the two parameters $\lambda$ and $\pi$ to the two sets of regressors $x$ and $z$. By default (as in your example), log and logit link functions are used, i.e., $\log(\lambda) = x^\top \beta$ and $\text{logit}(\pi) = z^\top \beta$. This is explained in vignette("countreg", package = "pscl") in Section 2.3. In your case $x = z$.

To obtain predictions for $\lambda$ and $\pi$ from a fitted zeroinfl object, obj say, you can use predict(obj, type = "count") and predict(obj, type = "zero"), respectively. Note that these are different from predict(obj, type = "response") (the expectation of the zero-inflated response) and predict(obj, type = "prob")[,1] (the probability of observing a zero).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.