Skip to contents

Plots the scalar diagnostics returned by validate_flow_residual_structure(): residual-versus-benchmark-flow correlation, Moran's I, and residual-versus-covariate correlation when available.

Usage

plot_validation_structure(
  structure_results,
  comparisons = "adjusted_vs_benchmark",
  methods = NULL,
  method_col = "method",
  method_labels = NULL,
  palette = NULL,
  near_zero_band = 0.1,
  show_value_labels = TRUE,
  value_digits = 2
)

plot_validate_flow_structure(...)

Arguments

structure_results

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

comparisons

Flow comparison(s) to plot. Defaults to "adjusted_vs_benchmark". Use "all" when structure_results contains several comparison rows.

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.

palette

Optional character vector of colours.

near_zero_band

Optional non-negative numeric width around zero to shade as a near-zero reference band. Use NULL to suppress the band. Default 0.1.

show_value_labels

Logical; label points with rounded diagnostic values. Default TRUE.

value_digits

Number of decimal places used when show_value_labels = TRUE. Default 2.

Value

A ggplot object.