Health-Economic Simulation Modeling and Decision Analysis

A modular and computationally efficient R package for parameterizing, simulating, and analyzing health-economic simulation models. The package supports cohort discrete time state transition models (Briggs et al. 1998) , N-state partitioned survival models (Glasziou et al. 1990) , and individual-level continuous time state transition models (Siebert et al. 2012) , encompassing both Markov (time-homogeneous and time-inhomogeneous) and semi-Markov processes. Decision uncertainty from a cost-effectiveness analysis is quantified with standard graphical and tabular summaries of a probabilistic sensitivity analysis (Claxton et al. 2005, Barton et al. 2008) , . Use of C++ and data.table make individual-patient simulation, probabilistic sensitivity analysis, and incorporation of patient heterogeneity fast.

Travis-CI Build Status Coverage Status CRAN_Status_Badge hesim is an R package for health economic simulation modeling and decision analysis. The package can help facilitate computationally intensive simulation modeling and be used to analyze the output of simulation models. Current functionality includes:

  • Individualized cost-effectiveness analysis
  • Random sampling for probabilistic sensitivity analysis (PSA) and individual patient simulation (IPS)

To ensure that simulations can be run (and analyzed) in a reasonable amount of time, most functions are written in C++ using Rcpp and data manipulations are performed using the data.table package. hesim is therefore well suited for IPS, PSA, and quantifying structural uncertainty.


hesim can be installed from GitHub using devtools:


It can then be loaded into R:



Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.3.1 by Devin Incerti, 4 months ago

Report a bug at

Browse source code at

Authors: Devin Incerti [aut, cre] , Jeroen P. Jansen [aut] , R Core Team [ctb] (hesim uses some slightly modified C functions from base R)

Documentation:   PDF Manual  

GPL-3 license

Imports data.table, flexsurv, MASS, Rcpp, R6, stats, survival

Suggests covr, ggplot2, kableExtra, knitr, mstate, msm, nnet, numDeriv, pracma, rmarkdown, scales, testthat, truncnorm

Linking to Rcpp, RcppArmadillo

System requirements: C++11

See at CRAN