OneStageSS | R Documentation |
Calculates sample size or power for single-stage trials with a binary endpoint according to: Ahern, R. P., Sample size tables for exact single-stage phase II designs. Statistics in medicine 20.6 (2001): 859-866.
OneStageSS(p0, p1, power = 0.8, n = NA, alpha = 0.05, nstart = 1)
p0 |
Proportion of events under H0 |
p1 |
Proportion of events under H1 |
power |
Power, default=0.8 |
n |
Sample size, calculated if NA, otherwise power is calculated |
alpha |
Alpha, default=0.05 |
nstart |
Number of patients to start iterations, default=1, can be increased to save time |
List with number of patients with events for a significant trial (r), number of patients (n), alpha and power.
# Calculate sample size
OneStageSS(p0=0.5,p1=0.6,alpha=0.05,power=0.8)
# Calculate power
OneStageSS(p0=0.5,p1=0.6,alpha=0.05,n=100)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.