Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CTD-ICU Infection-Related Acute Brain Dysfunction — Prediction Model Analysis

EN — Analysis code (data extraction + statistical modelling) for the parsimonious model predicting infection-related acute brain dysfunction in critically ill patients with connective tissue disease (CTD). Developed on MIMIC-IV, externally validated on eICU-CRD. 中文 — 本研究"结缔组织病重症患者感染相关急性脑功能障碍"简约预测模型的分析代码(数据提取 + 统计建模),基于 MIMIC-IV 开发、eICU-CRD 外部验证。

Repository contents / 仓库内容

sql/             # PostgreSQL extraction scripts (MIMIC-IV / eICU-CRD): cohort, phenotype, features, attrition
R/               # R analysis pipeline (run in the order below)
index.html       # Interactive web risk calculator (English) — also live at the GitHub Pages site
index_zh.html    # Interactive web risk calculator (Chinese)
.nojekyll        # Disables Jekyll so all files are served as static assets
data/            # (gitignored) derived patient-level tables — NOT included (PhysioNet DUA prohibits redistribution)
out/             # (gitignored) aggregate outputs regenerated by the pipeline

Web calculator / 在线计算器

A self-contained, client-side (no server, no data leaves the browser) risk calculator is included and deployed via GitHub Pages:

The calculator embeds the final parsimonious model coefficients; open the file directly or host it anywhere static.

Pipeline order / 运行顺序

  1. sql/ — run the .sql scripts in PostgreSQL to build the analysis schema (internally named npsle2 for backward compatibility) and export data/mimic_final.csv / data/eicu_final.csv.
  2. R/01_table1.R, R/01b_check_ns.R — descriptive tables / sample check.
  3. R/02_harmonize.R — cross-database variable alignment -> data/dev.rds, data/ext.rds.
  4. R/04_model_dev.R — MICE imputation -> LASSO stability selection -> parsimonious logistic -> bootstrap optimism correction.
  5. R/05_external_val.R — external validation on eICU-CRD.
  6. R/06_clinical_utility.R, R/06b_strategy_unbiased.R — decision-curve analyses.
  7. R/07_figures.R — forest plot, ROC, etc.
  8. R/08_secondary.RR/12_culture_dca.R — secondary / sensitivity / culture-positive analyses.
  9. R/03_table1_eicu.R, R/04b_sanity.R, R/09_strobe.R — eICU Table 1, sanity checks, STROBE flowchart numbers.

Each R script sets the repository root via setwd() at the top — adjust it to your clone location (or use here::here()).

Environment / 环境

  • R >= 4.0 with: dplyr, mice, glmnet, rms, pROC, rmda, ggplot2, …
  • PostgreSQL 14+ with MIMIC-IV v2.2 and eICU-CRD loaded (PhysioNet credentialing required).

Data availability / 数据可用性

MIMIC-IV and eICU-CRD are credentialed de-identified databases from PhysioNet under a data use agreement that prohibits public redistribution. data/ is therefore gitignored; researchers must obtain the raw databases independently and re-run sql/ + R/ to reproduce all aggregate results.

The analysis code, full model equation, and interactive bilingual (EN/ZH) web risk calculator are archived under the version-specific DOI 10.5281/zenodo.22007064 and deployed at https://morrosun.github.io/ctd-icu-abd-prediction/.

License / 许可

Code released under the MIT License. No license is asserted over MIMIC-IV / eICU-CRD data.

About

Parsimonious prediction model for infection-related acute brain dysfunction in critically ill patients with connective tissue disease (CTD). Analysis code (SQL + R) and an interactive web risk calculator. MIMIC-IV / eICU-CRD.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages