This function runs a deterministic two-way sensitivity analysis (TWSA) on a given function that produces outcomes.
twsa_det(parm1, parm2, ranges, nsamps = 40, params_basecase, FUN, outcome, strategies = NULL, ...)
parm1 | String with the name of the first parameter of interest |
---|---|
parm2 | String with the name of the second parameter of interest |
ranges | A named list of the form list("parm1" = c(0, 1), ...) that gives
the ranges for the parameters of interest. The number of samples from this
range is determined by |
nsamps | number of parameter values. If NULL, 100 parameter values are used |
params_basecase | List with parameters for the base case |
FUN | Function that takes |
outcome | String with the outcome of interest produced by |
strategies | vector of strategy names. The default (NULL) will use strategy names in FUN |
... | Further arguments to FUN (not used) |
A dataframe with the results of the sensitivity analysis. Can be
visualized with plot.owsa
, and owsa_tornado
FUN must return a dataframe where the first column are the strategy names and the rest of the columns must be outcomes.