Learn R Programming

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

547

Version

1.0.2.1000

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

David Garibay

Last Published

September 30th, 2024

Functions in dampack (1.0.2.1000)

offset_trans

transformation for owsa_tornado
plot.evppi

Plot of Expected Value of Partial Perfect Information (EVPPI)
gen_psa_samp

Generate PSA Sample
hund_strat

Sample deterministic data for testing
plot.evsi

Plot of Expected Value of Sample Information (EVSI)
number_ticks

Number of ticks for ggplot2 plots
plot.exp_loss

Plot of Expected Loss Curves (ELC)
plot.icers

Plot of ICERs
example_psa_obj

Sample PSA data for testing
mm_run_reg

Build formula and run linear regression for metamodel
gamma_params

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

Calculate incremental cost-effectiveness ratios from a psa object.
compute_icers

compute icers for non-dominated strategies
create_dsa_oneway

Create one-way deterministic sensitivity analysis object
print.metamodel

Print metamodel
predict_smooth_ga

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

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

plot the optimal strategy as the parameter values change
owsa

One-way sensitivity analysis
owsa_tornado

Tornado plot of a one-way sensitivity analysis
summary.ceac

Summarize a ceac
dirichlet_params

Calculate alpha parameters of Dirichlet distribution.
summary.metamodel

Summary of metamodel
example_psa

Sample PSA data for testing
run_twsa_det

Run deterministic two-way sensitivity analysis (TWSA)
wrapper_of_user_model

Wrapper function for owsa_det and twsa_det
rdirichlet

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

Run deterministic one-way sensitivity analysis (OWSA)
plot.owsa

Plot a sensitivity analysis
plot.psa

Plot the psa object
predict_matrix_tensor_smooth_ga

Predict matrix tensor smooth (GA)
metamodel

Linear regression metamodeling
make_psa_obj

Create a PSA object
is_owsa

check that object is owsa object
predict_ga

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

used to automatically label continuous scales
plot.ceac

Plot of Cost-Effectiveness Acceptability Curves (CEAC)
create_dsa_twoway

Create one-way deterministic sensitivity analysis object
plot.evpi

Plot of Expected Value of Perfect Information (EVPI)
print.sa

print a psa object
twsa

Two-way sensitivity analysis using linear regression metamodeling
psa_cdiff

Sample PSA dataset
summary.psa

summarize a psa object across all simulations
lnorm_params

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

Two-way sensitivity analysis plot
create_sa

A generic sensitivity analysis object
make_param_seq

make a parameter sequence
predict.metamodel

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

Calculate incremental cost-effectiveness ratios (ICERs)
add_common_aes

Adds aesthetics to all plots to reduce code duplication
beta_params

Calculate alpha and beta parameters of beta distribution.
calc_evpi

Expected Value of Perfect Information (EVPI)
calc_evsi

Calculate Expected Value of Sample Information (EVSI)
calculate_outcome

A function that is used to calculate all outcomes
ceac

Cost-Effectiveness Acceptability Curve (CEAC)
calc_exp_loss

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

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