Description Usage Arguments Value References Examples
View source: R/sargent1stage.R
The goal of a phase II trial is to make a preliminary determination regarding the activity and
tolerability of a new treatment and thus to determine whether the treatment warrants
further study in the phase III setting.
This function calculates the sample size needed in a Sargent 1-stage design which is a
three-outcome design that allows for three outcomes: reject H(0), reject H(a), or reject neither.
1 2 3 4 5 6 7 8 9 10 11 12 13 | sargent1stage(
p0,
pa,
alpha,
beta,
eta,
pi,
eps = 0.005,
N_min,
N_max,
CI_type = "exact",
...
)
|
p0 |
probability of the uninteresting response (null hypothesis H0) |
pa |
probability of the interesting response (alternative hypothesis Ha) |
alpha |
Type I error rate P(reject H0|H0) |
beta |
Type II error rate P(reject Ha|Ha) |
eta |
P(reject Ha|H0) |
pi |
P(reject H0|Ha) |
eps |
tolerance default value = 0.005 |
N_min |
minimum sample size value for grid search |
N_max |
maximum sample size value for grid search |
CI_type |
any type for binom.confint |
... |
further arguments passed on to the methods |
a data.frame with elements
N: total number of patients
r: cutoff point r. Note if n <= r
–> futility.
s: cutoff point s. Note if n >= s
–> efficacy.
eff: r/N
CI_LL: exact 1-2*alpha confidence interval lower limit
CI_UL: exact 1-2*alpha confidence interval upper limit
alpha: the actual alpha value which is smaller than alpha_param + eps
beta: the actual beta value where which is smaller than beta_param + eps
eta: the actual eta value which is smaller than eta_param - eps
pi: the actual pi value which is smaller than pi_param - eps
p0: your provided p0
value
pa: your provided pa
value
alpha_param: your provided alpha
value
beta_param: your provided beta
value
eta_param: your provided eta
value
pi_param: your provided pi
value
Sargent DJ, Chan V, Goldberg RM. A three-outcome design for phase II clinical trials. Control Clin Trials. 2001;22(2):117-125. doi:10.1016/s0197-2456(00)00115-x
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | sargent1stage(p0 = 0.5, pa = 0.65, alpha = 0.1, beta = 0.1, eta = 0.8, pi = 0.8,
eps = 0.005, N_min = 0, N_max = 100)
sargent1stage(p0 = 0.2, pa = 0.35, alpha = 0.1, beta = 0.1, eta = 0.8, pi = 0.8,
eps = 0.005, N_min = 35, N_max = 50)
test <- data.frame(p0 = c(0.05,0.1,0.2,0.3,0.4,0.5),
pa = c(0.05,0.1,0.2,0.3,0.4,0.5) + 0.15)
test <- merge(test,
expand.grid(alpha = 0.05, beta = 0.1, eta = 0.8, pi = 0.8))
samplesize <- sargent1stage(p0 = test$p0, pa = test$pa,
alpha = test$alpha, beta = test$beta,
eta = test$eta, pi = test$pi,
eps = 0.005, N_min = 20, N_max = 70)
samplesize <- lapply(seq_len(nrow(test)), FUN=function(i){
setting <- test[i, ]
sargent1stage(p0 = setting$p0, pa = setting$pa,
alpha = setting$alpha, beta = setting$beta, eta = setting$eta, pi = setting$pi,
eps = 0.005, N_min = 20, N_max = 70)
})
samplesize <- do.call(rbind, samplesize)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.