Journal article icon

Journal article

denim: An R package for deterministic compartmental models with flexible dwell‐time distributions

Abstract:
Compartmental models are widely used for dynamical systems where states are discrete, such as in infectious disease epidemiology with the so‐called Susceptible‐Infectious‐Recovered (SIR) framework. For mathematical simplicity, rates of transition between compartments are generally assumed to be independent of the dwell time (or secondary timescale in survival analysis): they are either constant or dependent on the epidemiological time (or primary timescale in survival analysis) only, either directly (e.g. environmental or behavioural forcings in epidemiological models) or indirectly through dependence on other variables of the system (e.g. the force of infection in epidemiological models). In some domains of application, this memoryless assumption leads to distributions of dwelling times that are incompatible with those observed in data (e.g. infectious periods for childhood diseases), which can lead to serious problems since the model predictions are highly sensitive to the exact shape of these distributions. Here, we propose a deterministic, continuous‐variable, numerical modelling approach that allows full flexibility on the dwell‐time distributions. The accompanying denim package provides a user‐friendly interface to implement our proposed method through a dedicated language for model definition. The package is open source and available on CRAN. As more detailed data on the clinical process of infections become available, the denim package will be extremely useful for building more realistic epidemiological models that provide more accurate projections.
Publication status:
Published
Peer review status:
Peer reviewed

Actions

Access Document

Files:
Publisher copy:
10.1111/2041-210x.70256

Authors

More by this author
Institution:
University of Oxford
Role:
Author
ORCID:
0000-0001-6772-9291
More by this author
Institution:
University of Oxford
Role:
Author
ORCID:
0009-0000-2129-435X
More by this author
Institution:
University of Oxford
Role:
Author
ORCID:
0000-0003-3321-1886
More by this author
Institution:
University of Oxford
Role:
Author
ORCID:
0000-0002-5187-6390


More from this funder
Funder identifier:
https://ror.org/029chgv08
Grant:
225167/A/22/Z


Publisher:
Wiley
Journal:
Methods in Ecology and Evolution More from this journal
Article number:
2041-210x.70256
Publication date:
2026-02-12
Acceptance date:
2026-01-19
DOI:
EISSN:
2041210X
ISSN:
2041210X


Language:
English
Keywords:
Source identifiers:
3754744
Deposit date:
2026-02-13
ARK identifier:
This ORA record was generated from metadata provided by an external service. It has not been edited by the ORA Team.

Terms of use


Views and Downloads






If you are the owner of this record, you can report an update to it here: Report update to this record

TO TOP