Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
Comparative Study
. 2018 Apr;38(3):400-422.
doi: 10.1177/0272989X18754513.

Microsimulation Modeling for Health Decision Sciences Using R: A Tutorial

Affiliations
Comparative Study

Microsimulation Modeling for Health Decision Sciences Using R: A Tutorial

Eline M Krijkamp et al. Med Decis Making. 2018 Apr.

Abstract

Microsimulation models are becoming increasingly common in the field of decision modeling for health. Because microsimulation models are computationally more demanding than traditional Markov cohort models, the use of computer programming languages in their development has become more common. R is a programming language that has gained recognition within the field of decision modeling. It has the capacity to perform microsimulation models more efficiently than software commonly used for decision modeling, incorporate statistical analyses within decision models, and produce more transparent models and reproducible results. However, no clear guidance for the implementation of microsimulation models in R exists. In this tutorial, we provide a step-by-step guide to build microsimulation models in R and illustrate the use of this guide on a simple, but transferable, hypothetical decision problem. We guide the reader through the necessary steps and provide generic R code that is flexible and can be adapted for other models. We also show how this code can be extended to address more complex model structures and provide an efficient microsimulation approach that relies on vectorization solutions.

Keywords: Markov model; R project; decision-analytic modeling; microsimulation; open source software.

PubMed Disclaimer

Figures

Figure 1:
Figure 1:
Schematic representation of the Sick-Sicker microsimulation model. In the extended microsimulation model the underlined probabilities (p.S1D and p.S2D) are adjusted to incorporate time-dependent transitions.
Figure 2:
Figure 2:
Trajectories between health states for three individuals in the Sick-Sicker microsimulation model demonstrating in which health state the individual occupied during each cycle of the simulation. In addition, this figure demonstrates the heterogeneity between individuals. Health state 1: Healthy (H), 2: Sick (S1), 3: Sicker (S2) and 4: Dead (D).
Figure 3:
Figure 3:
Graphical representation of the state costs (black squares, left y-axis) and QALY (gray dots, right y-axis) associated with individual trajectories of the first three individuals in the simple microsimulation model during all cycles.
Figure 4:
Figure 4:
Histograms of the individual costs (top) and individual QALY (bottom) outcomes for the no-treatment strategy for the simple microsimulation model (n=100,000).
Figure 5:
Figure 5:
Markov cohort trace (left) and the microsimulation trace of the simple microsimulation (right) for different numbers of individuals (gray line: n=100; black line: n=100,000). The y-axis represents the proportion of individuals in each health state. Since all individuals start healthy, the solid line (H) starts at 1. Over time, the individuals transit from H (solid line going down) towards other health states (other lines increases).
Figure 6:
Figure 6:
Cost-effectiveness analysis results from the simple microsimulation model with increasing number of individuals (up to n=100,000). The x-axis represent the number of individuals in the microsimulation model, the y-axis are the values for the incremental costs ($), incremental QALYs and ICER ($/QALY). Horizontal red line: cohort model results. Left top: Convergence of incremental costs, right top: convergence of QALYs left bottom: convergence of the ICER.
Figure 7:
Figure 7:
Trace of the simple microsimulation (gray line) and the extended microsimulation (black line) during all cycles. The y-axis represents the proportion of individuals in each health state. Since all individuals start healthy the solid line starts at 1. Over time, the individuals transit from healthy (H, solid line going down) towards other health states: sick (S1, dashed line), sicker (S2, dotted line) and dead (D, dot-dash line) (other lines increases). The gray and black line of the states H (solid) and S1 (dashed) overlap.

Similar articles

Cited by

References

    1. Friedman SG. Current management of the patient with internal carotid artery occlusion. European journal of vascular surgery. 1989;3(2):97–101. doi:10.1111/j.1475-6773.2008.00872.x. - DOI - PubMed
    1. Kattan M Encyclopedia of Medical Decision Making. 2455 Teller Road, Thousand Oaks California 91320 United States: SAGE Publications, Inc.; 2009. doi:10.4135/9781412971980. - DOI
    1. Kreke JE, Schaefer AJ, Roberts MS. Simulation and critical care modeling. Current opinion in critical care. 2004;10(5):395–8. Available at: http://www.ncbi.nlm.nih.gov/pubmed/15385758. - PubMed
    1. Roberts M, Russell LB, Paltiel AD, et al. Conceptualizing a model: a report of the ISPOR-SMDM Modeling Good Research Practices Task Force−−2. Value in health : the journal of the International Society for Pharmacoeconomics and Outcomes Research. 2012;15(6):804–11. doi:10.1016/j.jval.2012.06.016. - DOI - PMC - PubMed
    1. Caro JJ, Briggs AH, Siebert U, Kuntz KM, ISPOR-SMDM Modeling Good Research Practices Task Force. Modeling good research practices--overview: a report of the ISPOR-SMDM Modeling Good Research Practices Task Force−−1. Value in health : the journal of the International Society for Pharmacoeconomics and Outcomes Research. 2012;15(6):796–803. doi:10.1016/j.jval.2012.06.012. - DOI - PubMed

Publication types

LinkOut - more resources