Decision modeling – Jupyter notebooks

The purpose of this site is to develop a Jupyter notebook repository of health economic decision modeling (aka, decision analysis) coding examples to support analysts who are learning how to code to solve practical decision problems. A secondary purpose is to have a repository for training artificial intelligence to assist us in tackling more complex decision problems.

For decision modeling will be focusing on the following approaches:

The following open source software packages are used for decision modeling and leverage different approaches: decision trees, Baynesian networks (eg, influence diagrams), mixed-integer linear programming (MILP) (ie, optimization), and agent-based modeling.

  1. R: rdecision: for decision trees
  2. Python: pyAgrum: for influence diagrams with Bayesian networks
  3. Julia: DecisionProgramming.jl: for influence diagrams with MILP
  4. Julia: Agents.jl: for agent-based modeling

We are early in our journey and invite critical feedback, input, and suggestions.

Do you want to contribute a Jupyter notebook? Contact Tomás Aragón.

Special announcements

Building a decision tree model in R (tutorial)

From Mirko von Hein, learn how to build a healthcare decision tree model in R from scratch to calculate ICERs, run one-way sensitivity analyses, and create tornado diagrams for cost-effectiveness analysis.

Here is the R code for this YouTube tutorial (Feb 15, 2026).

Decision models

Decision Analysis (Chapter 2, Petitti 2000)

Source: Overview of the Methods (Chapter 2) in Diana B. Petitti. Meta-Analysis, Decision Analysis, and Cost-Effectiveness Analysis: Methods for Quantitative Synthesis in Medicine. 2nd ed. Monographs in Epidemiology and Biostatistics, v. 31. Oxford University Press, 2000. https://doi.org/10.1093/acprof:oso/9780195133646.001.0001.

For background, see: Tomás Aragón. “Bayes’ Theorem and Decision Analysis for Mortals: Transforming Data into Information, Knowledge, and Wisdom - Part 3.” TEAM Public Health, January 15, 2016. https://teampublichealth.substack.com/p/bayes-theorem-and-decision-analysis.

Elementary decision tree (Evans 1997)

We will replicate the decision analysis from this rdecision R package vignette: https://cran.r-project.org/web/packages/rdecision/vignettes/DT01-Sumatriptan.html

Source: Evans, K. W., J. A. Boan, J. L. Evans, and A. Shuaib. “Economic Evaluation of Oral Sumatriptan Compared with Oral Caffeine/Ergotamine for Migraine.” PharmacoEconomics 12, no. 5 (1997): 565–77. https://doi.org/10.2165/00019053-199712050-00007.

A Primer on Bayesian Decision Analysis (Neapolitan 2016) – PENDING

Source: Neapolitan, Richard, Xia Jiang, Daniela P. Ladner, and Bruce Kaplan. “A Primer on Bayesian Decision Analysis With an Application to a Kidney Transplant Decision.” Transplantation 100, no. 3 (2016): 489–96. https://doi.org/10.1097/TP.0000000000001145.

Appendix

Open Source library of published health economic models

The library is a curated list of open-source health economic models identified through a systematic review conducted by Henderson et al. (2025).1 The purpose of this resource is to make these models easily accessible for decision makers and modeling.

To learn more watch this YouTube video by Mirko von Hein.

Footnotes

  1. Henderson, Raymond H., Chris Sampson, Xavier G. L. V. Pouwels, et al. “Mapping the Landscape of Open Source Health Economic Models: A Systematic Database Review and Analysis: An ISPOR Special Interest Group Report.” Value in Health: The Journal of the International Society for Pharmacoeconomics and Outcomes Research 28, no. 6 (2025): 813–20. https://doi.org/10.1016/j.jval.2025.01.019.↩︎