Coder Social home page Coder Social logo

seabbs / etsmissing Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 187.61 MB

Explore and evaluate the mechanisms for missing data in the Enhanced Tuberculosis Surveillance system.

Home Page: https://www.samabbott.co.uk/ETSMissing

License: Other

Dockerfile 0.05% Makefile 0.11% R 1.68% HTML 98.16%
bcg tuberculosis ets public-health-england rstats surveillance analysis-package

etsmissing's Introduction

Exploring Missing Data in the Enhanced Tuberculosis Surveillance System

badge Documentation DOI

Sam Abbott, Hannah Christensen, Ellen Brooks-Pollock

Background

The Enhanced Tuberculosis Surveillance (ETS) system is a routine surveillance system that collects data on all notified tuberculosis (TB) cases in England and is routinely used in research. Routine data often has a large amount of missing data which may introduce bias to analyses.

Aim

Explore potential sources of bias from missing data for key outcomes in the ETS system.

Methods

We used data on all notifications in the ETS for England (2000-2015). We summarised the proportion of missing data and then used logistic regression to explore the associations between missingness and demographic variables for the following outcomes: drug resistance; BCG status and year; date of symptom onset, diagnosis, notification, starting treatment, finishing treatment and death; and cause of death. For all date variables, we visualised the distribution annually and by month, identifying variables at risk of bias.

Results

All demographic variables considered were associated with data being missing for multiple outcomes. Missingness was not associated with all demographic variables for all outcomes. Associations that were present did not all have the same direction of effect. We found that the date of symptom onset and the date of ending treatment had a high proportion of cases occurring in January and on the 1st and 14th of each month indicating the presence of potential bias.

Conclusions

Missingness in outcomes was associated with multiple demographic variables. These associations could not be generalised, preventing a systematic approach to dealing with missingness and indicating that domain knowledge is required. The identified associations may induce bias, meaning that multiple imputation may be beneficial for analyse using this data source - or other similar surveillance data. Our findings should be used to motivate the use of imputation and to inform the specification of imputation models that include auxiliary variables.

Keywords

Tuberculosis, surveillance, missingness, imputation

Reproducibility

Repository structure

The repository is structured as an R package. It has the following structure:

  • data-raw: Raw data processing.
  • data: Processed data.
  • R: Supporting R functions.
  • docs: Documentation for R code.
  • vignettes: Analysis paper, results, and analysis plan.
  • peer-review: Documentation required for peer review.

Manual install

git clone https://github.com/seabbs/ETSMissing.git
  • Once this has been downloaded click on the project file (ETSMissing.Rproj).

  • Install the analysis dependencies and build the package using the following. To enable more robust reproducibility consider using the checkpoint package versioned locked to R 3.6.1.

#install.packages("devtools")
# To build locally
devtools::install_dev_deps(dependencies = TRUE)
devtools::install()
# Alternatively to remote install
devtools::install_github("seabbs/ETSMissing", dependencies = TRUE)
  • Load the analysis results by running vignettes/paper.Rmd. Alternatively the complete analysis (along with documentation) can be reconstructed using make in the project root directory.

  • See data-raw for data processing and the documentation for implementation details.

Docker

This analysis was developed in a docker container based on the tidyverse docker image. To run the docker image run:

docker run -d -p 8787:8787 --name etsmissing -e USER=etsmissing -e PASSWORD=etsmissing seabbs/etsmissing

The rstudio client can be found on port :8787 at your local machines ip. The default username:password is assessbcgpolicychange:assessbcgpolicychange, set the user with -e USER=username, and the password with - e PASSWORD=newpasswordhere. The default is to save the analysis files into the user directory.

If you have access to the required underlying raw data (see tbinenglanddataclean) then the entire analysis can be reproduced from scratch by adding the following to the docker run command, with the data saved into data/tb_data. The data requirements, and structure, can be found here.

--mount type=bind,source=$(pwd)/data/tb_data,target=/home/ETSMissing/data/tb_data

Alternatively the analysis environment can be accessed via binder.

etsmissing's People

Contributors

seabbs avatar

Stargazers

 avatar

Watchers

 avatar  avatar

etsmissing's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.