## EXAMPLE 1 (from Chow S, Shao J, Wang H 2008, p. 90):
## A pharmaceutical company would like to conduct a clinical trial to
## compare the efficacy of two antimicrobial agents when administered orally
## to patients with skin infections. Assume the true mean cure rate of the
## treatment is 0.85 and the true mean cure rate of the control is 0.65.
## We consider the proportion cured in the treatment group minus the proportion
## cured in the control group (i.e., delta) of 0.10 or less to be of no clinical
## significance.
## Assuming a one-sided test size of 5% and a power of 80% how many
## subjects should be included in the trial?
epi.ssninfb(treat = 0.85, control = 0.65, delta = 0.10, n = NA, power = 0.80,
r = 1, nfractional = FALSE, alpha = 0.05)
## A total of 50 subjects need to be enrolled in the trial, 25 in the
## treatment group and 25 in the control group.
## EXAMPLE 1 (cont.):
## Suppose only 40 subjects were enrolled in the trial, 20 in the treatment
## group and 20 in the control group. What is the estimated study power?
epi.ssninfb(treat = 0.85, control = 0.65, delta = 0.10, n = 40, power = NA,
r = 1, nfractional = FALSE, alpha = 0.05)
## With only 40 subjects the estimated study power is 0.73.
## EXAMPLE 2:
## Assume the true mean cure rate for a treatment group to be 0.40 and the true
## mean cure rate for a control group to be the same, 0.40. We consider a
## difference of 0.10 in cured proportions (i.e., delta = 0.10) to be of no
## clinical importance.
## Assuming a one-sided test size of 5% and a power of 30% how many
## subjects should be included in the trial?
n <- epi.ssninfb(treat = 0.4, control = 0.4, delta = 0.10, n = NA, power = 0.3,
r = 1, nfractional = TRUE, alpha = 0.05)$n.total
n
## A total of 120 subjects need to be enrolled in the trial, 60 in the
## treatment group and 60 in the control group.
## Re-run the function using n = 120 to confirm that power equals 0.30:
epi.ssninfb(treat = 0.4, control = 0.4, delta = 0.10, n = n, power = NA,
r = 1, nfractional = TRUE, alpha = 0.05)$power
## With 120 subjects the estimated study power is 0.30.
Run the code above in your browser using DataLab