The vignettes in the vignettes folder and the Articles tab in the darthpack
website are meant to guide you through the R
code-based functions of darthpack
with a fully functional decision model to showcase the framework described by the Decision Analysis in R for Technologies in Health (DARTH) workgroup in the manuscript A need for change! A coding framework for improving transparency in decision modeling (Alarid-Escudero F 2019). For a more detailed description of the usage and installation of darthpack
, we refer the reader to the package’s website (https://darth-git.github.io/darthpack/). The framework is divided into different directories, described in Table 1 of the main manuscript, that could be accessed from the RStudio project darthpack.Rproj. We refer to the directory names of this framework and scripts stored in these directories using italic style. These vignettes are created with R Markdown and are located in the vignettes directory of the framework. The figures for the case-study can be found in the figs directory, data required to conduct some of the analyses of the different components are in the data and data-raw directories and the R
scripts with functions, are located in the R directory. The main R
scripts that conduct the analyses of the different components of the framework are stored in the analysis
directory. In this document we do not show all the R
code we refer to. Therefore, it is important to follow along while reading this document. To make sure you have all the required packages needed to run all the code, first install all the required and suggested packages in DESCRIPTION file in the main directory of darthpack
.
The file Shiny_framework.R
in the main folder is a R Shiny application that encompasses all our analyses for our Sick-Sicker case study. Specifically, it contains model calibration, model validation, probabilistic sensitivity and deterministic analysis, sensitivity analyses, and value of information analysis. In addition, it allows the user to modify the model structure and input parameters including initial age of the cohort, probabilities, utilities and costs. The summary and visualization of results are displayed in the panel upon upon a simply click. All R
code are run in the background so the user would not have to program or run any code. Through this app, we demonstrate how we modelers can build user-friendly, “click-based” applications for people who wish to use our models.
To use this app, simply open Shiny_framework.R
and click the green Run App button on the top right corner of the script window.
The book describing our Sick-Sicker case study is written in R Markdown using the bookdown
package. More about books written in R Markdown using bookdown
can be found on this website: https://bookdown.org/yihui/bookdown/. When you like to generate the book yourself using Markdown you need to install the bookdown
package from CRAN or GitHub:
install.packages("bookdown")
# or the development version
# devtools::install_github("rstudio/bookdown")
To compile this example to PDF, you need XeLaTeX. You are recommended to install TinyTeX (which includes XeLaTeX): https://yihui.name/tinytex/.
Alarid-Escudero F, Pechlivanoglou P, Krijkamp E. 2019. “A need for change! A coding framework for improving transparency in decision modeling.” PharmacoEconomics (In press). doi:10.1007/s40273-019-00837-x.