This vignette outlines the design decisions that have been taken during the development of the epidemics R package, and provides some of the reasoning, and possible pros and cons of each decision.
This document is primarily intended to be read by those interested in understanding the code within the package and for potential package contributors.
epidemics aims to help public health practitioners - rather than research-focussed modellers - to rapidly simulate disease outbreak scenarios, and aims to balance flexibility, performance, user-friendliness, and maintainability.
epidemics trades away some flexibility in defining model structures for a gain in the ease of defining epidemic scenario components such as affected populations and model events.
epidemics attempts to balance performance and maintainability through minimum sufficient use of C++, and not attempting to write a domain-specific language (such as odin).
To be more broadly applicable, epidemics provides a ‘library’ of compartmental models which are adapted from the published literature. These models focus on broad types of diseases or settings, rather than specific diseases or scenarios. Thus all models are intended to be applicable to a range of diseases.
All function outputs are expected to return a structure that inherits
from <data.frame>
, to make further processing easier
for users. The exact structure of the output - whether a list of
<data.frame>
s, a <data.table>
or
<tibble>
, or a nested version of these tabular data
classes - is yet to be fixed. The eventual stable output type must allow
users to conveniently access the epidemic trajectory data, identify and
filter intervention scenarios for comparisons among them, and allow
interoperability with data science tools such as the Tidyverse.