Skip to contents

Plots KL or Jensen-Shannon divergence summaries from validate_flow_distribution().

Usage

plot_validation_distribution(
  distribution_results,
  metric = c("jsd", "kl"),
  value = c("mean", "weighted_mean", "median"),
  comparisons = "adjusted_vs_benchmark",
  methods = NULL,
  method_col = "method",
  method_labels = NULL
)

plot_validate_flow_distribution_heatmap(...)

Arguments

distribution_results

A data frame, one validate_flow_distribution() result, or a named list of results.

metric

Divergence metric to plot: "jsd" or "kl".

value

Summary statistic to plot: "mean", "weighted_mean", or "median".

comparisons

Flow comparison(s) to plot. Defaults to "adjusted_vs_benchmark". Use "all" to show all comparison rows present in distribution_results. When "raw_vs_benchmark" is included, it is shown as a single unadjusted raw MPD baseline row.

methods

Optional character vector of method identifiers or display labels to include. Default NULL includes all methods.

method_col

Column containing the method identifier. Default "method".

method_labels

Optional named character vector used to relabel methods.

Value

A ggplot object.