GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - newbornalive/healthcare-missing-data-strategy: Healthcare missing-data analysis comparing complete-case, KNN, Bayesian iterative, and multiple imputation under MCAR, MAR, and MNAR.

BranchesTags
Open more actions menu

Latest commit

 

History

4 Commits
4 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
data
data
 
 
documentation
documentation
 
 
images
images
 
 
notebooks
notebooks
 
 
results
results
 
 
scripts
scripts
 
 
src/healthcare_missing_data
src/healthcare_missing_data
 
 
tests
tests
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
MIGRATION_GUIDE.md
MIGRATION_GUIDE.md
 
 
README.md
README.md
 
 
pyproject.toml
pyproject.toml
 
 
requirements.txt
requirements.txt
 
 

Repository files navigation

Missing Data Mechanisms and Imputation Reliability in Healthcare

A reproducible simulation study of how MCAR, MAR, and MNAR missingness affect imputation accuracy, predictive performance, probability calibration, coefficient recovery, and usable sample size.

The project compares complete-case analysis, median imputation, missingness-indicator models, KNN, Bayesian iterative imputation, and multiple stochastic chained imputation.

Research Question

How do missing-data mechanisms and imputation choices alter statistical conclusions and downstream model reliability in healthcare analytics?

Why Synthetic Ground Truth?

Real healthcare datasets rarely reveal the values that would have been observed without missingness. This project generates complete correlated healthcare data with known outcome coefficients, masks selected values under controlled mechanisms, and evaluates each method against the original truth.

The committed benchmark contains 1,800 records per replicate, an adverse outcome prevalence of approximately 20.3%, three simulation replicates, three missingness mechanisms, two missingness rates, and six analysis strategies.

Methods Compared

  1. Complete-case analysis
  2. Median imputation
  3. Median imputation with missingness indicators
  4. K-nearest-neighbour imputation
  5. Bayesian iterative regression imputation
  6. Multiple stochastic chained imputation

All imputers are fitted on training data only and then applied to the held-out test set.

Actual Benchmark Results

Mechanism Missing Rate Lowest-NRMSE Method NRMSE Highest-PR-AUC Method PR-AUC Complete-Case Training Retained
MAR 10% Bayesian Iterative 0.838 Bayesian Iterative 0.673 59.5%
MAR 30% Bayesian Iterative 0.876 Bayesian Iterative 0.612 20.8%
MCAR 10% Bayesian Iterative 0.842 Complete Case 0.705 53.4%
MCAR 30% Bayesian Iterative 0.889 KNN 0.654 12.5%
MNAR 10% Bayesian Iterative 1.004 KNN 0.665 55.2%
MNAR 30% Bayesian Iterative 1.046 Median + Indicator 0.643 15.0%

Main Findings

  • Under MCAR at 10% missingness, Bayesian Iterative achieved the lowest average imputation NRMSE (0.842).
  • Under MNAR at 30% missingness, even the lowest-error method, Bayesian Iterative, retained substantial imputation error (NRMSE 1.046).
  • In the same MNAR 30% scenario, Median + Indicator achieved the highest downstream PR-AUC (0.643), illustrating that predictive utility and value recovery are different objectives.
  • With 30% per-variable missingness, complete-case analysis retained only about 16.1% of training observations on average.
  • Complete-case performance metrics are calculated only on fully observed test records, so they are not directly comparable to full-coverage imputation methods without considering coverage and case-mix selection.
  • No method eliminated MNAR bias without additional assumptions about the missingness process.

Evaluation Framework

Imputation Accuracy

  • Normalised RMSE over deliberately masked cells

Predictive Reliability

  • ROC-AUC
  • PR-AUC
  • Brier score
  • Log loss
  • Calibration intercept
  • Calibration slope

Statistical Recovery

  • Raw-scale coefficient bias
  • Mean absolute coefficient bias across repeated simulations

Data Retention

  • Complete-case training fraction
  • Complete-case test coverage

Results

Imputation Error

Imputation NRMSE

Downstream Predictive Performance

PR-AUC comparison

Calibration

Calibration slope

Coefficient Recovery

Coefficient bias

Complete-Case Attrition

Complete-case retention

Repository Structure

healthcare-missing-data-strategy/
├── data/
│   ├── README.md
│   ├── generation_metadata.json
│   └── synthetic_healthcare_complete.csv
├── documentation/
│   ├── data_dictionary.md
│   ├── limitations.md
│   └── methodology.md
├── images/
├── notebooks/
│   └── missing_data_analysis.ipynb
├── results/
│   ├── coefficient_bias_summary.csv
│   ├── coefficient_estimates.csv
│   ├── metric_summary.csv
│   └── simulation_metrics.csv
├── scripts/
│   ├── generate_data.py
│   └── run_experiments.py
├── src/healthcare_missing_data/
├── tests/
├── README.md
├── requirements.txt
└── pyproject.toml

Quick Start

python -m venv .venv

Activate on Windows:

.venv\Scripts\activate

Install and run:

pip install -r requirements.txt
pip install -e .
python scripts/generate_data.py
python scripts/run_experiments.py

Run tests:

python -m pytest -q

Statistical Interpretation

MCAR, MAR, and MNAR are assumptions about data-generation and observation processes—not labels that can generally be verified from observed data alone. In particular, no generic imputation algorithm can guarantee unbiased recovery under MNAR without additional assumptions, auxiliary information, or an explicit model for the missingness mechanism.

Portfolio Summary

Designed a repeated-simulation framework to compare complete-case, KNN, Bayesian iterative, and multiple imputation under MCAR, MAR, and MNAR. Evaluated masked-value recovery, predictive discrimination, probability calibration, coefficient bias, and sample attrition using reproducible Python pipelines.

Limitations

This is a synthetic statistical benchmark, not a clinical decision system. See documentation/limitations.md for detailed methodological and responsible-use limitations.

About

Healthcare missing-data analysis comparing complete-case, KNN, Bayesian iterative, and multiple imputation under MCAR, MAR, and MNAR.

Topics

bayesian-statisticsmarmcarmissing-datamnarmultiple-imputationpythonstatistical-sim

Resources

Readme
MIT license
Activity

Stars

1 star

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.