Learn R Programming

⚠️There's a newer version (1.0.2.1000) of this package.Take me there.

dampack

The Decision Analytic Modeling Package (dampack) is a suite of functions for analyzing and visualizing the health economic outputs of mathematical models.

Created and maintained by Fernando Alarid-Escudero (@feralaes), Greg Knowlton (@gknowlt), and Eva Enns (@evaenns).

This package was developed with funding from the National Institutes of Allergy and Infectious Diseases of the National Institutes of Health under award no. R01AI138783. The content of this package is solely the responsibility of the authors and does not necessarily represent the official views of the National Institutes of Health.

Installation

# Install release version from CRAN
install.packages("dampack")
# Install development version from GitHub
devtools::install_github("DARTH-git/dampack")

Trying to install dampack from Github in a non-US locale on macOS may produce the following error:

Error: (converted from warning) Setting LC_CTYPE failed, using "C"

To solve this problem, run the following code in the terminal:

defaults write org.R-project.R force.LANG en_US.UTF-8 

Vignettes

dampack has a series of vignettes designed to showcase the functionality of the package and explain its underlying methodology. The vignettes serve as a guide for proper usage, and it is highly recommended that new users read any relevant vignettes before using the package. After installing the package, vignettes can be accessed by typing vignette(topic, package = "dampack"), where topic is a character string corresponding to the name of the vignette. There is some overlap between the topics and functions covered in the six vignettes, and they should ideally be read in the following order:

  1. basic_cea
  2. psa_analysis
  3. voi
  4. psa_generation
  5. dsa_generation

Copy Link

Version

Install

install.packages('dampack')

Monthly Downloads

380

Version

1.0.1

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Greg Knowlton

Last Published

May 30th, 2021

Functions in dampack (1.0.1)

gamma_params

Calculate shape and scale (or rate) parameters of a gamma distribution.
create_dsa_oneway

Create one-way deterministic sensitivity analysis object
create_dsa_twoway

Create one-way deterministic sensitivity analysis object
beta_params

Calculate alpha and beta parameters of beta distribution.
plot.icers

Plot of ICERs
psa_cdiff

Sample PSA dataset
gen_psa_samp

Generate PSA Sample
make_psa_obj

Create a PSA object
plot.owsa

Plot a sensitivity analysis
make_param_seq

make a parameter sequence
predict.metamodel

Predict from a one-way or two-way metamodel
owsa_tornado

Tornado plot of a one-way sensitivity analysis
rdirichlet

Random number generation for the Dirichlet distribution with parameter vector alpha.
plot.ceac

Plot of Cost-Effectiveness Acceptability Curves (CEAC)
example_psa

Sample PSA data for testing
predict_ga

Function to compute the preposterior for each of the basis functions of the GAM model.
labfun

used to automatically label continuous scales
dirichlet_params

Calculate alpha parameters of Dirichlet distribution.
metamodel

Linear regression metamodeling
mm_run_reg

Build formula and run linear regression for metamodel
create_sa

A generic sensitivity analysis object
summary.psa

summarize a psa object across all simulations
summary.metamodel

Summary of metamodel
lnorm_params

Calculate location and scale parameters of a log-normal distribution.
owsa

One-way sensitivity analysis
plot.evppi

Plot of Expected Value of Partial Perfect Information (EVPPI)
plot.evpi

Plot of Expected Value of Perfect Information (EVPI)
owsa_opt_strat

plot the optimal strategy as the parameter values change
plot.psa

Plot the psa object
example_psa_obj

Sample PSA data for testing
hund_strat

Sample deterministic data for testing
is_owsa

check that object is owsa object
plot.twsa

Two-way sensitivity analysis plot
predict_matrix_tensor_smooth_ga

Predict matrix tensor smooth (GA)
predict_smooth_ga

Function to compute the preposterior for each of the basis functions of a smooth for one parameter
number_ticks

Number of ticks for ggplot2 plots
print.metamodel

Print metamodel
plot.evsi

Plot of Expected Value of Sample Information (EVSI)
print.sa

print a psa object
plot.exp_loss

Plot of Expected Loss Curves (ELC)
offset_trans

transformation for owsa_tornado
run_twsa_det

Run deterministic two-way sensitivity analysis (TWSA)
summary.ceac

Summarize a ceac
twsa

Two-way sensitivity analysis using linear regression metamodeling
run_owsa_det

Run deterministic one-way sensitivity analysis (OWSA)
run_psa

Calculate outcomes for a PSA using a user-defined function.
wrapper_of_user_model

Wrapper function for owsa_det and twsa_det
calc_evppi

Estimation of the Expected Value of Partial Perfect Information (EVPPI) using a linear regression metamodel approach
ceac

Cost-Effectiveness Acceptability Curve (CEAC)
calc_exp_loss

Calculate the expected loss at a range of willingness-to-pay thresholds
calc_evsi

Calculate Expected Value of Sample Information (EVSI)
calculate_icers

Calculate incremental cost-effectiveness ratios (ICERs)
compute_icers

compute icers for non-dominated strategies
calc_evpi

Expected Value of Perfect Information (EVPI)
add_common_aes

Adds aesthetics to all plots to reduce code duplication
calculate_outcome

A function that is used to calculate all outcomes