Skip to contents

Draw the One-Way Sensitivity Analysis (OWSA) - Tornado plot

Usage

plot_owsa(
  df_owsa = NeuroblastomaPSM::run_owsa(),
  model_func = NeuroblastomaPSM::run_psm,
  model_func_args = list(models_fit = NeuroblastomaPSM::parametric_models, l_params =
    c(time_horizon = 10, cycle_length = 1/12, disc_rate_costs = 0.035, disc_rate_qalys =
    0.015, NeuroblastomaPSM::l_psm_parameters)),
  v_dsa_params = names(NeuroblastomaPSM::l_dsa_parameters),
  l_dsa_params = NeuroblastomaPSM::l_dsa_parameters,
  discounted_output = FALSE,
  cea_metric = "NMB",
  wtp = 30000,
  parameters_labels = NULL,
  show_labels_in_caption = FALSE,
  plot_title = "One-Way Sensitivity Analysis - Tornado plot",
  plot_subtitle = NULL,
  x_axis_label = "Incremental Net Benefit (iNMB)",
  currency_symbol = "$",
  show_basecase_value_label = TRUE,
  drop_insensitive = TRUE,
  plot_bars_width = 0.95,
  plot_colors = c(Lower = "orange", Upper = "skyblue")
)

Arguments

df_owsa

Dataframe containing the names of the parameters included in the One-Way Sensitivity Analysis (OWSA) in addition to the costs, effects, Incremental Cost-Effectiveness Ratio (ICER) and Net Benefit (NB) values resulting from evaluating the decision-analytic model using the corresponding upper and lower values of the included parameters.

model_func

A function to be used for the model, such as the run_psm

model_func_args

A list of model arguments and parameters that are not varied in DSA

v_dsa_params

A character vector of DSA parameter names.

l_dsa_params

A list containing all model DSA parameters. The list is expected to be either l_dsa_parameters or of identical structure.

discounted_output

A logical for whether to use discounted values. Default is `FALSE`.

cea_metric

A character scalar specifying the cost-effectiveness metric to be used in the x-axis of the tornado plot. Supported options are `"NMB"` (default), `"Differential Costs"`, `"Differential QALYs"` or `"ICER"`.

wtp

Numeric scalar defining the cost-effectiveness threshold, willingness-to-pay (WTP) value for the net monetary benefit calculation. Default is `30000.`

parameters_labels

Named character vector showing the labels of each of the parameters listed in the `parameter_name_column` column in the `df_owsa` dataframe. Default is `NULL`.

show_labels_in_caption

Logical for whether to add a caption to the plot showing the labels passed to `parameters_labels`. This argument is ignored if `NULL` was passed to `parameters_labels`. Default is `FALSE`.

plot_title

Character scalar representing the title of the plot. Default is `"One-Way Sensitivity Analysis - Tornado plot"`.

plot_subtitle

Character scalar representing the subtitle of the plot. Default is `NULL`.

x_axis_label

Character scalar to label the x-axis of the plot. Default is `"Incremental Net Benefit (iNMB)"`.

currency_symbol

Character scalar representing the Hex code of the currency symbol to be used as the y-axis-ticks' label. Default is `"$"`.

show_basecase_value_label

Logical for whether to label the vertical line representing the base-case ICER. Default is `TRUE`.

drop_insensitive

Logical scalar specifying whether to remove form the tornado plot parameters that have no effect on the CEA metric.

plot_bars_width

Numeric scalar representing the width of the horizontal colored bars. Default is `0.95` and the accepted values are between `0.1` and `0.99`

plot_colors

String vector of two color names or hex codes. The first and second colors are assigned to the cost-effectiveness metric corresponding to the lower and upper bound values of the assessed parameters, respectively. Passing a named vector with the names `Upper` and `Lower` allows for better control.

Value

A ggplot object depicting the sensitivity of the deterministic cost- effectiveness results to changes in the values of the included parameters.

Examples

if (FALSE) {
owsa_NMB_plot <- NeuroblastomaPSM::plot_owsa(
   df_owsa = NeuroblastomaPSM::run_owsa(),
   model_func = NeuroblastomaPSM::run_psm,
   model_func_args = list(
       "models_fit" = NeuroblastomaPSM::parametric_models,
       "l_params" = c(
           time_horizon = 10,
           cycle_length = 1/12,
           disc_rate_costs = 0.035,
           disc_rate_qalys = 0.015,
           NeuroblastomaPSM::l_psm_parameters
         )
       ),
   v_dsa_params = names(NeuroblastomaPSM::l_dsa_parameters),
   l_dsa_params = NeuroblastomaPSM::l_dsa_parameters,
   discounted_output = FALSE,
   cea_metric = "NMB",
   wtp = 30000,
   parameters_labels = NULL,
   show_labels_in_caption = FALSE,
   plot_title = "One-Way Sensitivity Analysis - Tornado plot",
   plot_subtitle = NULL,
   x_axis_label = "Incremental Net Benefit",
   currency_symbol = "$",
   show_basecase_value_label = TRUE,
   plot_bars_width = 0.95,
   plot_colors = c("Lower" = "orange", "Upper" = "skyblue")
)

owsa_NMB_plot

owsa_DQALYs_plot <- NeuroblastomaPSM::plot_owsa(
   df_owsa = NeuroblastomaPSM::run_owsa(),
   model_func = NeuroblastomaPSM::run_psm,
   model_func_args = list(
       "models_fit" = NeuroblastomaPSM::parametric_models,
       "l_params" = c(
           time_horizon = 10,
           cycle_length = 1/12,
           disc_rate_costs = 0.035,
           disc_rate_qalys = 0.015,
           NeuroblastomaPSM::l_psm_parameters
         )
       ),
   v_dsa_params = names(NeuroblastomaPSM::l_dsa_parameters),
   l_dsa_params = NeuroblastomaPSM::l_dsa_parameters,
   discounted_output = FALSE,
   cea_metric = "Differential QALYs",
   wtp = 30000,
   parameters_labels = NULL,
   show_labels_in_caption = FALSE,
   plot_title = "One-Way Sensitivity Analysis - Tornado plot",
   plot_subtitle = NULL,
   x_axis_label = "Differential QALYs",
   currency_symbol = "$",
   show_basecase_value_label = TRUE,
   plot_bars_width = 0.95,
   plot_colors = c("Lower" = "orange", "Upper" = "skyblue")
)

owsa_DQALYs_plot

owsa_Dcosts_plot <- NeuroblastomaPSM::plot_owsa(
   df_owsa = NeuroblastomaPSM::run_owsa(),
   model_func = NeuroblastomaPSM::run_psm,
   model_func_args = list(
       "models_fit" = NeuroblastomaPSM::parametric_models,
       "l_params" = c(
           time_horizon = 10,
           cycle_length = 1/12,
           disc_rate_costs = 0.035,
           disc_rate_qalys = 0.015,
           NeuroblastomaPSM::l_psm_parameters
         )
       ),
   v_dsa_params = names(NeuroblastomaPSM::l_dsa_parameters),
   l_dsa_params = NeuroblastomaPSM::l_dsa_parameters,
   discounted_output = FALSE,
   cea_metric = "Differential Costs",
   wtp = 30000,
   parameters_labels = NULL,
   show_labels_in_caption = FALSE,
   plot_title = "One-Way Sensitivity Analysis - Tornado plot",
   plot_subtitle = NULL,
   x_axis_label = "Differential Costs",
   currency_symbol = "$",
   show_basecase_value_label = TRUE,
   plot_bars_width = 0.95,
   plot_colors = c("Lower" = "orange", "Upper" = "skyblue")
)

owsa_Dcosts_plot

owsa_ICER_plot <- NeuroblastomaPSM::plot_owsa(
   df_owsa = NeuroblastomaPSM::run_owsa(),
   model_func = NeuroblastomaPSM::run_psm,
   model_func_args = list(
       "models_fit" = NeuroblastomaPSM::parametric_models,
       "l_params" = c(
           time_horizon = 10,
           cycle_length = 1/12,
           disc_rate_costs = 0.035,
           disc_rate_qalys = 0.015,
           NeuroblastomaPSM::l_psm_parameters
         )
       ),
   v_dsa_params = names(NeuroblastomaPSM::l_dsa_parameters),
   l_dsa_params = NeuroblastomaPSM::l_dsa_parameters,
   discounted_output = FALSE,
   cea_metric = "ICER",
   wtp = 30000,
   parameters_labels = NULL,
   show_labels_in_caption = FALSE,
   plot_title = "One-Way Sensitivity Analysis - Tornado plot",
   plot_subtitle = NULL,
   x_axis_label = "Incremental Cost Effectiveness Ratio (ICER)",
   currency_symbol = "$",
   show_basecase_value_label = TRUE,
   plot_bars_width = 0.95,
   plot_colors = c("Lower" = "orange", "Upper" = "skyblue")
)

owsa_ICER_plot
}