run_owsa_det {dampack}R Documentation

Run deterministic one-way sensitivity analysis (OWSA)

Description

This function runs a deterministic one-way sensitivity analysis (OWSA) on a given function that produces outcomes.

Usage

run_owsa_det(
  params_range,
  params_basecase,
  nsamp = 100,
  FUN,
  outcomes = NULL,
  strategies = NULL,
  progress = TRUE,
  ...
)

Arguments

params_range

data.frame with 3 columns in the following order: "pars", "min", and "max". The number of samples from this range is determined by nsamp. "pars" are the parameters of interest and must be a subset of the parameters from params_basecase.

params_basecase

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

nsamp

number of sets of parameter values to be generated. If NULL, 100 parameter values are used

FUN

function that takes the basecase in params_basecase 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 produced by nsamp

strategies

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

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 dataframes with the results of the sensitivity analyses. The list will contain a dataframe for each outcome specified. List elements can be visualized with plot.owsa, owsa_opt_strat and owsa_tornado from dampack

Details


[Package dampack version 1.0.1 Index]