Skip to main content

Zero-Inflated Poisson and Negative Binomial: Why Do Some PhD Students Publish Nothing?

Zero-inflated Poisson and negative binomial regression in R, by hand and with pscl::zeroinfl(), on the articles of 915 PhD students in biochemistry: two kinds of zeros, how to read the two parts, expected counts and the probability of a structural zero, rootograms, comparison with Poisson, negative binomial and hurdle models by AIC, BIC, Vuong’s test and a parametric bootstrap, why many zeros do not mean zero inflation, and APA reporting.

The question: two kinds of nothing

Of 915 PhD students in biochemistry, 275 published no article in the last three years of their studies. Why not?

There may be two kinds of them. Some were never going to publish: they planned a career outside research, or their laboratory does not publish with students. For them the number is zero by nature. Others could have published, and worked on it, but it happened that nothing appeared in those three years. The data show the same 0 for both.

Zero-inflated models (Lambert, 1992) say exactly this: the zeros come from two sources. One part of the model says who is in the group of certain zeros. The other is an ordinary count model (Poisson or negative binomial) for everybody else, which produces zeros too. They are popular, easy to fit, and easy to over-interpret. Many zeros do not prove that there are two kinds of them. This page fits the models and then asks whether they are needed.

Code
library(pscl)       # zeroinfl(), hurdle(), vuong(); the data are also in this package
library(MASS)       # glm.nb(): negative binomial regression (comes with R)
library(ggplot2)

model_colours <- c(Poisson = "#eb6834", ZIP = "#eda100", NB = "#2a78d6", ZINB = "#1baf7a")

# number formats for the text
f0   <- function(x) formatC(x, format = "f", digits = 0, big.mark = ",")
f1   <- function(x) formatC(x, format = "f", digits = 1, big.mark = ",")
f2   <- function(x) formatC(x, format = "f", digits = 2, big.mark = ",")
f3   <- function(x) formatC(x, format = "f", digits = 3, big.mark = ",")
# no leading zero
nz <- function(x, d = 2) sub("^(-?)0", "\\1", formatC(x, format = "f", digits = d))
pval <- function(p) if (p < .001) "< .001" else paste("=", nz(p, 3))
pct  <- function(x, d = 0) paste0(formatC(100 * x, format = "f", digits = d), "%")

1. The data

The data were collected by J. Scott Long (1990) for a study of sex differences in science:

Code
phd <- read.csv("https://vincentarelbundock.github.io/Rdatasets/csv/pscl/bioChemists.csv")
phd <- with(
  phd,
  data.frame(
    articles = art,
    female = as.integer(fem == "Women"),
    married = as.integer(mar == "Married"),
    kids = kid5,
    prestige = phd,
    mentor = ment
  )
)
str(phd)
'data.frame':   915 obs. of  6 variables:
 $ articles: int  0 0 0 0 0 0 0 0 0 0 ...
 $ female  : int  0 1 1 0 1 1 1 0 0 1 ...
 $ married : int  1 0 0 1 0 1 0 1 0 1 ...
 $ kids    : int  0 0 0 1 0 2 0 2 0 0 ...
 $ prestige: num  2.52 2.05 3.75 1.18 3.75 ...
 $ mentor  : int  7 6 6 3 26 2 3 4 6 0 ...
Code
c(
  students = nrow(phd),
  mean = mean(phd$articles),
  variance = var(phd$articles),
  zeros = sum(phd$articles == 0)
)
  students       mean   variance      zeros 
915.000000   1.692896   3.709742 275.000000 

articles is the number of articles in the last three years of the PhD, kids the number of children under 6, prestige the prestige of the department (1 to 5) and mentor the number of articles of the student’s mentor in the same time.


2. Look at the data

Code
ggplot(phd, aes(articles)) +
  geom_bar(fill = "#2a78d6") +
  scale_x_continuous(breaks = 0:19) +
  labs(title = "Articles of 915 PhD students", x = "articles in three years", y = "students") +
  theme_bw()

Plot: 2. Look at the data

Code
expected_zero <- dpois(0, mean(phd$articles)) * nrow(phd)
expected_zero
[1] 168.3471

The mean is 1.69. A Poisson distribution with this mean would have 168 zeros; there are 275. But it would also have a variance of 1.69, and the variance is 3.71, overdispersed. Too many zeros are one sign of overdispersion, and a long tail to the right is another. Both can come from the same cause: students differ in more ways than we have measured.


3. The model step by step, with formulas

Step 1: the count part

For the students who can publish, a count distribution with mean \(\mu_i = \exp(x_i^\top\beta)\). Either Poisson, or negative binomial with variance \(\mu + \mu^2/\theta\).

Step 2: the zero part

With probability \(\pi_i\) a student belongs to the group that never publishes (a structural zero):

\[\log\frac{\pi_i}{1 - \pi_i} = z_i^\top\gamma\]

Step 3: put together

\[P(y_i = 0) = \pi_i + (1 - \pi_i)\, f(0 \mid \mu_i), \qquad P(y_i = k) = (1 - \pi_i)\, f(k \mid \mu_i) \;\text{ for } k \ge 1\]

A zero can come from either source. Anything else can only come from the count part. The mean is \(E(y_i) = (1 - \pi_i)\,\mu_i\).

Step 4: the difference from a hurdle model

A hurdle model has one kind of zero, and its count part cannot produce zeros. So its zero part says “any article or none”, and the zero part of a zero-inflated model says “in the group that never publishes”. The signs are opposite, and the meanings differ. This is the most common mistake in reading the output.

Step 5: maximum likelihood, by hand

Code
X <- model.matrix(~ female + married + kids + prestige + mentor, data = phd)
y <- phd$articles
k <- ncol(X)
minus_loglik <- function(par) {                              # zero-inflated Poisson
  mu <- exp(drop(X %*% par[1:k])); p <- plogis(drop(X %*% par[k + 1:k]))
  -sum(log(ifelse(y == 0, p + (1 - p) * dpois(0, mu), (1 - p) * dpois(y, mu))))
}
pois  <- glm(articles ~ female + married + kids + prestige + mentor, family = poisson, data = phd)
start <- c(coef(pois), -1, rep(0, k - 1))
hand  <- optim(start, minus_loglik, method = "BFGS", control = list(maxit = 1000, reltol = 1e-12))
zip <- zeroinfl(
  articles ~ female + married + kids + prestige + mentor,
  data = phd,
  dist = "poisson"
)
c(by_hand = -hand$value, zeroinfl = as.numeric(logLik(zip)))
  by_hand  zeroinfl 
-1604.773 -1604.773 
Code
both <- rbind(by_hand = hand$par[c(1:2, k + 6)], zeroinfl = unname(coef(zip))[c(1:2, k + 6)])
colnames(both) <- c("(Intercept)", "female", "zero part: (Intercept)")
round(both, 3)
         (Intercept) female zero part: (Intercept)
by_hand        0.641 -0.209                 -0.134
zeroinfl       0.641 -0.209                 -0.134

4. Fitting the models and reading the output

Four models: Poisson, negative binomial, and their zero-inflated versions.

Code
nb   <- glm.nb(articles ~ female + married + kids + prestige + mentor, data = phd)
zinb <- zeroinfl(
  articles ~ female + married + kids + prestige + mentor,
  data = phd,
  dist = "negbin"
)
summary(zinb)

Call:
zeroinfl(formula = articles ~ female + married + kids + prestige + 
    mentor, data = phd, dist = "negbin")

Pearson residuals:
    Min      1Q  Median      3Q     Max 
-1.2942 -0.7601 -0.2909  0.4448  6.4155 

Count model coefficients (negbin with log link):
              Estimate Std. Error z value Pr(>|z|)    
(Intercept)  0.4167465  0.1435966   2.902  0.00371 ** 
female      -0.1955068  0.0755926  -2.586  0.00970 ** 
married      0.0975826  0.0844520   1.155  0.24789    
kids        -0.1517325  0.0542061  -2.799  0.00512 ** 
prestige    -0.0007001  0.0362697  -0.019  0.98460    
mentor       0.0247862  0.0034927   7.097 1.28e-12 ***
Log(theta)   0.9763565  0.1354695   7.207 5.71e-13 ***

Zero-inflation model coefficients (binomial with logit link):
            Estimate Std. Error z value Pr(>|z|)   
(Intercept) -0.19169    1.32282  -0.145  0.88478   
female       0.63593    0.84892   0.749  0.45379   
married     -1.49947    0.93867  -1.597  0.11017   
kids         0.62843    0.44278   1.419  0.15582   
prestige    -0.03771    0.30801  -0.122  0.90254   
mentor      -0.88229    0.31623  -2.790  0.00527 **
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 

Theta = 2.6548 
Number of iterations in BFGS optimization: 43 
Log-likelihood: -1550 on 13 Df
Code
cnt <- summary(zinb)$coefficients$count; zer <- summary(zinb)$coefficients$zero
irr <- exp(cnt[, 1]); orz <- exp(zer[, 1])

The output has two tables.

  • Count model: the students who can publish. \(e^\beta\) is a ratio of expected counts. Women: 0.82 times as many articles as men (p = .010). Each child under 6: 0.86 times. Each article of the mentor: 1.025 times.
  • Zero-inflation model: who is in the group that never publishes. A positive coefficient means more likely to be a certain zero. The only clear one is the mentor: each of the mentor’s articles multiplies the odds of being a certain zero by 0.41 (p = .005). A student with an active mentor is hardly ever in that group.
  • Log(theta): \(\theta\) = 2.65. The smaller, the more the students still differ.

By the rest of the table we cannot say much about who the certain zeros are: the standard errors of the zero part are large. A student whose mentor published nothing and one whose mentor published ten articles:

Code
two <- data.frame(female = 0, married = 1, kids = 0, prestige = 3, mentor = c(0, 10))
pr <- data.frame(
  mentor = two$mentor,
  certain_zero = predict(zinb, two, type = "zero"),
  mean_if_not = predict(zinb, two, type = "count"),
  overall_mean = predict(zinb, two, type = "response"),
  chance_of_0 = predict(zinb, two, type = "prob")[, 1]
)
round(pr, 3)
  mentor certain_zero mean_if_not overall_mean chance_of_0
1      0        0.141       1.669        1.433       0.377
2     10        0.000       2.138        2.138       0.208

5. Do we need it? Four ways to ask

The zeros, and everything else

Code
hurdle_nb <- hurdle(
  articles ~ female + married + kids + prestige + mentor,
  data = phd,
  dist = "negbin"
)
zeros <- c(
  observed = sum(y == 0),
  Poisson = sum(dpois(0, fitted(pois))),
  ZIP = sum(predict(zip, type = "prob")[, 1]),
  NB = sum(dnbinom(0, mu = fitted(nb), size = nb$theta)),
  ZINB = sum(predict(zinb, type = "prob")[, 1])
)
round(zeros, 1)
observed  Poisson      ZIP       NB     ZINB 
   275.0    191.4    273.2    277.8    285.4 

Poisson expects 191 zeros instead of 275. But the plain negative binomial expects 278, without any zero inflation. It has one parameter more than Poisson, and it repairs the zeros and the tail at the same time. ZIP expects 273.

A rootogram compares all the counts (Kleiber & Zeileis, 2016). The bars are the observed frequencies, hanging from the expected ones, on a square-root scale. A bar that ends above the zero line means too few observed, one that goes below it too many.

Code
kmax <- 10
expected <- list(
  Poisson = sapply(0:kmax, function(j) sum(dpois(j, fitted(pois)))),
  ZIP     = colSums(predict(zip, type = "prob"))[1:(kmax + 1)],
  NB      = sapply(0:kmax, function(j) sum(dnbinom(j, mu = fitted(nb), size = nb$theta))),
  ZINB    = colSums(predict(zinb, type = "prob"))[1:(kmax + 1)])
observed <- sapply(0:kmax, function(j) sum(y == j))
roots <- do.call(
  rbind,
  lapply(names(expected), function(m) {
    data.frame(
      model = m,
      count = 0:kmax,
      top = sqrt(expected[[m]]),
      bottom = sqrt(expected[[m]]) - sqrt(observed)
    )
  })
)
roots$model <- factor(roots$model, levels = names(model_colours))

ggplot(roots, aes(count)) +
  geom_rect(
    aes(xmin = count - 0.4, xmax = count + 0.4, ymin = bottom, ymax = top),
    fill = "grey75"
  ) +
  geom_hline(yintercept = 0) +
  geom_line(aes(y = top, colour = model), linewidth = 0.9) +
  geom_point(aes(y = top, colour = model), size = 1.8) +
  facet_wrap(~model) +
  scale_colour_manual(values = model_colours, guide = "none") +
  scale_x_continuous(breaks = 0:kmax) +
  labs(
    title = "Rootograms: observed bars hanging from the expected curve",
    x = "articles",
    y = "square root of the frequency"
  ) +
  theme_bw()

Rootograms – The zeros, and everything else

The Poisson model fails everywhere. ZIP repairs the zero and misses the rest: it expects too few students with one article (the bar goes below the line), too many with three, and too few with six or seven. The NB and the ZINB both fit.

Information criteria

Code
models <- list(Poisson = pois, ZIP = zip, NB = nb, ZINB = zinb, `hurdle NB` = hurdle_nb)
crit <- data.frame(
  model = names(models),
  parameters = sapply(models, function(m) attr(logLik(m), "df")),
  logLik = sapply(models, function(m) as.numeric(logLik(m))),
  AIC = sapply(models, AIC),
  BIC = sapply(models, BIC),
  row.names = NULL
)
print(
  transform(crit, logLik = round(logLik, 1), AIC = round(AIC, 1), BIC = round(BIC, 1)),
  row.names = FALSE
)
     model parameters  logLik    AIC    BIC
   Poisson          6 -1651.1 3314.1 3343.0
       ZIP         12 -1604.8 3233.5 3291.4
        NB          7 -1561.0 3135.9 3169.6
      ZINB         13 -1550.0 3126.0 3188.6
 hurdle NB         13 -1552.6 3131.2 3193.8
Code
get <- function(m, col) crit[crit$model == m, col]

From Poisson to ZIP the AIC falls by 81. From Poisson to NB it falls by 178, with one parameter instead of six. The ZINB is 9.9 points better than the NB by AIC, and 19.0 points worse by BIC, which charges more for its six extra parameters. The two criteria disagree, and the evidence for a second kind of zero is weak.

Vuong’s test, and why not to use it here

Code
vt <- capture.output(vuong(nb, zinb))
cat(vt, sep = "\n")
Vuong Non-Nested Hypothesis Test-Statistic: 
(test-statistic is asymptotically distributed N(0,1) under the
 null that the models are indistinguishible)
-------------------------------------------------------------
              Vuong z-statistic             H_A  p-value
Raw                   -2.241831 model2 > model1 0.012486
AIC-corrected         -1.015385 model2 > model1 0.154961
BIC-corrected          1.939690 model1 > model2 0.026209

Vuong’s test compares two models that are not nested. It is printed in many papers as a “test of zero inflation”. But the NB is a special case of the ZINB (with \(\pi = 0\), which is at the edge of the possible values), so the conditions of the test do not hold, and its p value means little (Wilson, 2015). And the raw, AIC-corrected and BIC-corrected versions give three different answers.

A parametric bootstrap

The honest test simulates. Take the fitted NB (no inflation), generate new data from it, fit both models, and see how often the gain in likelihood is as large as ours by chance alone:

Code
gain <- 2 * (as.numeric(logLik(zinb)) - as.numeric(logLik(nb)))
set.seed(81)
gains <- replicate(200, {
  d <- phd
  d$articles <- rnbinom(nrow(d), mu = fitted(nb), size = nb$theta)
  a <- try(suppressWarnings(glm.nb(formula(nb), data = d)), silent = TRUE)
  z <- try(suppressWarnings(zeroinfl(formula(zinb), data = d, dist = "negbin")), silent = TRUE)
  if (inherits(a, "try-error") || inherits(z, "try-error")) {
    NA
  } else {
    2 * (as.numeric(logLik(z)) - as.numeric(logLik(a)))
  }
})
p_boot <- (1 + sum(gains >= gain, na.rm = TRUE)) / (1 + sum(!is.na(gains)))
cbind(
  value = c(
    our_gain = gain,
    mean_gain_without_inflation = mean(gains, na.rm = TRUE),
    p = p_boot,
    failed = sum(is.na(gains))
  )
)
                                 value
our_gain                    21.9349029
mean_gain_without_inflation  9.0123679
p                            0.0199005
failed                       0.0000000

Our gain is 21.9. Without any inflation the gain is 9.0 on average, and a gain as large as ours has the probability p = .020. So the ZINB describes something that the NB does not. The next section asks what.


6. What does the zero part really say?

The zero part depends almost entirely on the mentor. Students whose mentors published nothing are the “certain zeros”:

Code
grid <- data.frame(female = 0, married = 1, kids = 0, prestige = 3, mentor = 0:30)
grid$zero  <- predict(zinb, grid, type = "zero")
grid$ZINB  <- predict(zinb, grid, type = "response")
grid$NB    <- predict(nb, grid, type = "response")
long <- rbind(
  data.frame(mentor = grid$mentor, articles = grid$ZINB, model = "ZINB"),
  data.frame(mentor = grid$mentor, articles = grid$NB, model = "NB")
)
by_m <- aggregate(
  articles ~ cut(mentor, c(-1, 0, 2, 5, 10, 15, 20, 30, 80), labels = FALSE),
  data = phd,
  FUN = mean
)
by_m$mentor <- aggregate(
  mentor ~ cut(mentor, c(-1, 0, 2, 5, 10, 15, 20, 30, 80), labels = FALSE),
  data = phd,
  FUN = mean
)$mentor
ggplot(long, aes(mentor, articles, colour = model)) +
  geom_point(
    data = by_m,
    aes(mentor, articles),
    inherit.aes = FALSE,
    size = 2.4,
    colour = "grey30"
  ) +
  geom_line(linewidth = 1) +
  scale_colour_manual(values = model_colours, name = NULL) +
  coord_cartesian(xlim = c(0, 30)) +
  labs(
    title = "Expected articles and the mentor's articles",
    subtitle = "Points: mean of all students in groups of mentors. Lines: a married man without children",
    x = "articles of the mentor",
    y = "articles of the student"
  ) +
  theme_bw() +
  theme(legend.position = "bottom")

Mentor chart – 6. What does the zero part really say?

Code
certain <- sum(predict(zinb, type = "zero")) # expected number of certain zeros
# P(certain zero | 0 articles)
posterior <- predict(zinb, type = "zero") / predict(zinb, type = "prob")[, 1]
c(certain_zeros = certain, share_among_those_with_0 = mean(posterior[y == 0]))
           certain_zeros share_among_those_with_0 
              53.5428406                0.1947012 

By the ZINB, about 54 of the 915 students are certain zeros, which is 19% of those with no article. What the zero part has found may simply be a bend. The log of the expected count is not a straight line in the mentor’s articles: it rises quickly at first and then slowly. The NB has to use one slope for all, and the zero part offers a way to bend the curve near zero. Give the NB a bend of its own, and compare again:

Code
nb_bend <- glm.nb(articles ~ female + married + kids + prestige + log1p(mentor), data = phd)
zinb_bend <- zeroinfl(
  articles ~ female + married + kids + prestige + log1p(mentor),
  data = phd,
  dist = "negbin"
)
bend <- data.frame(
  model = c("NB, mentor", "ZINB, mentor", "NB, log(1 + mentor)", "ZINB, log(1 + mentor)"),
  parameters = c(7, 13, 7, 13),
  AIC = c(AIC(nb), AIC(zinb), AIC(nb_bend), AIC(zinb_bend)),
  BIC = c(BIC(nb), BIC(zinb), BIC(nb_bend), BIC(zinb_bend))
)
print(transform(bend, AIC = round(AIC, 1), BIC = round(BIC, 1)), row.names = FALSE)
                 model parameters    AIC    BIC
            NB, mentor          7 3135.9 3169.6
          ZINB, mentor         13 3126.0 3188.6
   NB, log(1 + mentor)          7 3118.9 3152.7
 ZINB, log(1 + mentor)         13 3121.1 3183.7

With the logarithm of the mentor’s articles, the plain NB has an AIC of 3,118.9, better than the ZINB with the straight line (3,126.0), with six parameters fewer. Adding zero inflation to it changes the AIC by 2.1. The “two kinds of zeros” have disappeared. They were a wrong curve.

A warning from simulation

What does one conclude who compares only Poisson with ZIP, when the truth is a negative binomial without any certain zeros?

Code
set.seed(82)
false_zip <- replicate(200, {
  d <- phd
  d$articles <- rnbinom(nrow(d), mu = fitted(nb), size = nb$theta)
  p0 <- glm(formula(pois), family = poisson, data = d)
  z0 <- suppressWarnings(zeroinfl(formula(zip), data = d))
  c(zip_wins = AIC(z0) < AIC(p0), certain_zeros = mean(predict(z0, type = "zero")))
})
rowMeans(false_zip)
     zip_wins certain_zeros 
    1.0000000     0.1787387 

ZIP beats Poisson in 100% of the data sets, and it declares 18% of the students to be certain zeros on average. There were none. Beating Poisson proves overdispersion, not two kinds of zeros.


7. Things to keep in mind

  • First the negative binomial. Many zeros do not mean zero inflation (Warton, 2005). Use a zero-inflated model when theory says that there are certain zeros (people who do not own a car and car accidents, men and pregnancies), not because the bar at zero is high.
  • Check the curve of the predictors before you explain zeros.
  • Zero inflation or hurdle? If nobody can tell the two kinds of zeros apart in principle, the hurdle model is easier to explain. The fits are often the same.
  • Read the zero part with care. In zeroinfl() it models the probability of a certain zero; in hurdle() the probability of a positive count.
  • Say what you report. The coefficients of the count part are for those who can publish. The effect on the mean of everybody is another number: \(E(y) = (1 - \pi)\mu\).
  • Large standard errors in the zero part are the rule. With few zeros, or a large \(\mu\), the zero part is hardly identified.
  • Different predictors in the two parts are allowed: zeroinfl(y ~ x | z). With | 1 there is one constant probability.
  • Exposure: an offset(log(time)) goes into the count part.
  • Clustered data: glmmTMB fits zero-inflated models with random effects.

8. Reporting the results in APA style

A report (APA 7th edition) needs the distribution of the counts, the models that were compared and how, both parts of the chosen model, and the effects on the mean. The numbers come from the R objects:

Code
s_nb <- coef(summary(nb_bend)); ci_nb <- suppressMessages(confint(nb_bend))
apa_table <- data.frame(
  Predictor = c(
    "Intercept", "Female", "Married", "Children under 6", "Prestige of the department",
    "log(1 + mentor's articles)"
  ),
  b = f2(s_nb[, 1]),
  SE = f2(s_nb[, 2]),
  z = f2(s_nb[, 3]),
  p = sapply(s_nb[, 4], function(p) sub("^= ", "", pval(p))),
  IRR = paste0(f2(exp(s_nb[, 1])), " [", f2(exp(ci_nb[, 1])), ", ", f2(exp(ci_nb[, 2])), "]")
)

Method (data analysis):

The number of articles of 915 PhD students (Long, 1990) had a mean of 1.69 and a variance of 3.71, and 275 students (30%) had none. We compared Poisson, negative binomial, zero-inflated Poisson and zero-inflated negative binomial regressions (Zeileis et al., 2008) with the AIC, the BIC, the expected number of zeros and rootograms, and tested zero inflation with a parametric bootstrap of the likelihood ratio (200 samples). The mentor’s articles entered linearly or as log(1 + x). Analyses were conducted in R (Version 4.6.2; R Core Team, 2026) with the packages pscl and MASS.

Results:

The Poisson model expected 191 students without an article and the negative binomial model 278, against 275 observed. With the mentor’s articles entered linearly, the zero-inflated negative binomial model fitted better than the negative binomial (bootstrap p = .020; AIC = 3,126.0 against 3,135.9), and the probability of a certain zero depended on the mentor’s articles. With log(1 + mentor’s articles) the negative binomial model without zero inflation had an AIC of 3,118.9, and zero inflation did not improve it (AIC = 3,121.1), so we report this model (Table 1). Women published fewer articles than men, IRR = 0.80, 95% CI [0.69, 0.92], as did students with young children, IRR = 0.84 per child, 95% CI [0.76, 0.93].

Table 1

Negative Binomial Regression of the Number of Articles

Predictor b SE z p IRR [95% CI]
Intercept -0.11 0.14 -0.79 .431 0.89 [0.67, 1.19]
Female -0.23 0.07 -3.14 .002 0.80 [0.69, 0.92]
Married 0.18 0.08 2.18 .030 1.19 [1.02, 1.40]
Children under 6 -0.17 0.05 -3.31 < .001 0.84 [0.76, 0.93]
Prestige of the department -0.01 0.04 -0.30 .764 0.99 [0.92, 1.06]
log(1 + mentor’s articles) 0.36 0.04 9.33 < .001 1.44 [1.33, 1.55]

Note. N = 915. IRR = incidence rate ratio. θ = 2.40.

Points to remember:

  • Report the mean, the variance and the share of zeros.
  • Compare with the negative binomial, not only with Poisson.
  • If you keep a zero-inflated model, report both parts and the effect on the overall mean.
  • Do not present Vuong’s test as a test of zero inflation.

9. Summary

When Counts with zeros from two sources: some units can never have a positive count
The model \(P(0) = \pi + (1 - \pi) f(0)\), \(P(k) = (1 - \pi) f(k)\); \(E(y) = (1 - \pi)\mu\)
How (R) pscl::zeroinfl(y ~ x | z, data, dist = "poisson") or "negbin"
Count part \(e^\beta\): ratio of expected counts, for those who can
Zero part Positive coefficient: more likely a certain zero
Compare with The negative binomial: AIC, BIC, rootograms, parametric bootstrap
Warning Overdispersion or a wrong curve can look like zero inflation
Related pages Hurdle models, generalized linear models (Poisson, negative binomial)

References

Kleiber, C., & Zeileis, A. (2016). Visualizing count data regressions using rootograms. The American Statistician, 70(3), 296–303. https://doi.org/10.1080/00031305.2016.1173590

Lambert, D. (1992). Zero-inflated Poisson regression, with an application to defects in manufacturing. Technometrics, 34(1), 1–14. https://doi.org/10.2307/1269547

Long, J. S. (1990). The origins of sex differences in science. Social Forces, 68(4), 1297–1316. https://doi.org/10.2307/2579146

Warton, D. I. (2005). Many zeros does not mean zero inflation: Comparing the goodness-of-fit of parametric models to multivariate abundance data. Environmetrics, 16(3), 275–289. https://doi.org/10.1002/env.702

Wilson, P. (2015). The misuse of the Vuong test for non-nested models to test for zero-inflation. Economics Letters, 127, 51–53. https://doi.org/10.1016/j.econlet.2014.12.029

Zeileis, A., Kleiber, C., & Jackman, S. (2008). Regression models for count data in R. Journal of Statistical Software, 27(8), 1–25. https://doi.org/10.18637/jss.v027.i08