Markov Models for Health Economic Evaluations

An implementation of the modelling and reporting features described in reference textbooks and guidelines: deterministic and probabilistic sensitivity analysis, heterogeneity analysis, time dependency on state-time and model-time (semi-Markov and non-homogeneous Markov models), etc.

heemod is an R toolset for health economic evaluation modelling. It aims to provide a simple and consistent interface for Markov models specification and comparison (for decision trees or cohort simulation). Non-homogeneous Markov models (with time varying properties) are supported.

Most of the analyses presented in Decision Modelling for Health Economic Evaluation can be performed with heemod. See vignette("i-reproduction", "heemod") for an exact reproduction of the analyses from the book.

You can install:

  • the latest released version from CRAN with:
  • the latest development version from github with:
  • Graphical user interface with shiny.
  • Time-varying transition probabilities.
  • Time-varying values attached to states.
  • Microsimulation-like models.
  • Probabilistic uncertainty analysis (PSA).
  • Covariance analysis for PSA.
  • Deterministic sensitivity analysis (DSA).
  • Multiple state membership correction methods (life-table, half-cycle, etc.).
  • Demographic analysis to compute population-level results.
  • Heterogeneity analysis.
  • Parallel computing support.

To get started read the introduction in vignette("a-introduction", "heemod"). Time-varying probabilities and values are explained in vignette("b-time-dependency", "heemod").

Specific analysis examples (mostly inspired from Decision Modelling for Health Economic Evaluation) can be found in the following vignettes:

  • Homogeneous Markov model in vignette("c-homogeneous", "heemod").
  • Non-homogeneous Markov model in vignette("d-non-homogeneous", "heemod").
  • Probabilistic uncertainty analysis in vignette("e-probabilistic", "heemod").
  • Deterministic sensitivity analysis in vignette("f-sensitivity", "heemod").
  • Heterogeneity & Demographic analysis in vignette("g-heterogeneity", "heemod").
  • Running the models from tabular inputs in vignette("h-tabular", "heemod").

Kevin Zarca and Antoine Filipović-Pierucci.


heemod 0.7.1

  • Fixed an error resulting in incorrect covariance analysis results when relations between values and parameters were negative.

heemod 0.7.0

  • Some plotting arguments changed (e.g. type=>results).
  • Added covariance analysis for PSA with type = "cov" plot.
  • All plotting functions can now represent multiple strategies with facets.
  • CECA plotted on a log scale by default.
  • Black & white plots for publications with the bw plot option.
  • Remove variables that are not sensitive in DSA with remove_ns.
  • Important object structure change (from attributes to lists).
  • More systematic use of getter functions.
  • More standarized processing of model objects.
  • Unit tests rely less on printed results.
  • Using new nomenclature in backend functions (model=>strategy).
  • base_strategy divided in 3 concepts: central_strategy, root_strategy, noncomparable_strategy.
  • Non-heemod versions of discount() throw warnings.

heemod 0.6.0

  • Base model cannot be specified anymore: it is always the least costly model.
  • Renamed arguement transition_matrix => transition in define_strategy().
  • Parallel computing with use_cluster().
  • Compute average values from PSA.
  • Acceptability curve returns probabilities at 0.
  • Correctly identify efficiency frontier.
  • ICER are computed on the efficiency frontier.

heemod 0.5.1

  • Added formatR to suggest list.

heemod 0.5.0

  • Some functions were renamed for clarification:
    • define_model() => define_strategy()
    • run_models() => run_model()
    • define_matrix() => define_transition()
    • define_sensitivity() => define_dsa()
    • define_distrib() => define_psa()
    • run_sensitivity() => run_dsa()
    • run_probabilistic() => run_psa()
  • Values and probabilities can depend on state time with state_cycle, allowing to reproduce the results of microsimulations.
  • define_sensitivity() now accepts any expression as input, and can call references to model parameteres.
  • Discount rates can now be specified as parameters (allows for rates to be modified in DSA & PSA).
  • Any state value can be plotted.
  • Additional output: csv files for many of the tabular results.
  • Edges where P=0 are not plotted anymore for transition matrices.
  • There used to be a potential error when you wanted to save output but there had been no psa.

heemod 0.4.0

  • update() for heterogeneity analysis and to compute population-level values, with vignette.
  • run_models_tabular() to import models from tabular input, with vignette.
  • look_up() to look up values from external data.
  • Added option to pool female and male mortality rates in WHO data.
  • Counting method now defaults to life-table.
  • plot_sensitivity() now plots by default the widest bar on top.
  • Convenience functions for converting rates to probabilities.
  • Models can be run without state values, to compute counts only.
  • Much more informative error messages.
  • Objects can be converted to the R code to generate them (same idea as dput(), but easier to read).
  • New options heemod.verbose and heemod.memotime.
  • More informative messages, especially in verbose mode.
  • Use WHO data cached localy in case of connection problems.
  • New functions: get_counts() and get_init() to get state membership counts.
  • Smart sex code conversion for get_who_mr().
  • really fixed problem when the argument to discount() was not defined as a parameter.
  • eval_model_newdata(), the function behind resampling and sensitivity analysis now returns list-variables.

heemod 0.3.3

  • Added a vignette to exactly reproduce results from Decision Modelling for Health Economic Evaluation.
  • Fixed problem when argument to discount() was not defined as a parameter.
  • Corrected several errors in the vignettes (thanks to Michael Schenkenberg from SBU, Stockholm, Sweden).
  • Updated mortality rate tests to reflect GHO database update.

heemod 0.3.2

  • Fix mishandling of matrix index with C in eval_matrix() (thanks to Matthew Wiener).
  • Fix problem with upcoming version of tidyr.

heemod 0.3.1

  • A single set of parameters is now used for a set of models.
  • Correct error in probabilistic analysis vignette.
  • Fix incompatibility with upcoming dplyr update.

heemod 0.3.0

  • shiny interface.
  • Added support for different counting options.
  • get_who_mr() to extract mortality rates from WHO data.

heemod 0.2.0

  • Added ability to plot matrix.
  • Added framework for probabilistic uncertainty analysis.
  • Written vignette for probabilistic and sensitivity analysis.
  • Added complement alias for matrix definition.
  • run_* functions now output a single table instead of a list of tables.
  • Variables corresponding to cost and effect must now be specified in run_models().
  • Plotting for sensitivity and probabilistic analysis.
  • added *_ functions.
  • run_model_newdata() cannot run uneval_model anymore.
  • Removed need to use define_state_list().

heemod 0.1.0

  • Intial CRAN submission.

Reference manual

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


0.9.2 by Antoine Filipovic-Pierucci, 4 months ago,

Report a bug at

Browse source code at

Authors: Antoine Filipovic-Pierucci [aut, cre], Kevin Zarca [aut], Matthew Wiener [ctb], Zdenek Kabat [ctb], Vojtech Filipec [ctb], Jordan Amdahl [ctb], Yonatan Carranza Alarcon [ctb], Vince Daniels [ctb]

Documentation:   PDF Manual  

GPL (>= 3) license

Imports dplyr, ggplot2, lazyeval, memoise, mvnfast, plyr, pryr, tibble

Suggests BCEA, diagram, flexsurv, Hmisc, knitr, logitnorm, lpSolve, mgcv, optimx, parallel, readxl, rgho, rmarkdown, stringr, survival, testthat, triangle, XLConnect

See at CRAN