Responsible modelling: Unit testing for infectious disease epidemiology

Epidemics. 2020 Dec:33:100425. doi: 10.1016/j.epidem.2020.100425. Epub 2020 Nov 26.

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 including malaria and tuberculosis. Yet a coding bug may bias results, yielding incorrect conclusions and actions causing avoidable harm. We are ethically obliged to make our code as free of error as possible. Unit testing is a coding method to avoid such bugs, but it is rarely used in epidemiology. We demonstrate how unit testing can handle the particular quirks of infectious disease models and aim to increase the uptake of this methodology in our field.

Keywords: Computational models; Reproducible science; Software development; Unit testing.

Publication types

  • Research Support, Non-U.S. Gov't
  • Review

MeSH terms

  • COVID-19 / epidemiology
  • Communicable Diseases / epidemiology*
  • Computer Simulation
  • Humans
  • Models, Biological*
  • Pandemics
  • Reinfection / epidemiology
  • Software