run_psa: Calculate outcomes for a PSA using a user-defined function.

Description Usage Arguments Value See Also

View source: R/run_psa.R

Description

run_psa calculates outcomes using a user-defined function and creates PSA objects corresponding to the specified outcomes.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
run_psa(
  psa_samp,
  params_basecase = NULL,
  FUN,
  outcomes = NULL,
  strategies = NULL,
  currency = "$",
  progress = TRUE,
  ...
)

Arguments

psa_samp

A dataframe with samples of parameters for a probabilistic sensitivity analysis (PSA)

params_basecase

a named list of basecase values for input parameters needed by FUN, the user-defined function.

FUN

Function that takes the parameter values in psa_samp and ... to produce the outcome of interest. The FUN must return a dataframe where the first column are the strategy names and the rest of the columns must be outcomes.

outcomes

String vector with the outcomes of interest from FUN.

strategies

vector of strategy names. The default NULL will use strategy names in FUN

currency

symbol for the currency being used (ex. "$", "£")

progress

TRUE or FALSE for whether or not function progress should be displayed in console.

...

Additional arguments to user-defined FUN

Value

A list containing PSA objects for each outcome in outcomes.

See Also

run_psa, make_psa_obj, gen_psa_samp,


dampack documentation built on May 31, 2021, 1:06 a.m.