View source: R/plot_pareto_combined.R
| plot_pareto_combined | R Documentation |
For two or more forestsearch fits whose consistency-passing
candidate sets are identical, produces a single Pareto-frontier
plot annotated with one S<i>: <combo_label> marker per
configuration at each selected subgroup. If two configurations pick
the same subgroup, the markers stack into a single multi-line label
(e.g.\ "S1: hrMaxSG/pareto\nS2: hrMaxSG/both").
plot_pareto_combined(
fs_list,
combo_labels = NULL,
ci_table_list = NULL,
show_band = TRUE,
xlim = NULL,
tolerance = 1e-06,
verbose = TRUE
)
fs_list |
A list of |
combo_labels |
Character vector of length |
ci_table_list |
Optional list of CI tables from
|
show_band |
Logical. Draw the effect-band shading if applicable.
Default |
xlim |
Numeric vector of length 2 or |
tolerance |
Numeric. Per-cell tolerance for the value
equality check ( |
verbose |
Logical. Emit a warning naming the specific
equality-check failure mode when the sets don't match. Default
|
The combined plot is meaningful only when the passing sets match.
When they don't, the function returns NULL with a warning;
the side-by-side view (one panel per configuration) is the
appropriate alternative.
A ggplot object, or NULL (with a warning) if
the passing sets don't satisfy the equality criterion.
Two passing sets are considered equal when, after sorting by subgroup definition string:
they have the same number of rows;
the same set of subgroup definitions (concatenated
M.* columns), compared as sets (order-independent);
within each matched definition, the hr, N,
E, and K values agree within tolerance.
Pcons is deliberately excluded from the value check. It can
legitimately drift across rules because the preview sort (which
depends on selection_rule) changes the queue order, which
changes the random-split state each candidate consumes. Drift of
up to ~0.10 between runs on the same subgroup is expected and does
not indicate a real disagreement. Note also that the internal
candidate id m can differ across configurations for the
same reason; m is NOT used for equality.
compare_selection_rules,
plot_pareto_frontier,
pareto_frontier_table.
## Not run:
out <- compare_selection_rules(
df.analysis = actg_df,
sg_focus = c("hrMaxSG", "hrMaxSG"),
selection_rule = c("pareto", "both"),
...
)
# Auto-attached by compare_selection_rules():
print(out$plot_combined)
# Or call directly:
p <- plot_pareto_combined(
fs_list = out$fs,
combo_labels = out$combos$label,
ci_table_list = out$ci_tab
)
print(p)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.