0
votes

I am using Zero-inflation Poisson (zip) and Zero-inflation negative binomial (zinb) regressions to detect temporal trends in count data (death per year for 30 years reported at 6 hospitals) that has may zeros and Overdispersion. I have written some codes using pscl package and my goal is to compare trends among hospitals.

Counts<- read.csv("data.csv", header = T)
Years= Counts$X
Ho1= Counts$Ho1
Ho2= Counts$Ho2
Ho3= Counts$Ho3
...  .........
... ..........
require(pscl)

zip1 <- zeroinfl(Ho1 ~ Years, dist = "poisson")

zinb4 <- zeroinfl(Ho4 ~ Years, dist = "negbin")

But when I plot some of the data it shows slightly increasing trends whereas the zip and zinb show negative trends

Here is an example:

zip result:

zip1
    Call:
    zeroinfl(formula = Ho1 ~ Years, dist = "poisson")

Count model coefficients (poisson with log link):
(Intercept)        Years  
  -4.836815     0.002837  

Zero-inflation model coefficients (binomial with logit link):
(Intercept)        Years  
   467.2323      -0.2353

for this model the trend (slope) is -0.235 and when I used ordinary least squares (OLS) the trend= 0.043. My understanding is that both zip and OLS should differ slightly.

So I was thinking maybe my codes are not correct or I am missing something.

I would appreciate any thoughts and suggestion

1
I fear, if you're earnestly interested in getting help, you won't get around providing a reproducible example... - Andri Signorell

1 Answers

0
votes

With increasing Years you get increasing counts (= higher responses and less zeros) and you get decreasing zero inflation (= higher responses and less zeros). Thus, the effects in both components of the model appear to be in sync and conform with your OLS results.