Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

owsa_opt_strat

plot the optimal strategy as the parameter values change


Description

plot the optimal strategy as the parameter values change

Usage

owsa_opt_strat(
  owsa,
  params = NULL,
  maximize = TRUE,
  return = c("plot", "data"),
  plot_const = TRUE,
  col = c("full", "bw"),
  greystart = 0.2,
  greyend = 0.8,
  txtsize = 12,
  facet_ncol = 1,
  facet_nrow = NULL,
  facet_lab_txtsize = NULL,
  n_x_ticks = 10
)

Arguments

owsa

An owsa object

params

vector of parameters to plot

maximize

whether to maximize (TRUE) or minimize the outcome

return

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

plot_const

whether to plot parameters that don't lead to changes in optimal strategy as they vary.

col

either none, full color, or black and white

greystart

between 0 and 1. used in greyscale only. smaller numbers are lighter

greyend

between 0 and 1, greater than greystart.

txtsize

base text size

facet_ncol

Number of columns in plot facet.

facet_nrow

number of rows in plot facet.

facet_lab_txtsize

text size for plot facet labels

n_x_ticks

number of axis ticks

Value

If return == "plot", a ggplot2 optimal strategy plot derived from the owsa object, or if return == "data", a data.frame containing all data contained in the plot. The plot allows us to see how the strategy that maximizes the expectation of the outcome of interest changes as a function of each parameter of interest.


dampack

Decision-Analytic Modeling Package

v1.0.0
GPL-3
Authors
Fernando Alarid-Escudero [aut], Greg Knowlton [aut, cre], Caleb Easterly [aut], Eva Enns [aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.