darthpack
is an R package
that showcases the Decision Analysis in R for Technologies in Health
(DARTH) coding framework to construct
model-based cost-effectiveness analysis in R. The main website of
darthpack
can be found here.
darthpack
is part of the
following manuscript:
- Alarid-Escudero F, Krijkamp E, Pechlivanoglou P, Jalal H, Kao SY, Yang A, Enns EA. “A need for change! A coding framework for improving transparency in decision modeling”. PharmacoEconomics 2019;37(11):1329–1339. http://dx.doi.org/10.1007/s40273-019-00837-x
The release that accompanies the published article has been archived in zenodo: https://zenodo.org/record/3445451.
To learn more on Markov/cohort state-transition model in R, we recommend reading our introductory tutorial on time-independent cSTMs in R:
- Alarid-Escudero F, Krijkamp EM, Enns EA, Yang A, Hunink MGM, Pechlivanoglou P, Jalal H. An Introductory Tutorial on Cohort State-Transition Models in R Using a Cost-Effectiveness Analysis Example. Medical Decision Making, 2023;43(1):3-20. https://doi.org/10.1177/0272989X221103163,
our intermediate tutorial on time-dependent cohort state-transition models (cSTMs) in R:
- Alarid-Escudero F, Krijkamp EM, Enns EA, Yang A, Hunink MGM, Pechlivanoglou P, Jalal H. A Tutorial on Time-Dependent Cohort State-Transition Models in R using a Cost-Effectiveness Analysis Example. Medical Decision Making. 2023;43(1):21-41. https://doi.org/10.1177/0272989X221121747,
and understanding the use of multidimensional arrays to represent cSTM dynamics in R described in:
- Krijkamp EM, Alarid-Escudero F, Enns EA, Pechlivanoglou P, Hunink MGM, Yang A, Jalal HJ. A multidimensional array representation of state-transition model dynamics. Medical Decision Making, 2020;40(2):242-248. https://doi.org/10.1177/0272989X19893973
- Install RStudio
- Install
devtools
to installdarthpack
as a package and modify it to generate your own package
# Install release version from CRAN
install.packages("devtools")
# Or install development version from GitHub
# devtools::install_github("r-lib/devtools")
- Install
pkgdown
to publishdarthpack
or your owndarthpack
-based repository or package as a website (optional)
# Install release version from CRAN
install.packages("pkgdown")
# Or install development version from GitHub
# devtools::install_github("r-lib/pkgdown")
darthpack
repository could be used in at least three different ways:
- GitHub coding
template for using it
to generate a repository of your own model-based decision or
cost-effectiveness analysis linked to the original
darthpack
GitHub repository - Regular coding template for using it to generate a repository of your own model-based decision or cost-effectiveness analysis
- R package for using it as a standalone
package to run current functions of
darthpack
The main website of the package could be found in: https://darth-git.github.io/darthpack/
- Sign in to GitHub. You need to sign in to use this repository as a template. If you don’t have a GitHub account, you can create one here.
- On the
darthpack
GitHub repository, navigate to the main page of the repository (https://github.com/DARTH-git/darthpack). - Above the file list, click Use this template.
- Use the Owner drop-down menu, and select the account you want to own the repository.
- Type a name for your repository of your decision model, and an optional description.
- Choose to make the repository either public or private. Public repositories are visible to the public, while private repositories are only accessible to you, and people you share them with. For more information, see “Setting repository visibility.”
- Click Create repository from template.
- Either clone the repository or download it.
- Clone, which requires the user to have a GitHub desktop installed, or
- Download zip that will ask the user to download the whole repository as a .zip file.
- Open the RStudio project
darthpack.Rproj
. - Install all the required and suggested packages listed in the
DESCRIPTION
file in the main folder of the repository
- To install
dampack
, please follow these instructions:
- To install
# Install development version from GitHub
devtools::install_github("DARTH-git/dampack")
- In RStudio, load all the functions and data from the repository by
typing
devtools::load_all(".")
- Run all the decision modeling modules in the analysis folder.
- On the
darthpack
GitHub repository, navigate to the main page of the repository (https://github.com/DARTH-git/darthpack). - Above the file list, click Clone or download and select either
- Open in desktop, which requires the user to have a GitHub desktop installed, or
- Download zip that will ask the user to download the whole repository as a .zip file.
- Open the RStudio project
darthpack.Rproj
. - Install all the required and suggested packages listed in the
DESCRIPTION
file in the main folder of the repository
- To install
dampack
, please follow these instructions:
- To install
# Install development version from GitHub
devtools::install_github("DARTH-git/dampack")
- In RStudio, load all the functions and data from the repository by
typing
devtools::load_all(".")
- Run all the decision modeling modules in the analysis folder.
- Install the development version of
darthpack
from GitHub with:
devtools::install_github("DARTH-git/darthpack")
- Load all the functions and data from the repository by typing
library(darthpack)
Once the framework has been modified and updated to your specific needs,
run pkgdown
from the package directory each time you release your
package:
pkgdown::build_site()
For a more detailed description on how to quickly and easily build a website for your package, please go to https://github.com/r-lib/pkgdown and