Comparing Bayesian Early Stopping Boundaries for Phase II Clinical Trials Liyun Jiang, Fangrong Yan, Peter F. Thall and Xuelin Huang A list of configurations on which we tested the code: R version 3.6.1 (2019-07-05) -- "Action of the Toes" Copyright (C) 2019 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 (64-bit) > sessionInfo() R version 3.6.1 (2019-07-05) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 7 x64 (build 7601) Service Pack Matrix products: default locale: [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 [3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C [5] LC_TIME=English_United States.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached): [1] compiler_3.6.1 tools_3.6.1 coda_0.19-3 grid_3.6.1 lattice_0.20-38 rjags_4-9 R was used for this analysis. It will take about 5.5 minutes to run each example in code compare.r. In compare.r, main function compare_early_stopping consists of seven subfunctions whose function are shown as follows. (1) function p: it is used to calculate inequality probability. Note: here, for saving time, the number of simulation is set by 50000. However, in our simulations, the number of simulation is 500000, so that the accuracy of inequality probability can reach 0.001. (2) function postMatr_Eff: it is used to get the posterior matrix which is applied in the calibration procedure for parameter C(specifically, C1, C2, C3, C4 in our paper). (3) function get_calibrated_bound: based on the posterior matrix get from function postMatr_Eff, it is used to obtain the calibrated parameter C in four futility stopping boundaries. (4) function get_tpp: based on the calibrated parameter C, it is used to obtain the True Positive Probability. (5) function get_mean_resp: based on the calibrated parameter C, it is used to calculate the mean percentage of responders for each futility boundary. (6) function get_oc_tox: it is used to generate the operating characteristics(such as, toxicity stopping boundary, probability of early toxicity stopping, sample size percentiles) for toxicity in Table 1. (7) function get_oc_fut_tox: based on the calibrated parameter C, it is used to obtain the Probability of Rejection for each futility boundary combined with toxicity boundary in Table 2. Some descriptions for input parameters in this simulation code: N: maximum sample size which is larger than 0 and can be divisible by cohort size m. Here, we set N=40. m: cohort size which is larger than 0. Here, we set m=5. pe: true response rate for experimental treatment(E), whose range is (0, 1). pt: true toxicity rate for experimental treatment, whose range is (0, 1). p0: response rate for standard treatment(S), whose range is (0, 1). delta: expected amount of improvement in response rate targeted for experimental treatment over standard treatment. Its range is (0, 1-p0). ct: early stopping boundary for toxicity, which is a probability boundary in (0, 1). ntrial: total number of simulated trial. Here, we set ntrial=500 for saving simulation time. In our simulations, it is set by 10000. You can set this parameter by any other value. type: type of futility rule, including constant, linear, exponential, zero. FPP: false positive probability, often set by 0.10 or 0.05.