GithubHelp home page GithubHelp logo

ellessenne / multimorbidity-ckd-clustering Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 33 KB

Statistical code to replicate the analyses in "The Presence and Impact of Multimorbidity Clusters on Adverse Outcome Across the Spectrum of Kidney Function".

Home Page: https://doi.org/10.1186/s12916-022-02628-2

License: MIT License

R 100.00%
ckd multimorbidity rstats

multimorbidity-ckd-clustering's Introduction

The Presence and Impact of Multimorbidity Clusters on Adverse Outcome Across the Spectrum of Kidney Function

License: MIT License: CC BY 4.0

This repository contains statistical code written in R that can be used to replicate the analyses reported in paper titled "The Presence and Impact of Multimorbidity Clusters on Adverse Outcome Across the Spectrum of Kidney Function", published in BMC Medicine and available Open Access.

The structure of the code published in this repository is described in each subsection below, by topic. Please note that:

  • File names of actual data are excluded from each script, while intermediate objects (e.g., model fits) that are imported at later stages are retained;
  • All scripts exports output (data, tables, figures) to certain directories that are not included in this repository.

If you have any question regarding this material, please open an Issue here on GitHub.

Finally, all code included in this repository is licensed under the MIT license. Everything else included here that is not code is licensed under a Creative Commons Attribution 4.0 International License.

eGFR Interpolation

This topic concerns the following files:

  • 01-fit-lmm.R
  • 02-interpolate.R

The file 01-fit-lmm.R can be used to fit a linear mixed effects model, which is then used to interpolate eGFR trajectories in file 02-interpolate.R. The interpolation procedure is described in more detail in the manuscript, please refer to that for all methodological considerations.

Defining Multimorbidity Conditions

This topic concerns the following files:

  • 03-multimorbidity.R

This script is used to calculate each multimorbidity condition at every index date (i.e., eGFR threshold) considered in our analysis. For more information of how each multimorbidity condition is defined refer to the manuscript.

Clustering Analysis

This topic concerns the following files:

  • 04-fit-clustering.R
  • 05-summarise-clustering.R

The 04-fit-clustering.R script can be used to fit the k-modes algorithm at each eGFR threshold and for a variety of possible number of clusters. Elbow plots are produced to select the optimal number of clusters; remember that this is specified by the analyst and cannot be fully automated.

The 05-summarise-clustering.R script summarises the clustering analysis by creating plots and tables, and runs the algorithm to identify significant clusters.

Survival Analysis and Predictive Performance

This topic concerns the following files:

  • 06-outcomes.R
  • 30-predictive-performance.R

The 06-outcomes.R script runs all the outcomes analyses (MACE3, MACE4, mortality) and summarises them with a variety of tables and plots. The 30-predictive-performance.R script calculates predictive performance metrics for all the models we considered and compared.

Sensitivity Analyses

This topic concerns the following files:

  • 40-age-specific-below.R
  • 41-age-specific-above.R

These two files can be used to run the whole analysis for subset of data defined by age (below and above 65 years of age, in our study). Outcome tables and plots are exported as well.

References

  • Sullivan, M.K., Carrero, JJ., Jani, B.D. et al. The presence and impact of multimorbidity clusters on adverse outcomes across the spectrum of kidney function. BMC Med 20, 420 (2022). https://doi.org/10.1186/s12916-022-02628-2

multimorbidity-ckd-clustering's People

Contributors

ellessenne avatar

Watchers

 avatar  avatar

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.