The program is written in R.

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.

This program calculates the required sample size for a two-arm non-inferiority
design with a binomial outcome. N is calculated by the following formula for
specified power = 100(1- β)% and the true success probabilities are
P_{E} and P_{S}:

$$N = [{Z_{a/2} + Z_\beta \over M + (P_E - P_S)}]^2 \times [{P_E(1 - P_E) \over K_E} + {P_S(1 - P_S) \over 1 - K_E}]$$

where

- N is the total number patients
- K
_{E}is the proportion randomized to E.

*Alpha level (one-sided) α:*The desired type I error rate. This corresponds to a specification of a (1-2* α)% confidence interval around the difference between the rates.*Power:*Enter the desired power, 0-1, to rule out the null hypothesis of inferiority.*Noninferiority Margin:*Enter the largest acceptable difference in success rates between the standard arm and the experimental arm that would be consistent with noninferiority.*Proportion of patients in the experimental arm (0.5):*Enter the proportion of patients (0-1) out of the total N that will be assigned to the experimental arm.*Success Probability in Standard Arm and Experimental Arm:*Enter the expected success probability for the standard arm, and the experimental arm. Typically these are specified as equal, but equality is not required.

- Total sample size.