Displays the paired CV comparison of M2 vs M0, M3 vs M0 and M3 vs M2 per trait, with bootstrap confidence intervals. Points whose interval excludes zero are coloured by the palette's superior colour; the rest are drawn in the muted text colour. Use this as the headline figure for the honest-vs-naive comparison.
Usage
hbr_plot_cv_forest(
x,
metric = "r",
palette = "haplobreed",
theme = "haplobreed",
output_dir = NULL,
file_name = "cv_forest",
width = 8,
height = NULL,
formats = c("pdf", "png"),
verbose = TRUE
)Arguments
- x
An `hgsi_advanced` object or the `cv_compare` table.
- metric
Metric to display. `"r"` by default.
- palette
One of [hbr_palette_names()].
- theme
One of [hbr_theme_names()].
- output_dir
Directory for the figure. `NULL` returns the plot.
- file_name
Base file name (without extension).
- width, height
Figure dimensions in inches.
- formats
Output formats.
- verbose
Print progress.
Examples
cmp <- data.frame(
trait = rep(c("YLD", "DTF"), each = 3),
method = rep(c("M2", "M3", "M3"), 2),
baseline = rep(c("M0", "M0", "M2"), 2),
metric = "r",
mean_diff = c(0.05, 0.02, 0.03, 0.04, 0.01, 0.03),
boot_lo = c(0.01, -0.01, 0.00, 0.01, -0.02, 0.00),
boot_hi = c(0.09, 0.05, 0.06, 0.07, 0.04, 0.06),
stringsAsFactors = FALSE)
hbr_plot_cv_forest(cmp)
