Select the PP futility threshold minimising null expected sample size
select_kappa_star.RdAmong candidate thresholds for which the one-sided 95\
confidence bound on power (power_LCB from
summarize_grid_by_kappa) is at least the floor under every
alternative scenario, selects the one with the smallest expected sample
size under the null scenario. A threshold with an NA lower bound in
any alternative scenario is infeasible. Ties in null expected sample size
(within 1e-8) are broken in favour of the larger kappa.
Arguments
- summary_by_scenario
A named list of data frames, one per scenario, each as returned by
summarize_grid_by_kappaover the samekappa_grid.- power_floor
Minimum acceptable lower confidence bound on power: a scalar applied to every alternative scenario, or a named numeric vector with one entry per alternative scenario (e.g. from
compute_relative_floors).- null_scenario
Name of the null scenario in
summary_by_scenario.- alt_scenarios
Character vector of alternative scenario names.