sargent2stage: The Sargent 2-stage function

Description Usage Arguments Details Value References Examples

View source: R/sargent2stage.R

Description

This function calculates sample sizes of the Sargent 2-stage design.

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 2-stage design which is a three-outcome design that allows for three outcomes: reject H(0), reject H(a), or reject neither.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
sargent2stage(
  p0,
  pa,
  alpha,
  beta,
  eta,
  pi,
  eps = 0,
  N_min,
  N_max,
  int = 0,
  int_window = 0.025,
  CI_type = "Koyama"
)

Arguments

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

int

pre-specified interim analysis percentage information

int_window

window around interim analysis percentage (e.g. 0.5 +- 0.025). 0.025 is default value

CI_type

"Koyama", see getCI_Koyama, or any type for binom.confint

Details

if x1<=r1 –> stop futility
if (x1+x2)<=r –> futility
if (x1+x2)>=s –> efficacy

Value

a data.frame with elements

References

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
samplesize <- sargent2stage(p0 = 0.1, pa = 0.3, alpha = 0.05, beta = 0.1, eta = 0.8, pi = 0.8,
                            eps = 0.005, N_min = 15, N_max = 30)
plot(samplesize)


data(data_sargent2)
test <- data_sargent2
samplesize <- sargent2stage(p0 = test$p0, pa = test$pa, alpha = test$alpha, beta = test$beta,
                            eta = test$eta, pi = test$pi,
                            eps = 0.005,
                            N_min = test$N_min, N_max = test$N_max)
optimal <- lapply(samplesize, FUN=function(x) subset(x, OPT == "Optimal"))
optimal <- data.table::rbindlist(optimal)
minimax <- lapply(samplesize, FUN=function(x) subset(x, MIN == "Minimax"))
minimax <- data.table::rbindlist(minimax)

IDDI-BE/PhIIdesign documentation built on June 5, 2021, 2:03 p.m.