Skip to content
Blazej Mrozinski edited this page Jul 2, 2026 · 2 revisions

countkit

countkit is the companion package to the tutorial Counts are not one problem: analyzing count outcomes by task mechanism. The idea behind both is simple. A count is not just "an integer outcome." A verbal-fluency score, a divergent- thinking score, and an adverse-childhood-experience tally are counts for three different reasons, and each reason points to a different model. The package gives you one function to work out which reason you are facing, and three task-calibrated simulators to watch it happen against a truth you control.

Install

# install.packages("remotes")
remotes::install_github("b1azk0/countkit")

Where to start

If you have a count in front of you and want to know how to model it, go to diagnose(). If you want to generate counts whose truth you set, so you can watch a model succeed or fail, start with the task that matches yours:

The one-paragraph version

Counts break the Gaussian default for structurally different reasons. Fluency is overdispersed because words arrive in clusters, so it wants a negative binomial. Divergent-thinking scores are manufactured by the analyst's aggregation choice, so the first question is whether the outcome is even a count. ACE scores are bounded sums of correlated binary items, so they want a beta-binomial, not an open-ended Poisson. diagnose() reads these signals off your data; the simulators let you reproduce each one and check any model against a known answer.

Reference

Mrozinski, B. (2026). Counts are not one problem: A tutorial on analyzing count outcomes by task mechanism. Manuscript under review. Reproduction materials and the full simulation study: https://osf.io/xj6cf/

Clone this wiki locally