underdisp

Tools for detecting and modeling underdispersion in count data — the case where the conditional variance falls below the conditional mean, so counts cluster more tightly around their expectation than a Poisson allows.

Underdispersion is common in bounded political-science counts (portfolios of statuses that are filled and vacated over time) but poorly served by standard software: the negative binomial cannot represent a variance below the mean and collapses onto the Poisson. underdisp provides the missing pieces.

What it does

Installation

# development version
# install.packages("remotes")
remotes::install_github("bagozzib/underdisp")

# from CRAN, once accepted
install.packages("underdisp")

Quick start

library(underdisp)

# an underdispersed count (var/mean ~ 0.5)
n <- 400; x <- rnorm(n)
N <- pmax(round(exp(1.6 + 0.5 * x) / 0.5), 1)
d <- data.frame(y = rbinom(n, N, 0.5), x = x)

ud_screen(y ~ x, data = d)              # screen
fit <- cpb(y ~ x, data = d[d$y > 0, ])  # fit the zero-truncated CPB
summary(fit)
implied_ceiling(fit, newdata = data.frame(x = 0))
compare_dispersion(y ~ x, data = d)$table

The bundled peacekeeping panel demonstrates the package’s central move — a count that looks overdispersed in the pooled margin but is underdispersed within countries at risk. See vignette("underdisp") for the full walk-through, including the two-part models, the bias-corrected fixed effects, and the DHARMa workflow.

References

Dhaene, Geert, and Koen Jochmans. 2015. “Split-Panel Jackknife Estimation of Fixed-Effect Models.” The Review of Economic Studies 82(3): 991–1030.

King, Gary. 1989. “Variance Specification in Event Count Models.” American Journal of Political Science 33(3): 762–784.

Winkelmann, Rainer, Curtis S. Signorino, and Gary King. 1995. “A Correction for an Underdispersed Event Count Probability Distribution.” Political Analysis 5: 215–228.

mirror server hosted at Truenetwork, Russian Federation.