Skip to contents

Plots the ranks resulting from an uncertainty and sensitivity analysis, in particular plots the median, and 5th/95th percentiles of ranks.

Usage

plot_uncertainty(
  SAresults,
  plot_units = NULL,
  order_by = "nominal",
  dot_colour = NULL,
  line_colour = NULL
)

Arguments

SAresults

A list of sensitivity/uncertainty analysis results from get_sensitivity().

plot_units

A character vector of units to plot. Defaults to all units. You can also set to "top10" to only plot top 10 units, and "bottom10" for bottom ten.

order_by

If set to "nominal", orders the rank plot by nominal ranks (i.e. the original ranks prior to the sensitivity analysis). Otherwise if "median", orders by median ranks.

dot_colour

Colour of dots representing median ranks.

line_colour

Colour of lines connecting 5th and 95th percentiles.

Value

A plot of rank confidence intervals, generated by 'ggplot2'.

Details

To use this function you first need to run get_sensitivity(). Then enter the resulting list as the SAresults argument here.

See vignette("sensitivity").

This function replaces the now-defunct plotSARanks() from COINr < v1.0.

See also

Examples

# for examples, see `vignette("sensitivity")`
# (this is because package examples are run automatically and sensitivity analysis
# can take a few minutes to run at realistic settings)