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)

hesim is a modular and computationally efficient R package for health
economic simulation modeling and decision analysis that provides a
general framework for integrating statistical analyses with economic
evaluation. The package supports cohort discrete time state transition
models (DTSTMs), N-state partitioned survival models (PSMs), and
individual-level continuous time state transition models (CTSTMs),
encompassing both Markov (time-homogeneous and time-inhomogeneous) and
semi-Markov processes. It heavily utilizes Rcpp and data.table,
making individual-level simulation, probabilistic sensitivity analysis
(PSA), and incorporation of patient heterogeneity fast.
Features of the current version can be summarized as follows:
R based model or from an external
sourceC++ to boost performanceYou can install the current release from CRAN or the most up to date development version from GitHub.
# Install from CRAN:
install.packages("hesim")
# Install the development version from GitHub:
# install.packages("devtools")
devtools::install_github("hesim-dev/hesim")
There are two good places to start:
The Introduction to
hesim
article provides a quick introduction.
Our preprint describes the package (including mathematical details) more thoroughly.
You might also want to explore our example analyses which can be found in the preprint and web articles. They are summarized in the table below, with some drawn from the Decision Modeling for Health Economic Evaluation textbook. Key areas of focus are the (i) statistical models of disease progression (in terms of the baseline risk and relative treatment effects) and (ii) the available data (either individual patient data (IPD) or aggregate-level data).
|
Baseline risk |
Treatment effect |
||||||
|---|---|---|---|---|---|---|---|
| Name | Model | Disease model | Disease data | Disease model | Disease data | Application | |
| 1 | \” style=” ” \>Preprint 4.1\ | iCTSTM | Multi-state model | IPD | Coefficient (AFT) | IPD | Oncology |
| 2 | \” style=” ” \>Preprint 4.2\ | PSM | Survival models | IPD | Coefficient (AFT) | Aggregate | Oncology |
| 3 | \” style=” ” \>Preprint 4.3\ | cDTSTM | Multi-state model (panel data) | IPD | RR | Aggregate | Oncology |
| 4 | \” style=” ” \>Simple Markov cohort\ | cDTSTM | Multinomial | Aggregate | RR | Aggregate | HIV |
| 5 | \” style=” ” \>Time inhomogeneous Markov (cohort)\ | cDTSTM | Custom | Aggregate | Coefficient (HR) | Aggregate | Hip replacement |
| 6 | \” style=” ” \>Multinomial logit\ | cDTSTM | Multinomial logit | IPD | Coefficient (OR) | IPD | Generic |
| 7 | \” style=” ” \>Time inhomogeneous Markov (individual)\ | iCTSTM | Custom | Aggregate | Coefficient (HR) | Aggregate | Hip replacement |
| 8 | \” style=” ” \>Semi-Markov multi-state\ | iCTSTM | Multi-state model | IPD | Coefficient (AFT) | IPD | Generic |
| 9 | \” style=” ” \>4-state PSM\ | PSM | Survival models | IPD | Coefficient (AFT) | IPD | Oncology |
| Note: iCTSTM = Individual-level continuous time state transition model; PSM = partitioned survival model; cDTSTM = Cohort discrete time state transition model. AFT = accelerated failure time; RR = relative risk; HR = hazard ratio; OR = odds ratio. IPD = individual patient data. |
If you use hesim, please cite as follows:
To cite package 'hesim' in publications use:
Devin Incerti and Jeroen P Jansen (2021). hesim: Health Economic
Simulation Modeling and Decision Analysis. arXiv:2102.09437
[stat.AP], URL https://arxiv.org/abs/2102.09437.
A BibTeX entry for LaTeX users is
@Misc{incerti2021hesim,
author = {Devin Incerti and Jeroen P. Jansen},
title = {hesim: Health Economic Simulation Modeling and Decision Analysis},
year = {2021},
eprint = {2102.09437},
archiveprefix = {arXiv},
primaryclass = {stat.AP},
url = {https://arxiv.org/abs/2102.09437},
}