View source: R/plot_pareto_frontier.R
| plot_pareto_frontier | R Documentation |
Produces a 2D scatter of candidate subgroups in (effect, N) space,
with the Pareto frontier drawn as a step polyline and the selected
subgroup highlighted. When ci_table is supplied (the return
value of compute_frontier_cis), horizontal error bars
for the split-derived 95\
plot_pareto_frontier(
fs,
ci_table = NULL,
show_band = FALSE,
effect_neighborhood = NULL,
label_members = TRUE,
point_size = 3,
xlim = NULL,
xlim_trim = NULL
)
fs |
A |
ci_table |
Optional |
show_band |
Logical. If |
effect_neighborhood |
Numeric. Override of the band width;
default |
label_members |
Logical. If |
point_size |
Numeric. Size of frontier-member points.
Default |
xlim |
Optional numeric vector of length 2 controlling the
x-axis range, e.g.\ |
xlim_trim |
Logical or |
The frontier polyline is drawn as a downward step from large-effect
/ small-N candidates to small-effect / large-N candidates. Points
off the frontier (if any are present in the fs$grp.consistency$out_sg$result
table beyond those on the frontier) are not currently plotted; this
function only displays the frontier and its selected member.
For sg_focus = "hrMinSG", the selected subgroup may not lie
on the Pareto frontier (the focus deliberately prefers small
subgroups, which are typically N-dominated). In that case the
selected marker appears off the polyline.
A ggplot object.
pareto_frontier_table,
compute_frontier_cis, frontier_member_flags.
## Not run:
p <- plot_pareto_frontier(fs)
print(p)
# With split-derived 95% CIs:
ci_tab <- compute_frontier_cis(fs, n_splits = 1000)
p2 <- plot_pareto_frontier(fs, ci_table = ci_tab)
print(p2)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.