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.
How do missing-data mechanisms and imputation choices alter statistical conclusions and downstream model reliability in healthcare analytics?
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.
- Complete-case analysis
- Median imputation
- Median imputation with missingness indicators
- K-nearest-neighbour imputation
- Bayesian iterative regression imputation
- Multiple stochastic chained imputation
All imputers are fitted on training data only and then applied to the held-out test set.
| 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% |
- 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.
- Normalised RMSE over deliberately masked cells
- ROC-AUC
- PR-AUC
- Brier score
- Log loss
- Calibration intercept
- Calibration slope
- Raw-scale coefficient bias
- Mean absolute coefficient bias across repeated simulations
- Complete-case training fraction
- Complete-case test coverage
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
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.pyRun tests:
python -m pytest -q
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.
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.
This is a synthetic statistical benchmark, not a clinical decision system.
See documentation/limitations.md for detailed
methodological and responsible-use limitations.




