
This repository contains the complete simulation code, parameter files, and numerical results underlying the study "Garbage in, policy out: laboratory accreditation status as a structured measurement-error mechanism in antimicrobial resistance estimates in sub-Saharan Africa."
The study uses Monte Carlo simulation to model laboratory accreditation status as a statistical parameter and to quantify how antimicrobial-susceptibility-testing (AST) misclassification propagates into estimated resistance prevalence, into the measured effect of an intervention, and into the smallest true change a surveillance network can reliably detect. A naive estimator (pooled proportion with a Wilson interval) is compared with a misclassification-corrected Rogan–Gladen estimator across four accreditation profiles, three true prevalence levels, and two intervention scenarios.
Contents: • amr_misclassification_sim.py — the simulation engine (data-generating mechanism, both estimators, power and intervention scenarios), with fixed random seeds. • results/ — seven CSV tables: coverage (5,000 repetitions), full factorial, bias curve, closed-form crossovers, power frontier, tier-mapping sensitivity, and intervention scenarios, including Monte Carlo standard errors. • figures/ — the three published figures (coverage, bias-vs-prevalence, and the power/decision-distortion frontier). • README, requirements.txt, and an MIT LICENSE.
The analysis is fully reproducible: running the script regenerates every result, table, and figure from the recorded seeds. No primary or third-party data were used; all inputs are simulation parameters documented in the code and in the manuscript Methods.
Implemented in Python using NumPy, pandas, and matplotlib.