bni | R Documentation |
Calculate the required sample size or power for a two-arm non-inferiority
design with binomial outcome. Exactly one of power
or n
should be NULL
to solve for this value given the other parameters.
bni(margin, p1, p2 = p1, alpha = 0.05, power = NULL, n = NULL, p = 0.5)
margin |
the largest acceptable difference in success rates between
the standard ( |
p1 , p2 |
true success rates for the standard and experimental arms, respectively |
alpha |
type I error (one-sided), i.e., the |
power |
the desired power level to rule out the null of inferiority |
n |
the total sample size of both arms |
p |
the proportion of |
The a numeric vector with the total sample size (n
), sample size
for the standard (n1
) and experimental (n2
) arms, and power
(power
).
Kopecky K and Green S (2012). Noninferiority trials. In: Handbook of Statistics in Clinical Oncology. Crowley J and Hoering A, eds. CRC Press, Boca Raton, FL USA.
https://stattools.crab.org/R/Binomial_Non_Inferiority.html
bni(0.1, 0.65, 0.85, power = 0.8)
bni(0.1, 0.65, 0.85, n = 50)
bni(0.1, 0.65, 0.85, n = 50, p = 2 / 3) ## 1:2 randomization
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.