Skip to main content

Project #117:
Understanding and adjusting for bias in OpenSAFELY COVID testing data

Background: OpenSAFELY is a secure research platform that includes data from 58 million English patients. OpenSAFELY has been used to answer important questions about COVID-19, influencing policy decisions and increasing our understanding of the effects of the virus. OpenSAFELY holds data from national PCR and lateral flow testing. Importantly, the availability of testing has changed over the course of the pandemic, and testing was often driven by patient choice. This has likely led to important differences between people who had COVID-19 tests and those who did not. These differences mean that studies using the testing data might produce incorrect results, unless these differences can be accounted for in the study. This is important for COVID-19 and for future UK pandemics.

Aim: The aim of this project is to determine how we can account for differences in testing in OpenSAFELY to address important questions in COVID-19, and then how we can use this to inform policy for future pandemics.

Methods: We will use linked data from OpenSAFELY and the ONS COVID-19 Infection Survey (ONS CIS). ONS CIS is much smaller than OpenSAFELY but it randomly sampled households across the UK and regularly tested all participants, which means that the data were not reliant on access to testing or patient choice. We will compare people who tested positive in ONS CIS to those who tested positive in OpenSAFELY. We will then look at risk factors for hospitalisation and death among those with recorded COVID-19 infection in OpenSAFELY, and use methods to understand how using the national testing data (rather than regularly testing everyone) might have led to incorrect results. Finally, we will use various statistical methods to try and overcome any errors introduced by use of COVID-19 testing data.


  • Study leads: Emily HerrettSarah Walker
  • Organisation: University of Oxford, London School of Hygiene and Tropical Medicine, and Office for National Statistics
  • Project type: Research
  • Topic area: Other/indirect impacts of COVID on health/healthcare