This function runs a deterministic two-way sensitivity analysis (TWSA) on a given function that produces outcomes.
Usage
run_twsa_det(
params_range,
params_basecase,
nsamp = 40,
FUN,
outcomes = NULL,
strategies = NULL,
progress = TRUE,
...
)Arguments
- params_range
data.frame with 2 rows and 3 columns in the following order: "pars", "min", and "max". The number of samples from this range is determined by
nsamp. "pars" are the 2 parameters of interest, which must be a subset of the parameters fromparams_basecase.- params_basecase
a named list of base case values for input parameters needed by
FUN, the user-defined function.- nsamp
number of parameter values. If
NULL, 40 parameter values are used- FUN
Function that takes the base case in
params_alland...to produce theoutcomeof interest. TheFUNmust 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
FUNproduced bynsamp- strategies
vector of strategy names. The default (NULL) will use strategy names in FUN
- progress
TRUEorFALSEfor whether or not function progress should be displayed in console.- ...
Additional arguments to user-defined
FUN
