| Type: | Package | 
| Title: | Phase II Clinical Trial Design for Multinomial Endpoints | 
| Version: | 0.1.1 | 
| Author: | Yalin Zhu, Rui Qin | 
| Maintainer: | Yalin Zhu <yalin.zhu@outlook.com> | 
| Description: | Provide multinomial design methods under intersection-union test (IUT) and union-intersection test (UIT) scheme for Phase II trial. The design types include : Minimax (minimize the maximum sample size), Optimal (minimize the expected sample size), Admissible (minimize the Bayesian risk) and Maxpower (maximize the exact power level). | 
| License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] | 
| LazyData: | TRUE | 
| Imports: | clinfun, graphics, stats | 
| Suggests: | gsDesign, survival | 
| NeedsCompilation: | no | 
| Packaged: | 2016-11-23 03:43:29 UTC; kaijingzhang | 
| Repository: | CRAN | 
| Date/Publication: | 2016-11-23 09:38:49 | 
The design function for multinomial designs under intersection-union test (IUT)
Description
Search the type I error or power of a multinomial (response and disease progression) single- or two-stage design under IUT:
H_0: p_1 \le p_{01} \ OR \  p_2 \ge p_{02} \ versus \ H_1: p_1 \ge p_{11} > p_{01} \ AND \ p_2 \le p_{12} < p_{02}
Usage
IUT.design(method = c("s1", "s2", "s2.f"),
s1.rej, t1.rej, s1.acc, t1.acc, n1, s2.rej, t2.rej, n2,
s1.rej.delta=0, t1.rej.delta=0, s1.acc.delta=0, t1.acc.delta=0,
s2.rej.delta=0, t2.rej.delta=0, n1.delta=0, n2.delta=0,
p0.s, p0.t, p1.s, p1.t, signif.level = 0.05, power.level = 0.85,
show.time = TRUE, output = c("minimax","optimal","maxpower","admissible", "all"),
plot.out=FALSE)
Arguments
| method | design methods according to number of stage and stopping rule, "s1" represents single-stage design stopping for both efficacy and futility, "s2" represents two-stage design stopping for both efficacy and futility, "s2.f" represents two-stage design stopping for futility only. | 
| s1.rej | first stage responses threshold to stop the trial for efficacy. Applied for "s1" or "s2". | 
| t1.rej | first stage disease progressions threshold to stop the trial for efficacy. Applied for "s1" or "s2". | 
| s1.acc | first stage responses threshold to stop the trial for futility. Applied for "s2" or "s2.f". | 
| t1.acc | first stage disease progressions threshold to stop the trial for futility. Applied for "s2" or "s2.f". | 
| n1 | first stage sample size. Applied for "s1", "s2" or "s2.f". | 
| s2.rej | second stage responses threshold to stop the trial for efficacy. Applied for "s2" or "s2.f". | 
| t2.rej | second stage disease progressions threshold to stop the trial for efficacy. Applied for "s2" or "s2.f". | 
| n2 | second stage sample size. Applied for "s2" or "s2.f". | 
| s1.rej.delta | pre-specified search difference for s1.rej. | 
| t1.rej.delta | pre-specified search difference for t1.rej. | 
| s1.acc.delta | pre-specified search difference for s1.acc. | 
| t1.acc.delta | pre-specified search difference for t1.acc. | 
| s2.rej.delta | pre-specified search difference for s2.rej. | 
| t2.rej.delta | pre-specified search difference for t2.rej. | 
| n1.delta | pre-specified search difference for n1. | 
| n2.delta | pre-specified search difference for n2. | 
| p0.s | pre-specified response rate under null hypothesis. | 
| p0.t | pre-specified disease progression rate under null hypothesis. | 
| p1.s | pre-specified response rate under alternative hypothesis. | 
| p1.t | pre-specified disease progression rate under alternative hypothesis.
Note: type I error calculation needs to take maximum of the power function with  | 
| signif.level | pre-specified significant level. | 
| power.level | pre-specified power level. | 
| show.time | logical; if TRUE (default), show the calculation time for the search function. | 
| output | the output types of design, choose from "minimax","optimal","admissible" and "maxpower". | 
| plot.out | logical; if TRUE, output a plot for design selection. | 
Value
| boundset | the boundaries set satisfying the design types properties:  | 
References
Chang, M. N., Devidas, M., & Anderson, J. (2007). One- and two-stage designs for phase II window studies. Statistics in medicine , 26(13), 2604-2614.
Simon, R. (1989). Optimal two-stage designs for phase II clinical trials. Controlled clinical trials 10(1), 1-10.
Jung, S. H., Lee, T., Kim, K., & George, S. L. (2004). Admissible two-stage designs for phase II cancer clinical trials. Statistics in medicine 23(4), 561-569.
Examples
p01=0.1; p02=0.9
## Calculate type I error for single-stage design
IUT.design(method="s1",s1.rej=18, t1.rej = 12, n1=80,
s1.rej.delta = 1, t1.rej.delta = 1, n1.delta=1,
p0.s = 0.15, p0.t = 0.25, p1.s = 0.3, p1.t= 0.1, output = "minimax")
## Designs for two-stage design, output PET and EN under null hypothesis
IUT.design(method="s2",s1.rej = 11, t1.rej = 4, s1.acc=8, t1.acc = 5, n1=40,
s2.rej=18, t2.rej = 11, n2=40, p0.s = 0.15, p0.t = 0.25, p1.s = 0.3, p1.t= 0.1, output = "minimax")
IUT.design(method="s2",s1.rej = 11, t1.rej = 4, s1.acc=8, t1.acc = 5, n1=40,
s2.rej=18, t2.rej = 11, n2=40, p0.s = 0.15, p0.t = 0.25, p1.s = 0.3, p1.t= 0.1, output = "optimal")
The power function for multinomial designs under intersection-union test (IUT)
Description
Calculate the type I error or power of a multinomial (response and disease progression) single- or two-stage design under IUT:
H_0: p_1 \le p_{01} \  OR  \ p_2 \ge p_{02} \ versus \ H_1: p_1 \ge p_{11} > p_{01} \ AND \ p_2 \le p_{12} < p_{02}
Usage
IUT.power(method, s1.rej, t1.rej, s1.acc, t1.acc, n1, s2.rej, t2.rej, n2, p.s, p.t,
output.all)
Arguments
| method | design methods according to number of stage and stopping rule, "s1" represents single-stage design stopping for both efficacy and futility, "s2" represents two-stage design stopping for both efficacy and futility, "s2.f" represents two-stage design stopping for futility only. | 
| s1.rej | first stage responses threshold to stop the trial for efficacy. Applied for "s1" or "s2". | 
| t1.rej | first stage disease progressions threshold to stop the trial for efficacy. Applied for "s1" or "s2". | 
| s1.acc | first stage responses threshold to stop the trial for futility. Applied for "s2" or "s2.f". | 
| t1.acc | first stage disease progressions threshold to stop the trial for futility. Applied for "s2" or "s2.f". | 
| n1 | first stage sample size. Applied for "s1", "s2" or "s2.f". | 
| s2.rej | second stage responses threshold to stop the trial for efficacy. Applied for "s2" or "s2.f". | 
| t2.rej | second stage disease progressions threshold to stop the trial for efficacy. Applied for "s2" or "s2.f". | 
| n2 | second stage sample size. Applied for "s2" or "s2.f". | 
| p.s | pre-specified response rate,  | 
| p.t | pre-specified disease progression rate,   | 
| output.all | logical, if FALSE (default), only output the value of power or type I error, otherwise, also output the probability of early termination (PET) and expected sample size (EN). Applied for "s2" or "s2.f". | 
Value
| prob | the power function  | 
References
Chang, M. N., Devidas, M., & Anderson, J. (2007). One- and two-stage designs for phase II window studies. Statistics in medicine , 26(13), 2604-2614.
Examples
p01=0.1; p02=0.9
## Calculate type I error for single-stage design
max(IUT.power(method="s1", s1.rej=6, t1.rej=19, n1=25, p.s=p01, p.t=0),
IUT.power(method="s1", s1.rej=6, t1.rej=19, n1=25, p.s=1-p02, p.t=p02))
## Calculate power for single-stage design
IUT.power(method="s1", s1.rej=6, t1.rej=19, n1=25, p.s=p01+0.2, p.t=p02-0.2)
## Calculate type I error for two-stage design
max(IUT.power(method="s2", s1.rej=4, t1.rej=9, s1.acc=0, t1.acc=13, n1=13,
s2.rej=6, t2.rej=18, n2=11, p.s=p01, p.t=0),
IUT.power(method="s2", s1.rej=4, t1.rej=9, s1.acc=0, t1.acc=13, n1=13,
s2.rej=6, t2.rej=18, n2=11, p.s=1-p02, p.t=p02))
## Output PET and EN under null hypothesis
IUT.power(method="s2", s1.rej=4, t1.rej=9, s1.acc=0, t1.acc=13, n1=13,
s2.rej=6, t2.rej=18, n2=11, p.s=p01, p.t=p02, output.all=TRUE)[-1]
## Calculate power for two-stage design
IUT.power(method="s2", s1.rej=4, t1.rej=9, s1.acc=0, t1.acc=13, n1=13,
s2.rej=6, t2.rej=18, n2=11, p.s=p01+0.2, p.t=p02-0.2)
## Calculate type I error for two-stage design stopping for futility only,
## output PET and EN under null hypothesis
max(IUT.power(method="s2.f", s1.acc=0, t1.acc=13, n1=13,
s2.rej=6, t2.rej=18, n2=11, p.s=p01, p.t=0),
IUT.power(method="s2.f", s1.acc=0, t1.acc=13, n1=13,
s2.rej=6, t2.rej=18, n2=11, p.s=1-p02, p.t=p02))
## Output PET and EN under null hypothesis
IUT.power(method="s2.f", s1.acc=0, t1.acc=13, n1=13,
s2.rej=6, t2.rej=18, n2=11, p.s=p01, p.t=p02, output.all=TRUE)[-1]
## Calculate power for two-stage design
IUT.power(method="s2.f", s1.acc=0, t1.acc=13, n1=13,
s2.rej=6, t2.rej=18, n2=11, p.s=p01+0.2, p.t=p02-0.2)
The design function for multinomial designs under union-intersection test (UIT)
Description
Search the type I error or power of a multinomial (response and disease progression) single- or two-stage design under IUT:
H_0: p_1 \le p_{01} \ AND  \ p_2 \ge p_{02} \ versus \ H_1: p_1 \ge p_{11} > p_{01} \ OR  \ p_2 \le p_{12} < p_{02}
Usage
UIT.design(method, s1.rej, t1.rej, s1.acc, t1.acc, n1, s2.rej, t2.rej, n2,
s1.rej.delta=0, t1.rej.delta=0, s1.acc.delta=0, t1.acc.delta=0,
s2.rej.delta=0, t2.rej.delta=0, n1.delta=0, n2.delta=0, p0.s, p0.t, p1.s, p1.t,
signif.level = 0.05, power.level = 0.85, output.all = FALSE, show.time = TRUE)
Arguments
| method | design methods according to number of stage and stopping rule, "s1" represents single-stage design stopping for both efficacy and futility, "s2" represents two-stage design stopping for both efficacy and futility, "s2.f" represents two-stage design stopping for futility only. | 
| s1.rej | first stage responses threshold to stop the trial for efficacy. Applied for "s1" or "s2". | 
| t1.rej | first stage disease progressions threshold to stop the trial for efficacy. Applied for "s1" or "s2". | 
| s1.acc | first stage responses threshold to stop the trial for futility. Applied for "s2" or "s2.f". | 
| t1.acc | first stage disease progressions threshold to stop the trial for futility. Applied for "s2" or "s2.f". | 
| n1 | first stage sample size. Applied for "s1", "s2" or "s2.f". | 
| s2.rej | second stage responses threshold to stop the trial for efficacy. Applied for "s2" or "s2.f". | 
| t2.rej | second stage disease progressions threshold to stop the trial for efficacy. Applied for "s2" or "s2.f". | 
| n2 | second stage sample size. Applied for "s2" or "s2.f". | 
| s1.rej.delta | pre-specified search difference for s1.rej. | 
| t1.rej.delta | pre-specified search difference for t1.rej. | 
| s1.acc.delta | pre-specified search difference for s1.acc. | 
| t1.acc.delta | pre-specified search difference for t1.acc. | 
| s2.rej.delta | pre-specified search difference for s2.rej. | 
| t2.rej.delta | pre-specified search difference for t2.rej. | 
| n1.delta | pre-specified search difference for n1. | 
| n2.delta | pre-specified search difference for n2. | 
| p0.s | pre-specified response rate under null hypothesis. | 
| p0.t | pre-specified disease progression rate under null hypothesis. | 
| p1.s | pre-specified response rate under alternative hypothesis. | 
| p1.t | pre-specified disease progression rate under alternative hypothesis.
Note: type I error calculation needs to take maximum of the power function with  | 
| signif.level | pre-specified significant level. | 
| power.level | pre-specified power level. | 
| output.all | logical; if TRUE, output all possible designs satisfying type I error and power restrictions, otherwise, only output the design with maximum power . | 
| show.time | logical; if TRUE (default), show the calculation time for the search function. | 
Value
| boundset | the boundaries set satisfying the design types properties:  | 
References
Zee, B., Melnychuk, D., Dancey, J., & Eisenhauer, E. (1999). Multinomial phase II cancer trials incorporating response and early progression. Journal of biopharmaceutical statistics, 9(2), 351-363.
Simon, R. (1989). Optimal two-stage designs for phase II clinical trials. Controlled clinical trials 10(1), 1-10.
Examples
## Calculate type I error for single-stage design
UIT.design(method="s1",s1.rej=18, t1.rej = 12, n1=80,
p0.s = 0.15, p0.t = 0.25, p1.s = 0.3, p1.t= 0.1)
## Designs for two-stage design, output PET and EN under null hypothesis
UIT.design(method="s2",s1.rej = 11, t1.rej = 4, s1.acc=8, t1.acc = 5, n1=40,
s2.rej=18, t2.rej = 11, n2=40, p0.s = 0.15, p0.t = 0.25, p1.s = 0.3, p1.t= 0.1, output.all=TRUE)
The power function for multinomial designs under union-intersection test (UIT)
Description
Calculate the type I error or power of a multinomial (response and disease progression) single- or two-stage design under UIT:
H_0: p_1 \le p_{01} \  AND  \ p_2 \ge p_{02} \ versus \ H_1: p_1 \ge p_{11} > p_{01} \ OR \ p_2 \le p_{12} < p_{02}
(Note: original Zee et al. (1999) set up the correct hypotheses, but did not make a match decision.)
Usage
UIT.power(method, s1.rej, t1.rej, s1.acc, t1.acc, n1, s2.rej, t2.rej, n2, p.s, p.t,
output.all)
Arguments
| method | design methods according to number of stage and stopping rule, "s1" represents single-stage design stopping for both efficacy and futility, "s2" represents two-stage design stopping for both efficacy and futility, "s2.f" represents two-stage design stopping for futility only. | 
| s1.rej | first stage responses threshold to stop the trial for efficacy. Applied for "s1" or "s2". | 
| t1.rej | first stage disease progressions threshold to stop the trial for efficacy. Applied for "s1" or "s2". | 
| s1.acc | first stage responses threshold to stop the trial for futility. Applied for "s2" or "s2.f". | 
| t1.acc | first stage disease progressions threshold to stop the trial for futility. Applied for "s2" or "s2.f". | 
| n1 | first stage sample size. Applied for "s1", "s2" or "s2.f". | 
| s2.rej | second stage responses threshold to stop the trial for efficacy. Applied for "s2" or "s2.f". | 
| t2.rej | second stage disease progressions threshold to stop the trial for efficacy. Applied for "s2" or "s2.f". | 
| n2 | second stage sample size. Applied for "s2" or "s2.f". | 
| p.s | pre-specified response rate,  | 
| p.t | pre-specified disease progression rate,   | 
| output.all | logical, if FALSE (default), only output the value of power or type I error, otherwise, also output the probability of early termination (PET) and expected sample size (EN). Applied for "s2" or "s2.f". | 
Value
| prob | the power function  | 
References
Zee, B., Melnychuk, D., Dancey, J., & Eisenhauer, E. (1999). Multinomial phase II cancer trials incorporating response and early progression. Journal of biopharmaceutical statistics, 9(2), 351-363.
Examples
p01=0.1; p02=0.9
## Calculate type I error for single-stage design
UIT.power(method="s1", s1.rej=6, t1.rej=19, n1=25, p.s=p01, p.t=p02)
## Calculate power for single-stage design
UIT.power(method="s1", s1.rej=6, t1.rej=19, n1=25, p.s=p01+0.2, p.t=p02-0.2)
## Calculate type I error for two-stage design, output PET and EN under null hypothesis
UIT.power(method="s2", s1.rej=4, t1.rej=9, s1.acc=0, t1.acc=13, n1=13,
s2.rej=6, t2.rej=18, n2=11, p.s=p01, p.t=p02, output.all=TRUE)
## Calculate power for two-stage design
UIT.power(method="s2", s1.rej=4, t1.rej=9, s1.acc=0, t1.acc=13, n1=13,
s2.rej=6, t2.rej=18, n2=11, p.s=p01+0.2, p.t=p02-0.2)
## Calculate type I error for two-stage design stopping for futility only,
## output PET and EN under null hypothesis
UIT.power(method="s2.f", s1.acc=0, t1.acc=13, n1=13,
s2.rej=6, t2.rej=18, n2=11, p.s=p01, p.t=p02, output.all=TRUE)
## Calculate power for two-stage design
UIT.power(method="s2.f", s1.acc=0, t1.acc=13, n1=13,
s2.rej=6, t2.rej=18, n2=11, p.s=p01+0.2, p.t=p02-0.2)
The design function for Simon (admissible) two-stage design
Description
Search criterion to find the Optimal, Minimax, Admissible and Maximized power design stopping boundary and corresponding sample size
Usage
binom.design(type = c("minimax","optimal","maxpower","admissible"), p0, p1,
signif.level=0.05, power.level=0.85, nmax=100, plot.out = FALSE)
Arguments
| type | the output types of design, choose from "minimax","optimal","admissible" and "maxpower" | 
| p0 | undesirable response rate. | 
| p1 | desirable response rate for treatment efficacy. | 
| signif.level | threshold for the probability of declaring drug desirable under p0. | 
| power.level | threshold for the probability of declaring drug desirable under p1. | 
| nmax | maximum total sample size | 
| plot.out | logical; if FALSE (default), do not output plot, otherwise, output a plot for design selection. | 
Value
| boundset | the boundaries set:  | 
References
Simon, R. (1989). Optimal two-stage designs for phase II clinical trials. Controlled clinical trials 10(1), 1-10.
Jung, S. H., Lee, T., Kim, K., & George, S. L. (2004). Admissible two-stage designs for phase II cancer clinical trials. Statistics in medicine 23(4), 561-569.
Examples
binom.design(type = "admissible", p0 = 0.15, p1 = 0.3, signif.level = 0.05, power.level = 0.9,
plot.out = TRUE)
The power function for Simon (admissible) two-stage design
Description
Calculate the type I error or power of a two-stage design
Usage
binom.power(r1,n1,r,n,p)
Arguments
| r1 | first stage threshold to stop the trial for futility. | 
| n1 | first stage sample size. | 
| r | overall threshold to stop the trial for futility. | 
| n | total sample size. | 
| p | pre-specified response rate,  | 
Value
| prob | the power function:  | 
References
Simon, R. (1989). Optimal two-stage designs for phase II clinical trials. Controlled clinical trials 10(1), 1-10.
See Also
binom.design
Examples
## Calculate type I error
binom.power(5, 31, 16, 76, 0.15)
binom.power(5, 31, 16, 76, 0.3)