0

As far as I know, ZINB has two parts: zero-inflation portion and count portion. I think the zero-inflation part is similar to glm and the second one is more related to negative binomial. Therefore, I expect that the coefficients of the zero-inflation portion become the same as glm. Here is a toy example:

A <- structure(list(numeracy = c(6.6, 7.1, 7.3, 7.5, 7.9, 7.9, 8, 
                                 8.2, 8.3, 8.3, 8.4, 8.4, 8.6, 8.7, 8.8, 8.8, 9.1, 9.1, 9.1, 9.3, 
                                 9.5, 9.8, 10.1, 10.5, 10.6, 10.6, 10.6, 10.7, 10.8, 11, 11.1, 
                                 11.2, 11.3, 12, 12.3, 12.4, 12.8, 12.8, 12.9, 13.4, 13.5, 13.6, 
                                 13.8, 14.2, 14.3, 14.5, 14.6, 15, 15.1, 15.7), 
                    anxiety = c(13.8, 14.6, 17.4, 14.9, 13.4, 13.5, 13.8, 16.6, 13.5, 15.7, 13.6, 14,
                                16.1, 10.5, 16.9, 17.4, 13.9, 15.8, 16.4, 14.7, 15, 13.3, 10.9,
                                12.4, 12.9, 16.6, 16.9, 15.4, 13.1, 17.3, 13.1, 14, 17.7, 10.6,
                                14.7, 10.1, 11.6, 14.2, 12.1, 13.9, 11.4, 15.1, 13, 11.3, 11.4,
                                10.4, 14.4, 11, 14, 13.4), 
                    success = c(0L, 0L, 0L, 1L, 0L, 1L, 0L, 0L, 1L, 0L, 1L, 1L, 0L, 1L, 0L, 0L, 
                                0L, 0L, 0L, 1L, 0L, 0L, 1L, 1L, 1L, 0L, 0L, 0L, 1L, 0L, 1L, 0L, 
                                0L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L)), 
               .Names = c("numeracy", "anxiety", "success"), row.names = c(NA, -50L), class = "data.frame")

Then I applied glm

glm((1-success) ~ numeracy + anxiety, data = A, binomial)
#Coefficients:
#(Intercept)     numeracy      anxiety  
#  -14.2386      -0.5774       1.3841  

and ZINB

zeroinfl(success ~ numeracy + anxiety, data = A)
#Zero-inflation model coefficients (binomial with logit link):
#(Intercept)     numeracy      anxiety  
#  -236.8667      -0.6188      15.9963  

I expect to see the same coefficients. What did I miss here?

Elnaz
  • 111
  • 2
  • 6
  • This is a statistical question, not a programming one, so your question would be better suited at stats.stackexchange. In short, combining the models is different than fitting them separately. The NB model will also predict some zeros, so the zero inflation doesn't need to account for **all** of them. – Gregor Thomas Feb 04 '21 at 03:33
  • Thank you so much. Can we see what are those zeros calculated by NB? @GregorThomas – Elnaz Feb 04 '21 at 03:43
  • Also, the `predict` function only gives the final output of ZINB. Can I have access to the intermediate `predict` related to the zero-inflation portion? I need only "probabilities" and not "count" for a specific problem. – Elnaz Feb 04 '21 at 03:45
  • Your statistical assumptions are not correct. The equivalent glm coefficients would only occur if there were no zeroes predicted but the negbin (or Poisson)model. – IRTFM Feb 04 '21 at 04:54

0 Answers0