Reproducibility

Code, results and what was verified

Everything behind the simulator, paper and protocol numbers is here and runnable. No patient data were used anywhere.

Files

Run it

pip install numpy
python pranapd.py --validate   # 9 deterministic scenarios
python pranapd.py --identify   # coupling recovery, n = 60
python identifiability_study.py # n = 60 and 200, 8 cohorts each

API

GET /api/model: domains, categories, profiles.
POST /api/simulate: JSON body, all fields optional.

curl -X POST /api/simulate \
  -H 'content-type: application/json' \
  -d '{"profile":"C","weeks":52,"eventWeek":20}'

Returns trajectories, objective components J, controller intensities and the ρ trade-off for three arms. Inputs are clamped to safe ranges.

Verification log

CheckResult
TypeScript vs Python, 9 noise-free scenariosIdentical to 4 decimals (mean final x and J).
Healthy state is an equilibrium when D = 0By construction (h = Λ·1). Not a finding.
Monte-Carlo, 200 seeds × 9 cellsSDs 0.006–0.02 on mean x. Adaptive arm lowers J 49–60 % vs usual care under placeholder B.
Coupling recovery, signsCorrect in 8 of 8 synthetic cohorts, for every link, at n = 60 and n = 200.
Coupling recovery, magnitudeTwo links near-unbiased; three overestimated by about 60–90 % at n = 200. Cause not established.

How the identification problem changed during validation

  1. A simple pooled regression overestimated coupling about 2–3× (shared own-decay forced onto patients whose impairment differs).
  2. Letting each patient have their own decay, with measurement noise present, pushed estimates the other way and ordinary least squares collapsed toward zero or negative values (errors-in-variables).
  3. Instrumenting with the state two steps earlier and including the recorded disturbance gave correct signs everywhere and correct magnitude on two links.
  4. Remaining bias persisted at n = 200. It is reported as is, not tuned away.

Changes made to the uploaded Sākṣī app

Not changed, but worth reviewing: Sākṣī's "ρ" is a mean absolute pairwise correlation across 14 days (the app labels this a demonstration), which is a different quantity from the model's coordination reserve ρ, the coupling scale. The two should not be compared numerically.