Simulation experiments to compare the
alpha level, power and other features of twostage or threestage designs from function
OptimDes
with the targetted values.
1 2 3 
object 
Output object of function 
B.init 
A vector of userspecified time points (B1, ..., Bb) that determine a
set of time intervals with uniform accrual. This vector
needs to be specified only if its values differ from the call to

m.init 
The projected
number of patients that can be accrued within the time intervals
determined by 
weib0 
A vector with the shape and scale for the Weibull distribution under the
null hypothesis. These need to be specified only if they differ from
the input to 
weib1 
A vector with the shape and scale for the Weibull distribution under the
alternative hypothesis. These need to be specified only if they differ from
the input to 
interimRule 
The interim analysis is performed when the planned

sim.n 
The number of simulation replications. 
e1conv 
Convergence criteria for matching the truncated
exposure when 
CMadj 
If true, the 
attainI 
Samples sizes and times of the interim
analyses often differ from the exact targetted values for operational
reasons. The 
attainT 
Simulations with a total sample size (assuming the trial does not stop based on the interim analysis) that differs from the planned total by a specified fraction. 
FixDes 
If FixDes="E" or "N", a fixed design is simulated with the sample size determined by the Exact or Normal approximation. All other options for modifying the simuations are ignored. The alpha level and power based on an exact test and the normal approximation are returned. All other output variables are 0. The default is "F" 
Rseed 
Optional integer for input to function 
sim.n
(default is 1000
) simulation experiments are
conducted to assess how close the empirical type I and II error rates come
to the target values.
Simulation studies can also be used to assess the performance of the optimal design under misspecification of the design parameters. For example, if the Weibull shape and scale parameters of the time to event distributions are changed, or if the accrual rates are changed. (see Case and Morgan, 2003, for discussion of this topic).
The function weibPmatch
can be used to select
Weibull parameters that yield a target eventfree rate at a
specified time.
A vector with:
alphaExact 
Estimated alpha level using an exact test for the final test.
It is 
alphaNorm 
Estimated alpha level using approximately normal tests. 
powerExact 
Estimated power using an exact test for the final test.
It is 
powerNorm 
Estimated power using approximately normal tests. 
eda 
Estimated mean duration of accrual under the null hypothesis. 
etsl 
Estimated mean total study length under the null hypothesis. 
es 
Estimated mean total sample size under the null hypothesis. 
edaAlt 
Estimated mean duration of accrual under the alternative hypothesis. 
etslAlt 
Estimated mean total study length under the alternative hypothesis. 
esAlt 
Estimated mean total sample size under the alternative hypothesis. 
pstopNull 
The proportion of trials stopped for futility at the interim analysis under the null hypothesis. 
pstopAlt 
The proportion of trials stopped for futility at the interim analysis under the alternative hypothesis. 
pstopENull 
The proportion of trials stopped for efficacy at the interim analysis under the null hypothesis. 
pstopEAlt 
The proportion of trials stopped for efficacy at the interim analysis under the alternative hypothesis. 
aveE 
Average total (truncated at x) exposure at time of interim analysis. 
pinfoNull 
The proportion of the total information obtained at the interim analysis under the null hypothesis. 
pinfoNull2 
The proportion of the total information obtained at
the second interim analysis under the null hypothesis
when 
pinfoAlt 
The proportion of the total information obtained at the interim analysis under the alternative hypothesis. 
n1 
Average sample size at interim. 
n2 
Average sample size at second interim. 
t1 
Average time at interim. 
t2 
Average time at second interim. 
difIntSupL 
Lowest interim survival rate difference stopped for efficacy. 
difIintSupH 
Highest interim survival rate difference not stopped for efficacy. 
difIntFutL 
Lowest interim survival rate difference continued to final analysis based on the normal approximation. 
difIntFutH 
Highest interim survival rate difference resulting in futility terimination based on the normal approximation. 
difFinSupL 
Lowest final survival rate difference rejecting null based on the normal approximation. 
difFinFutH 
Highest final survival rate difference without rejecting null based on the normal approximation. 
Bo Huang <bo.huang@pfizer.com> and Neal Thomas <neal.thomas@pfizer.com>
Huang B., Talukder E. and Thomas N. Optimal twostage Phase II designs with longterm endpoints. Statistics in Biopharmaceutical Research, 2(1), 51–61.
Case M. D. and Morgan T. M. (2003) Design of Phase II cancer trials evaluating survival probabilities. BMC Medical Research Methodology, 3, 7.
Lin D. Y., Shen L., Ying Z. and Breslow N. E. (1996) Group seqential designs for monitoring survival probabilities. Biometrics, 52, 1033–1042.
Simon R. (1989) Optimal twostage designs for phase II clinical trials. Controlled Clinical Trials, 10, 1–10.
OptimDes
, TestStage
,
weibPmatch
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21  ## Not run:
B.init < c(1, 2, 3, 4, 5)
m.init < c(15, 20, 25, 20, 15)
alpha < 0.05
beta < 0.1
param < c(1, 1.09, 2, 1.40)
x < 1
# H0: S0=0.40 H1: S1=0.60
object1 < OptimDes(B.init,m.init,alpha,beta,param,x,target="EDA",sf="futility",num.arm=1)
SimDes(object1,sim.n=100)
### Stopping based on pre=planned time of analysis
SimDes(object1,interimRule='t1',sim.n=100)
### accrual rates differ from planned
SimDes(object1,m.init=c(5,5,25,25,25),sim.n=100)
## End(Not run)

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
Please suggest features or report bugs with the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.