The heRomod package allows users to develop and run cost-effectiveness models in R and is the calculation engine used in the heRo web-based modeling platform. A fork of the HEEMOD package.
You can install the latest released version from github with:
If you want to run the package locally from source
-
Install R (>= 3.4.0) for your platform.
- For Windows users, it is recommended to check Save version number in registry during installation so that the R extension can find the R executable automatically.
- For mac users, use brew to install R and dependencies in terminal
brew install r
brew install libgit2 harfbuzz fribidi freetype2 libpng libtiff libjpeg pandoc
-
Open an R terminal executing
r
in your terminal- In some shells,
r
is a built-in command to re-run the last command.- You can verify it running
which r
. - If the response is
r: shell built-in command
you will need to alias it. - First check the path:
whereis r
- Then open you
rc
file (.bashrc
,.zshrc
or the one you use it) and add:alias r='<your-path-to-r>'
. - For example:
alias r='/opt/homebrew/bin/r'
- Restart your shell
- You can verify it running
- In some shells,
-
Run the following into your R terminal:
install.packages("remotes") install.packages("languageserver") install.packages("usethis") install.packages("pkgdown") install.packages("devtools") remotes::install_github("PolicyAnalysisInc/herotools") remotes::install_github("PolicyAnalysisInc/herosurv")
-
Install the R extension for VS Code from the VS Code Extension Marketplace
-
Test the build command
devtools::install(dependencies=F)
devtools::build(vignettes=T)
-
Run the tests (note - this will take significant time, especially running the heRo model)
devtools::test()
-
Install the Github package manager and Hero remotes
if(!require(remotes)) { install.packages('remotes') } Sys.setenv("R_REMOTES_NO_ERRORS_FROM_WARNINGS" = "true") remotes::install_github("PolicyAnalysisInc/herotools") remotes::install_github("PolicyAnalysisInc/herosurv")
-
Install heromod (if prompted you can install "All")
remotes::install_github("PolicyAnalysisInc/heRomod")
- Support for Markov cohort and partitioned-survival models.
- Comprehensive tools for defining and operation of survival distribtions.
- Probabilistic uncertainty analysis (PSA).
- Cost-effectiveness acceptability curves (CEAC).
- Expected value of perfect information (EVPI).
- Expected value of partially perfect information (EVPPI).
- Deterministic sensitivity analysis (DSA).
- Value-based pricing analysis (VBP).