GenErlangFit: a tool for estimating empirical waiting-time distributions to inform compartmental epidemic models

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.

Authors

Publication Details

Journal
BMC Global and Public Health
Published
2026-11-27
DOI
https://doi.org/10.1186/s44263-026-00344-0
Primary Topic
Mathematical and Theoretical Epidemiology and Ecology Models
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
article

GenErlangFit: a tool for estimating empirical waiting-time distributions to inform compartmental epidemic models

Vivek Murali, Anjalika Nande, Alison L. Hill
BMC Global and Public Health
Mathematical and Theoretical Epidemiology and Ecology Models
article

GenErlangFit: a tool for estimating empirical waiting-time distributions to inform compartmental epidemic models

Vivek Murali, Anjalika Nande, Alison L. Hill
article en

Abstract

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.

BMC Global and Public HealthVol. 4(1)
Mathematical and Theoretical Epidemiology and Ecology Models
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon