Library/Health and life sciences
Medication adherence
This is an illustrative, uncalibrated simulation.
Category: Health and Life Sciences
> This is an illustrative, uncalibrated simulation. It is a teaching tool for exploring how medication adherence and health interact over time. It is not a scientifically validated model and its numbers should not be used for clinical or policy decisions.
The mechanism
Each patient has two state variables:
- Adherence (0–1): the probability that the patient takes today's dose.
- Health (0–1): 1 means fully healthy, 0 means the patient dies.
Every day (tick):
1. Visit: with probability visit-frequency (%) the patient moves to the clinic (the green patches in the center). This is a simple spatial element; the clinic is where care is conceptually received. 2. Dose: the patient takes the dose with probability equal to their current adherence. Taking a dose restores health by dose-effect. 3. Decay: health decays by health-decay each day, and the decay is multiplied by (1 + 0.1 × days-since-dose), so the longer it has been since the last dose, the faster health falls. 4. Adherence drift: adherence moves toward a motivation level. Motivation is 1 − health: when a patient feels unwell (low health) they are more motivated to take doses; when they feel fine (high health) they are more likely to skip doses. The speed of this drift is adherence-drift. 5. Death: if health reaches 0 the patient dies (removed from the world).
This creates a feedback loop: poor adherence → declining health → higher motivation → better adherence → improved health → lower motivation → worse adherence. The strength of the loop is controlled by adherence-drift.
Controls
| Widget | Meaning | Units | |---|---|---| | initial-patients | Number of patients created at setup | patients | | visit-frequency | Chance per day that a patient visits the clinic | % | | dose-effect | Health restored by one dose | health points (0–1 scale) | | health-decay | Base health loss per day | health points/day | | adherence-drift | Speed at which adherence responds to motivation | 0–0.3 |
Monitors and plot
- Days – the simulation clock.
- Alive patients – number of patients still in the world.
- Mean adherence – average adherence across alive patients.
- Mean health – average health across alive patients.
- The plot shows mean adherence (blue), mean health (green) and alive patients (red) over time.
Assumptions and limitations
- Adherence is a single scalar; real adherence depends on many factors (cost, side effects, beliefs, regimen complexity).
- Health is a single 0–1 number; real disease progression is far more complex.
- The clinic is decorative in this version: visiting it does not change adherence directly. It is a placeholder for future extensions (e.g., a nurse visit that boosts adherence).
- There is no transmission, no aging, no new patients, and no treatment resistance.
- All parameters are arbitrary and chosen for a stable, visible demo; they are not calibrated to any real data.
- The world is small (41×41 patches) and the population is bounded (10–100 patients) to keep the simulation fast and readable.
How to use
1. Press Setup to create the patients and the clinic. 2. Press Go to start the daily cycle. 3. Adjust the sliders while the model runs to see how dose strength, decay rate and adherence drift change the long-run pattern. 4. Watch the plot: a high adherence-drift produces oscillations; a low one lets adherence settle.
- Field
- Health and life sciences
- Model file
Medication-adherence-5e35ee7dfccd.nlogox· 43 KB- Controls
initial-patients,visit-frequency,dose-effect,health-decay,adherence-drift- Reporters
mean-adherence,mean-health- Procedures
setup,go,move-to-clinic,take-dose,update-health,update-adherence,mean-adherence,mean-health- Experiment
- none pinned in this file
- Documentation
- 4/7 · 539 words in the Info tab