Skip to main content

Research Repository

Advanced Search

Automating incidence and prevalence analysis in open cohorts

Cockburn, Neil; Hammond, Ben; Gani, Illin; Cusworth, Samuel; Acharya, Aditya; Gokhale, Krishna; Thayakaran, Rasiah; Crowe, Francesca; Minhas, Sonica; Parry-Smith, William; Taylor, Beck; Nirantharakumar, Krishnarajah; Chandan, Joht Singh


Neil Cockburn

Ben Hammond

Illin Gani

Samuel Cusworth

Aditya Acharya

Krishna Gokhale

Rasiah Thayakaran

Francesca Crowe

Sonica Minhas

Beck Taylor

Krishnarajah Nirantharakumar

Joht Singh Chandan


Motivation: Data is increasingly used for improvement and research in public health, especially administrative data such as that collected in electronic health records. Patients enter and exit these typically open-cohort datasets non-uniformly; this can render simple questions about incidence and prevalence time-consuming and with unnecessary variation between analyses. We therefore developed methods to automate analysis of incidence and prevalence in open cohort datasets, to improve transparency, productivity and reproducibility of analyses. Implementation: We provide both a code-free set of rules for incidence and prevalence that can be applied to any open cohort, and a python Command Line Interface implementation of these rules requiring python 3.9 or later. General features: The Command Line Interface is used to calculate incidence and point prevalence time series from open cohort data. The ruleset can be used in developing other implementations or can be rearranged to form other analytical questions such as period prevalence. Availability: The command line interface is freely available from


Cockburn, N., Hammond, B., Gani, I., Cusworth, S., Acharya, A., Gokhale, K., …Chandan, J. S. (in press). Automating incidence and prevalence analysis in open cohorts. BMC medical research methodology, 24, Article 144.

Journal Article Type Article
Acceptance Date Jun 24, 2024
Online Publication Date Jul 4, 2024
Deposit Date Jul 8, 2024
Publicly Available Date Jul 8, 2024
Journal BMC Medical Research Methodology
Print ISSN 1471-2288
Publisher Springer Verlag
Peer Reviewed Peer Reviewed
Volume 24
Article Number 144
Public URL
Publisher URL


Automating incidence and prevalence analysis in open cohorts (1.3 Mb)


Publisher Licence URL

Copyright Statement
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit The Creative Commons Public Domain Dedication waiver ( applies to the data made available in this article, unless otherwise stated in a credit line to the data.

You might also like

Downloadable Citations