Sensitivity analyses
What the conclusions depend on, and how hard.
A simulation result is only as interesting as its dependence on the assumptions behind it. Each sweep below varies one or two axes across their plausible range and reports the whole surface, not the favourable corner. The raw output of every run is linked so the numbers quoted elsewhere on this site can be checked against the run that produced them.
Dialysate sodium against absorbed glucose, at three base levels
Sodium substitutes for dextrose as the osmotic agent, so absorbed glucose falls as dialysate sodium rises. Base has to rise with it or electroneutrality drives the dialysate chloride past its safe ceiling — which is why the useful lines are the higher-base ones.
Dialysate sodium × base
Sodium and base set dialysate chloride with opposite signs, so raising both together lets sodium substitute for dextrose as the osmotic agent without driving chloride up. Five sodium levels × three base levels; arms whose implied chloride exceeds the safe ceiling are rejected before running rather than silently dropped.
na_base_matrix.log — 59 lines of raw output
COVERAGE AND VERDICT
============================================================================================================================
matrix: 5 Na levels x 3 base levels = 15 combinations per patient; 12 arm-runs rejected before running on the chloride ceiling.
P4_anuric 8/9 arms acceptable; best Na 152 / base 42 -> glucose 163 g/day (-16.9%), Na 144.9 Cl 103.4 AG 19.2 HCO3 23.6
P1_typical_M70 7/9 arms acceptable; best Na 148 / base 38 -> glucose 168 g/day (-6.8%), Na 145.0 Cl 104.0 AG 19.9 HCO3 21.7
RECIPES ACCEPTABLE FOR EVERY PATIENT TESTED: Na 136/base 34, Na 136/base 38, Na 136/base 42, Na 142/base 38, Na 142/base 42, Na 148/base 38, Na 148/base 42
A prescription must clear EVERY patient, not the easiest one — pick from this set.
Dialysate sodium alone
The one-axis version, kept deliberately because it is instructive: it shows a 17% glucose saving that looks convincing until chloride is measured, which is exactly the trap the two-axis matrix above exists to avoid.
na_for_glucose.log — 50 lines of raw output
VERDICT
======================================================================================================================
P4_anuric best usable dialysate Na 152: glucose 196 -> 163 g/day (-17.0%), serum Na peak 144.9
P1_typical_M70 best usable dialysate Na 148: glucose 180 -> 168 g/day (-6.8%), serum Na peak 145.0
READ IT THIS WAY. A large negative percentage in the best usable arm means the lever WORKS and the
envelope is worth changing and retraining on. A small or positive one means sodium's low
reflection coefficient lets it equilibrate away before it can do osmotic work, and the glucose
exposure has to be addressed some other way. Either result is worth having before spending a
retrain on it.
Clinical validation matrix, 40 arms
Five levels of renal function × two potassium diets × two fluid behaviours × two phosphate behaviours, on conventional therapy. Each clinical expectation is asserted in code and the run fails if the engine contradicts it.
validation_matrix.log — 63 lines of raw output
VALIDATION — does the engine reproduce what a nephrologist expects?
======================================================================================================================
OK BUN rises as renal function falls normal -> anuric: 30 < 61 < 70 < 73 < 75 mg/dL
OK serum K rises with dietary K (anuric) delta +1.21 mmol/L
OK that rise is STEEPEST when anuric anuric +1.21 vs normal +0.93 mmol/L — residual renal secretion is the missing buffer
OK fluid non-compliance gains water (anuric) delta +5.87 L
OK and it hurts the anuric patient more anuric +5.87 L vs normal +0.90 L
OK serum phosphate rises with intake delta +1.05 mmol/L
OK conventional PD does NOT control phosphate alone anuric + non-compliant sits at 2.78 mmol/L (>1.78 = 5.5 mg/dL, the treatment threshold). If this is LOW, MTAC phosphate is too high — Oberg gives PS 10.2 vs the engine 5.0.
ALL CLINICAL EXPECTATIONS REPRODUCED — the engine behaves as these patients are known to behave.
Sodium sieving sensitivity
Cumulative ultrafiltration against the convective sodium sieving coefficient — the single most load-bearing constant in the membrane model.
sieving_fwt.log — 19 lines of raw output
Contemporary APD comparator
Ten patients on a conventional night cycler, at three drinking behaviours, on each bag strength.
apd_run.log — 128 lines of raw output