Back

A Tutorial on Discrete Event Simulation Models in R Using a Cost-Effectiveness Analysis Example

Lopez-Mendez, M.; Goldhaber-Fiebert, J. D.; Alarid-Escudero, F.

2025-05-16 epidemiology
10.1101/2025.05.15.25327635 medRxiv
Show abstract

Discrete Event Simulation (DES) is a flexible and computationally efficient approach for modeling diverse processes; however, DES remains underutilized in healthcare and medical decision-making due to a lack of reliable and reproducible implementations. We developed an open-source DES framework in R to simulate individual-level state-transition models (iSTMs) in continuous time accounting for treatment effects, time dependence on state residence, and age-dependent mortality. Our DES implementation employs a modular and easily adaptable structure, with each module corresponding to a unique transition between health states. To simulate the evolution of the process (i.e., individual state-transitions), we adapted the next-reaction algorithm from the stochastic chemical reactions literature. Simulation-time dependence (age-dependent mortality) and state residence time dependence (transition from Sick to Sicker) are seamlessly incorporated into the DES framework via validated non-parametric and parametric sampling routines (e.g., inversion method) of event times. Treatment effects are integrated as scaling factors of the hazard functions (proportional hazards). We illustrate the frameworks benefits by implementing the Sick-Sicker Model and conduct a cost-effectiveness analysis and probabilistic analysis. We also obtain epidemiological outcomes of interest from the DES output, such as disease prevalence, survival probabilities, and distributions of state-specific dwell times. Our DES framework offers a reliable and accessible alternative that enables the simulation of more realistic dynamics of state-transition processes at potentially lower implementation and computational costs than discrete-time iSTMs. HiglightsO_LIDiscrete event simulation (DES) is a flexible and efficient approach to simulate diverse processes in model-based decision analysis. C_LIO_LIThe tutorial presents an open-source DES framework in R to simulate individual-level State-Transition Models (iSTMs) in continuous time. C_LIO_LIThe modular structure of our DES framework accommodates treatment effects, time-dependent transitions, and age-dependent mortality using validated sampling methods. C_LIO_LIThe coded example uses the Sick-Sicker model to compute a cost-effectiveness analysis (CEA), epidemiological outcomes, probabilistic analysis (PA), and value of information analysis (VOI). C_LI

Published in Medical Decision Making (predicted rank #3) · training set

Matching journals

The top 4 journals account for 50% of the predicted probability mass.

50% of probability mass above

"Similar papers" are the closest papers from that journal in the model's embedding space. They show what the match is built on, but the ranking comes mostly from a classifier over the whole training set, not from these examples alone.