knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) options(rmarkdown.html_vignette.check_title = FALSE)
library(ssutil)
The indifference-zone approach for binomial outcomes is a statistical method designed to select the group with the highest event probability while ensuring that this selection is made correctly at a specified confidence level. This approach assumes that the difference in event probability between the best group and the next-best group exceeds a specified threshold, called the "indifference zone". This zone defines a margin of indifference, within which differences are considered negligible, allowing the decision process to focus only on differences that clearly exceed this margin.
This package offers several functions to help with this design:
power_best_binomial() calculates the exact probability of correctly selecting
the best group given the event probability in the best group (p1), the
pre-specified indifference-zone threshold (dif), the number of groups
(ngroups), and the sample size per group (npergroup). This function is
based on Sobel and Huyett (1957) under the least favorable configuration
(i.e., assuming all other groups have an event probability equal to the best
group's probability minus the indifference-zone threshold).
ss_best_binomial() estimates the required sample size per group to achieve a
specified power for correctly selecting the best group, given the event
probability in the best group (p1), the indifference-zone threshold (dif),
and the number of groups (ngroups).
sim_power_best_binomial() estimates the empirical power (i.e., the proportion
of simulated trials in which the best group is correctly identified) via Monte
Carlo simulation. It supports multiple outcomes and can estimate the empirical
power to select the true best group across all outcomes.
sim_power_best_bin_rank() is similar to sim_power_best_binomial(), but it
defines the best group based on overall ranking across multiple outcomes rather
than requiring top performance on every outcome.
wcs_power_best_binomial() searches for the probability in the best group that
leads to the lowest power given a pre-specified indifference-zone threshold
(dif), the number of groups (ngroups), and the sample size per group
(npergroup).
power_best_binomial(p1 = 0.9, dif = 0.1, ngroups = 3, npergroup = 30)
ss_best_binomial(power = 0.9, p1 = 0.9, dif = 0.1, ngroups = 3)
set.seed(12345) sim_power_best_binomial( noutcomes = 1, p1 = 0.9, dif = 0.1, ngroups = 3, npergroup = 30, nsim = 1000 )
wcs_power_best_binomial(dif = 0.1, ngroups = 3, npergroup = 50)
The sim_power_best_binomial() and sim_power_best_bin_rank() allow simulating
multiple outcomes. These functions differ in how they define the 'best' group.
sim_power_best_binomial() requires that the best group be the top performer
for every outcome, whereas sim_power_best_bin_rank() defines the best group
based on overall ranking across outcomes. For example, a group might rank first
for the first two outcomes but second for the third, yet still achieve the best
overall rank among all groups.
This ranking approach supports weighting of outcomes, allowing greater importance
to be assigned to some outcomes over others. For instance, if performance
on the first two outcomes is twice as important as the third, weights such as
c(0.4, 0.4, 0.2) can be specified. Weights are scaled internally to sum to 1.
The functions are flexible and allow specification of, for each outcome, the event probabilities, indifference-zone thresholds, and group sample sizes.
set.seed(12345) sim_power_best_binomial( noutcomes = 5, p1 = 0.8, dif = 0.10, ngroups = 3, npergroup = 30, nsim = 1000 )
set.seed(12345) sim_power_best_bin_rank( noutcomes = 5, p1 = 0.8, dif = 0.10, weights = 1, ngroups = 3, npergroup = 30, nsim = 1000 )
Sobel, M., & Huyett, M. J. (1957). Selecting the Best One of Several Binomial Populations. Bell System Technical Journal, 36(2), 537-576. https://doi.org/10.1002/j.1538-7305.1957.tb02411.x
Bechhofer, R. E., Santner, T. J., & Goldsman, D. M. (1995). Design and analysis of experiments for statistical selection, screening, and multiple comparisons. Wiley. ISBN 978-0-471-57427-9
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.