Abstract
Infectious disease epidemiology is increasingly reliant on large-scale computation and inference. Models have guided health policy for epidemics including COVID-19 and Ebola and endemic diseases such as malaria and tuberculosis. Yet a single coding bug may bias results, leading to incorrect conclusions and wrong actions that could cause avoidable harm. We are ethically obliged to ensure our code is as free of error as possible. Unit testing is a coding method to avoid such bugs, but unit testing is rarely used in epidemiology. We demonstrate through simple examples how unit testing can handle the particular quirks of infectious disease models.
Competing Interest Statement
The authors have declared no competing interest.
Funding Statement
Gates Foundation
Author Declarations
I confirm all relevant ethical guidelines have been followed, and any necessary IRB and/or ethics committee approvals have been obtained.
Yes
The details of the IRB/oversight body that provided approval or exemption for the research described are given below:
None
All necessary patient/participant consent has been obtained and the appropriate institutional forms have been archived.
Yes
I understand that all clinical trials and any other prospective interventional studies must be registered with an ICMJE-approved registry, such as ClinicalTrials.gov. I confirm that any such study reported in the manuscript has been registered and the trial registration ID is provided (note: if posting a prospective study registered retrospectively, please provide a statement in the trial ID field explaining why the study was not registered in advance).
Yes
I have followed all appropriate research reporting guidelines and uploaded the relevant EQUATOR Network research reporting checklist(s) and other pertinent material as supplementary files, if applicable.
Yes
Data Availability
All data available