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
pranapd.py: Python/NumPy reference implementation,--validateand--identify.identifiability_study.pyand results (JSON).model.ts: TypeScript model used by the web simulator and/api/simulate.montecarlo.tsand results (JSON): 200 seeds per cell.
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
| Check | Result |
|---|---|
| TypeScript vs Python, 9 noise-free scenarios | Identical to 4 decimals (mean final x and J). |
| Healthy state is an equilibrium when D = 0 | By construction (h = Λ·1). Not a finding. |
| Monte-Carlo, 200 seeds × 9 cells | SDs 0.006–0.02 on mean x. Adaptive arm lowers J 49–60 % vs usual care under placeholder B. |
| Coupling recovery, signs | Correct in 8 of 8 synthetic cohorts, for every link, at n = 60 and n = 200. |
| Coupling recovery, magnitude | Two links near-unbiased; three overestimated by about 60–90 % at n = 200. Cause not established. |
How the identification problem changed during validation
- A simple pooled regression overestimated coupling about 2–3× (shared own-decay forced onto patients whose impairment differs).
- 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).
- Instrumenting with the state two steps earlier and including the recorded disturbance gave correct signs everywhere and correct magnitude on two links.
- Remaining bias persisted at n = 200. It is reported as is, not tuned away.
Changes made to the uploaded Sākṣī app
- Removed the Cloudflare analytics beacon. The app's About page promises "no cloud, no accounts, no analytics", and the beacon contradicted that.
- Fixed a save bug: "Save today's check-in" wrote to whichever participant was selected in the Clinician tab's dropdown (default A), so a volunteer's entry could be filed under a demo patient. It now always saves to the volunteer record that the Mirror tab reads.
- Added a link back to this site. Everything else is unchanged: open the 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.