owsa_tornado {dampack}R Documentation

Tornado plot of a one-way sensitivity analysis

Description

Tornado plot of a one-way sensitivity analysis

Usage

owsa_tornado(
  owsa,
  return = c("plot", "data"),
  txtsize = 12,
  min_rel_diff = 0,
  col = c("full", "bw"),
  n_y_ticks = 8,
  ylim = NULL,
  ybreaks = NULL
)

Arguments

owsa

an owsa object

return

either return a ggplot object plot or a data frame with ranges of parameters for which each strategy is optimal.

txtsize

base text size

min_rel_diff

this function only plots parameters that lead to a relative change in the outcome greater than or equal to min_rel_diff, which must be between 0 and 1. The default (0) is that no strategies are filtered.

col

either none, full color, or black and white

n_y_ticks

number of axis ticks

ylim

vector of axis limits, or NULL, which sets limits automatically

ybreaks

vector of axis breaks. will override n_x_ticks and/or n_y_ticks if provided.

Value

If return == "plot", a ggplot2 tornado plot derived from the owsa object, or if return == "data", a data.frame containing all data contained in the plot. A tornado plot is a visual aid used to identify which parameters are driving most of the variation in a specified model outcome.


[Package dampack version 1.0.1 Index]