power.binom.test: Power Calculation for the Exact Binomial Test
Description
Calculates the power of a one-sample exact binomial test via simulation.
This is used to compare a treatment response rate against a fixed
historical benchmark.
Usage
power.binom.test(
n = 20,
p = 0.5,
p0 = 0.3,
alpha = 0.05,
alternative = c("two.sided", "greater", "less"),
nsim = 1e+05,
seed = 2025
)
Value
A numeric value representing the statistical power.
Arguments
n
Sample size of the experimental group.
p
Assumed true proportion (response rate) of the experimental treatment.
p0
Historical proportion (null hypothesis) used as a benchmark.
alpha
Type I error rate (significance level).
alternative
Character string specifying the alternative hypothesis,
must be one of "two.sided" (default), "greater" or "less".
nsim
Number of simulated trials; defaults to 100,000 for high precision.