View source: R/sim_power_best_binomial.R
| sim_power_best_binomial | R Documentation |
Estimates the empirical power to correctly identify the best group as having
the highest outcome, under a binomial distribution. Assumes that the most
promising group has a higher success probability than the others by at least
dif, and that outcomes are independent.
sim_power_best_binomial(
noutcomes,
p1,
dif,
ngroups,
npergroup,
nsim,
conf.level = 0.95
)
noutcomes |
Integer. Number of outcomes to evaluate. |
p1 |
Numeric. Probability in the most promising group (scalar or vector). |
dif |
Numeric. Difference between the best group and the rest. |
ngroups |
Integer. Number of groups. |
npergroup |
Integer or vector. Number of subjects per group. |
nsim |
Integer. Number of simulations. |
conf.level |
Numeric. Confidence level for the empirical power estimate |
Multiple outcomes can be evaluated simultaneously. The power is estimated as the proportion of simulations where the most promising group is selected best in all outcomes.
An S3 object of class empirical_power_result, which contains
the estimated empirical power and its confidence interval. The object can
be printed, formatted, or further processed using associated S3 methods.
See also empirical_power_result.
empirical_power_result
sim_power_best_binomial(
noutcomes = 1,
p1 = 0.7,
dif = 0.2,
ngroups = 3,
npergroup = 30,
nsim = 1000
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.