Program Code
The program is written in JavaScript.
Source
The program uses the following formula for the total sample size
N=(q(1-alpha)+q(Power))**2*Sum [1/(fi*ei)]/Delta**2
Where fi is the proportion of the sample in treatment i and ei are the event probabilities in treatment i, q is the inverse normal function and
Delta=log(HR(std./exp.)/HREquiv(std./exp.) )
Where HR(std./exp.) is the hazard ratio between the experimental and standard treatments and HREquiv(std./exp.) is the hazard ratio defining noninferiority.
Input Items
The user is prompted for values to the following items. For items that have initial default values set, the values are given in parentheses.