Overlays the output of decide_sample_size() as a step-line
on a contour plot (e.g. from plot_power_contour()).
add_decision_overlay(p, decisions, x_effect = NULL, colour = "red")A ggplot object.
A ggplot object, typically from plot_power_contour().
A data.frame or tibble returned by
decide_sample_size(), containing at least one effect column
and n_recommended.
Name of the effect column to use on the x-axis.
If NULL, the first column that is not n_recommended
or rationale is used.
Colour for the overlay line (default "red").
If the decisions contain multiple effect-grid columns, the
overlay is aggregated over all effect columns except x_effect
by taking the worst-case (maximum) recommended n at each value
of x_effect.