0

I am trying to find a good way of reporting the inverted odds ratios of a zero-inflated negative binomial model in R (command zeroinfl in pscl). I'll try to illustrate my question by using the example from UCLA (http://www.ats.ucla.edu/stat/r/dae/zinbreg.htm).

m1 <- zeroinfl(count ~ child + camper | persons,
data = zinb, dist = "negbin", EM = TRUE)
summary(m1)

## Call:

zeroinfl(formula = count ~ child + camper | persons, data = zinb, 
##     dist = "negbin", EM = TRUE)
## Pearson residuals:
##    Min     1Q Median     3Q    Max 
## -0.586 -0.462 -0.389 -0.197 18.013 
## 
## Count model coefficients (negbin with log link):
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept)    1.371      0.256    5.35  8.6e-08 ***
## child         -1.515      0.196   -7.75  9.4e-15 ***
## camper1        0.879      0.269    3.26   0.0011 ** 
## Log(theta)    -0.985      0.176   -5.60  2.1e-08 ***
## 
## Zero-inflation model coefficients (binomial with logit link):
##             Estimate Std. Error z value Pr(>|z|)  
## (Intercept)    1.603      0.836    1.92    0.055 .
## persons       -1.666      0.679   -2.45    0.014 *
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

So now what I would like to do is to report the results so that there would be:

  • Exponentiated count model estimes and their CIs (in this example for the variables child and camper)
  • Exponentiated and inverted zero model estimates (= ORs) and their CIs (so that the ORs would show the odds ratio for "1" instead of "0") (in this example for the variable persons)

The closest I have been able to get is with the following quite primitive code (I'm not that familiar with R yet):

For the zero part of the model:

1/(exp(coef(m1, "zero"))) # to get the inverted ORs
1/exp(confint(m1)) # to get the CIs of the inverted ORs

For the count part of the model:

exp(coef(m1, "count")) # to get the incidence rate ratios(?)
exp(confint(m1))

So basically I am nowhere near reporting these neatly in a table using stargazer etc... Any kind of advice on how to get even a bit closer to a reasonable way of reporting the results would be highly appreciated!

  • It's been a while since I used zero-inflated models so I'll defer to someone else about whether inverting an odds ratio is a good idea - but clearly it doesn't look appropriate for the confidence interval. You would be inverting the order. The lower bound would be greater than the upper bound! `1/exp(confint(m1))` – Chrisss Oct 21 '16 at 19:51
  • Check out [this](http://stackoverflow.com/questions/16236560/odds-ratios-instead-of-logits-in-stargazer-latex-output). It describes how to exponentiate coefficients and CIs in stargazer using the `apply.=` options. Don't miss the note about standard errors! With this method, you may not be able to get incidence risk ratios AND inverted odds ratios for the zero part, since I think you can only pass one argument to the `apply.=` option. – paqmo Oct 21 '16 at 22:47
  • Thanks for your comments! Yeah, inverting is problematic at least for the confidence intervals as the order also changes. However, it seems that they have been reported in tables of some publications with count data on the same field of research as my data (I'm guessing that the authors inverted the order again when reporting the results). And thanks for the tip regarding Stargazer! I did some preliminary testing and it seems that Stargazer only reports the count part of the model. However, if I could get that to work for multiple models in one table, that would help at least a little! – Sauli Jappinen Oct 23 '16 at 07:10
  • @SauliJappinen There is an option in stargazer (amongst the millions of them) to show the zero inflation logistic component of the regression: `zero.component = TRUE`. – paqmo Oct 23 '16 at 13:26
  • @paqmo: great, thanks a lot, I'll try that! – Sauli Jappinen Oct 23 '16 at 18:37

0 Answers0