Answers are grounded in this paper and cite their sources.
In standard compartmental models of infectious diseases, assumptions about the duration of time spent in each state (e.g., latent period, infectious period) significantly influence model outcomes and interpretation. When represented deterministically as systems of ordinary differential equations or stochastically as Markov chains, these models often assume constant transition rates between states, which implies an exponential distribution of “waiting times” in each state. However, this assumption is not consistent with available data for many diseases. An alternative that remains analytically or computationally tractable is to model each state as a series of multiple identical substates, which results in a gamma (Erlang) distributed overall duration of time spent in each disease state (known as the “linear chain trick”). While well-known, few studies have presented formal methods for determining the optimal number of substates or extended this approach to encode a wider variety of distributions by including non-identical substates. Here we introduce GenErlangFit, an open-source R package and Shiny web application for fitting Erlang and related distributions to empirical waiting-time data. It combines maximum likelihood parameter estimation with parametric bootstrap hypothesis testing to prioritize the simplest model structures that produce waiting times consistent with observed data. To improve flexibility, we incorporate the Erlang-Exponential model, an extension of the standard Erlang distribution that adds a final exponentially-distributed stage with a unique transition rate, allowing better approximation of empirical distributions with varying skewness and tail behavior. The web application provides an accessible interface for modelers to fit empirical data and build parsimonious, data-driven compartmental models.
No takes yet. Share an insight, caveat, or question.
Murali et al. (2026) studied this question.
Synapse has enriched 10 related papers. Consider them for comparative context: