# Introduction

Response-Adaptive Randomization (RAR) design utilizes accrual information to tilt the randomization ratio to the better performing treatment group. Patients enrolled in these trials are not only treated to obtain effectiveness of a treatment but also treated to the best way possible. Altering the randomization ratio drastically can potentially affect the bias in a trial especially if one treatment is very superior to the other treatment. The major drawback to response-adaptive randomization design is that the trial needs to be short to be able to obtain the outcome of the trial for future randomization. There are various methods developed to address some of this flaws besides developing a proper design for response-adaptive randomization.

Time drift can lead to bias by confounding the treatment effect with time effects. Time trends are nearly universally ignored among RAR proponents. Besides skewed randomization ratio, time trend can be a confounding factor as illustrated in the example below.

Example of time trend issue in response-adaptive randomization (RAR) design:

• The disease itself can change, sometimes radically (e.g., AIDS in the early 1990s).
• Our definition of the disease can change due to new scientific discoveries or diagnostic methods (e.g., stage migration in nasopharyngeal carcinoma due to the introduction of CAT scans to Hong Kong ~ 2005).
• Inclusion criteria can change, either formally (in which case we can stratify analysis on before vs. after the change) or informally due to “recruiting zeal” or other issues (in which case we can’t).
• Centers can change, such as when VAs enter the trial earlier or later than academic institutions.
• Patients within centers can change, especially but not only with chronic diseases, due to the phenomenon of “A queue of desperate patients lining up at the door”.
• In addition to these examples, an investigator who wants to game the system could cross his/her fingers that his favored treatment arm is ahead, then progressively enroll better prognosis patients over time

Therefore, we designed a stratified group-sequential method on altering the randomization ratio in a block/group level to address this issue instead of altering the randomization ratio by patient basis. In each block/group, the randomization ratio is kept constant. However, the ideal number of block/group is still vague.

blockRAR is an R package for the simulation of response-adaptive randomization trials with binomial outcomes where patients are assigned in block and randomization ratio is altered by block rather than patient by patient basis using both frequentist and Bayesian methods. For more details on the method, please look at our preprint.

If you use blockRAR in published research, please cite our preprint:

Robust Response-Adaptive Randomization Design. Chandereng, T., & Chappell, R. (2019). arXiv preprint arXiv:1904.07758.

If after reading through this vignette you have questions or problems using blockRAR, please post them to https://github.com/thevaachandereng/blockRAR/issues. This will notify the package maintainers and we can work to address the issue(s). Please note that comments and questions should not be emailed directly to the package authors.

# Running blockRAR

Prior to analyzing your data, the R package needs to be installed. The easiest way to install blockRAR is through CRAN:

install.packages("blockRAR")

There are additional ways to download blockRAR. The first option is most useful for downloading a specific version of blockRAR (which can be found at https://github.com/thevaachandereng/bayesCT/releases):

devtools::install_github("thevaachandereng/blockRAR@vx.xx.x")
# or
devtools::install_version("blockRAR", version = "x.x.x", repos = "http://cran.us.r-project.org")

The second option is to download the most recent stable version through GitHub:

devtools::install_github("thevaachandereng/blockRAR")

After successful installation, the package must be loaded into the working space:

library(blockRAR)

# Required input

In this section, we will describe each input for the frequentist and Bayesian approach of block design for RAR.

## Frequentist Approach

p_control: The object p_control has to be $$0 <$$ p_control $$< 1$$. This determines the proportion of events in the control group.

p_treatment: The object p_treatment has to be $$0 <$$ p_treatment $$< 1$$. This determines the proportion of events in the treatment group.

N_total: The object N_total determines the targeted sample size of subjects enrolled in the trial. When early stopping criteria is specified, the total sample size enrolled in the trial might be smaller than the one used.

block_number: The object block_number determines the number of blocks/groups used in the design of the trial. The value of block_number needs to smaller or equal to the size of N_total. For traditional RAR, set block_number equal to N_total. For traditional RCT, select block_number to 1. The early stopping criteria is applied after completing enrollment and data collection in each block. The randomization ratio is also altered at the block level. The default block_number is set to 4.

drift: The object drift controls the size of the patient-drift as described in the preprint.The drift changes the magnitude of proportion of events in either positive/negative direction. The drift is applied at the block level where p_control and p_treatment both increasing in a patient-patient basis from their initial values to final value of the drift. Please make sure that the drift is within the limit specified, 0 < p_treatment + drift < 1 and 0 < p_control + drift < 1.

simulation: The object simulation sets the number of trials to be run.

conf_int: The object conf_int determines the confidence interval of the trial. This value is same as 1- $$\alpha$$ in the clinical setting.

alternative: The object alternative only takes two value “greater” (default) or “less”. If alternative is greater then the the trial is successful p_treatment > p_control and vice versa.

correct: The object correct is a logical indicator. If correct is set to FALSE (default), the Yates-continuity correction is not applied and vice-versa.

replace: The object replace is a logical indicator. If replace is set to TRUE (default), the sampling is done with replacement. If replace is set to FALSE, the replacement is done without replacement.

early_stop: The object early_stop is a logical indicator. The default is set to FALSE, which does not allow early stopping. If early stopping is applied, the early stopping is done at block level using the Lan-DeMets alpha-spending function.

## Bayesian Approach

p_control: The object p_control has to be $$0 <$$ p_control $$< 1$$. This determines the proportion of events in the control group.

p_treatment: The object p_treatment has to be $$0 <$$ p_treatment $$< 1$$. This determines the proportion of events in the treatment group.

N_total: The object N_total determines the targeted sample size of subjects enrolled in the trial. When early stopping criteria is specified, the total sample size enrolled in the trial might be smaller than the one used.

block_number: The object block_number determines the number of blocks/groups used in the design of the trial. The value of block_number needs to smaller or equal to the size of N_total. For traditional RAR, set block_number equal to N_total. For traditional RCT, select block_number to 1. The early stopping criteria is applied after completing enrollment and data collection in each block. The randomization ratio is also altered at the block level. The default block_number is set to 4.

drift: The object drift controls the size of the patient-drift as described in the preprint.The drift changes the magnitude of proportion of events in either positive/negative direction. The drift is applied at the block level where p_control and p_treatment both increasing in a step-wise manner at each block level from their initial values to final value of the drift. Please make sure that the drift is within the limit specified, 0 < p_treatment + drift < 1 and 0 < p_control + drift < 1.

simulation: The object simulation sets the number of trials to be run.

a0: The object a0 set the parameter value of a in the non-informative prior in Beta(a, b).

b0: The object b0 set the parameter value of b in the non-informative prior in Beta(a, b).

p: The object p sets the power in the allocation probability. The probability of randomizing subjects to treatment A in stratum j is defined as $\pi_{j, A} = \frac{(p_{A>B} (data))^ {p}}{(p_{A>B} (data))^ {p} + (p_{B>A} (data))^ {p}},$ where $$p_{A > B}(data)$$ is the posterior probability that treatment A has a higher success rate than treatment B and $$p_{A>B} (data)) = 1 - p_{B>A} (data))$$.

number_mcmc: The object number_mcmc determines the number of posterior sample draw randomly using Monte-Carlo method. The default is set to 10,000.

prob_accept_ha: The object prob_accept_ha controls the posterior probability of accepting the alternative hypothesis. The default is set to 0.95.

early_success_prob: The object early_success_prob sets the probability of stopping early for success. The default is set to 0.99. Change this value to 1 if you do not want to stop early for success.

futility_prob: The object futility_prob sets the probability of stopping early for futility. The default is set to 0.01. Change this value to 0 if you do not want to stop early for futility.

alternative: The object alternative only takes two value “greater” (default) or “less”. If alternative is greater then the the trial is successful p_treatment > p_control and vice versa.

# Obtaining Power and Sample Size

blockRAR computes power (true-positive) and return several outputs: power (proportion of true-positive), mean estimated proportion of events in the control and treatment group, stratified proportion difference in treatment, sample size enrolled, sample size in each treatment group.

## Frequentist Approach

Computing power, stratified difference in treatment proportion using the binomialfreq function.

An example function execution with proportion of events in control is 0.25, proportion of events in treatment is 0.45, targeted sample size of 200, 5 number of blocks where randomization ratio is altered, no drift is applied, $$\alpha$$ of 0.05, alternative of “greater”, sampling with replacement and early stopping not applied.

#> $power #> [1] 0.9 #> #>$p_control_estimate
#>   [1] 0.2168675 0.1857143 0.2676056 0.2795699 0.3548387 0.1296296 0.2441860
#>   [8] 0.3061224 0.1525424 0.2179487 0.1884058 0.2343750 0.1632653 0.1866667
#>  [15] 0.1702128 0.2597403 0.2876712 0.2096774 0.2857143 0.1686747 0.2197802
#>  [22] 0.2469136 0.2808989 0.1860465 0.3000000 0.1617647 0.2784810 0.2325581
#>  [29] 0.2872340 0.2333333 0.2741935 0.2500000 0.2784810 0.2716049 0.2307692
#>  [36] 0.2916667 0.2716049 0.2765957 0.1475410 0.2394366 0.2988506 0.2808989
#>  [43] 0.3076923 0.2739726 0.2571429 0.1750000 0.1666667 0.3170732 0.2631579
#>  [50] 0.2400000 0.2200000 0.2788462 0.2500000 0.2400000 0.2183908 0.1866667
#>  [57] 0.2528736 0.2686567 0.2844037 0.2200000 0.2083333 0.2674419 0.3090909
#>  [64] 0.3066667 0.2209302 0.2647059 0.3333333 0.2696629 0.2682927 0.2597403
#>  [71] 0.1875000 0.2209302 0.2500000 0.2926829 0.2763158 0.2659574 0.2619048
#>  [78] 0.2857143 0.2394366 0.2241379 0.1964286 0.2289157 0.3150685 0.2888889
#>  [85] 0.2790698 0.2333333 0.2473118 0.2537313 0.2795699 0.3291139 0.2839506
#>  [92] 0.1875000 0.2592593 0.2250000 0.2531646 0.3058824 0.2786885 0.1538462
#>  [99] 0.2602740 0.2758621
#>
#> $p_treatment_estimate #> [1] 0.4786325 0.4461538 0.4806202 0.4859813 0.4579439 0.4863014 0.3947368 #> [8] 0.3921569 0.4184397 0.5163934 0.5267176 0.5073529 0.4039735 0.4400000 #> [15] 0.4444444 0.4146341 0.4409449 0.4275362 0.5862069 0.3760684 0.3577982 #> [22] 0.4033613 0.4324324 0.4210526 0.4333333 0.4015152 0.5289256 0.4210526 #> [29] 0.4528302 0.4909091 0.5144928 0.4166667 0.4793388 0.4873950 0.4672131 #> [36] 0.4687500 0.4033613 0.4716981 0.4532374 0.4806202 0.4424779 0.4864865 #> [43] 0.4754098 0.3858268 0.4923077 0.4750000 0.4402985 0.4491525 0.4838710 #> [50] 0.3840000 0.4000000 0.3645833 0.4921875 0.4160000 0.4513274 0.4640000 #> [57] 0.3893805 0.5112782 0.3846154 0.4866667 0.4218750 0.5350877 0.3333333 #> [64] 0.4880000 0.3684211 0.4696970 0.3465347 0.4684685 0.4067797 0.4634146 #> [71] 0.4485294 0.5350877 0.4166667 0.4576271 0.5161290 0.4622642 0.4655172 #> [78] 0.4959350 0.4418605 0.5281690 0.4652778 0.3846154 0.4251969 0.3909091 #> [85] 0.4912281 0.5071429 0.3738318 0.4511278 0.4205607 0.4793388 0.4201681 #> [92] 0.4250000 0.4201681 0.4333333 0.4462810 0.4608696 0.4316547 0.4444444 #> [99] 0.4566929 0.4424779 #> #>$prop_diff_estimate
#>   [1] 0.25707940 0.28074246 0.20553360 0.20443986 0.10398788 0.31761442
#>   [7] 0.13911704 0.07807653 0.24616411 0.28193833 0.34787535 0.24909530
#>  [13] 0.19391635 0.23817664 0.27205337 0.14162628 0.14752314 0.22515723
#>  [19] 0.30253025 0.21808219 0.13086038 0.15696743 0.12851832 0.25135722
#>  [25] 0.12500000 0.25547445 0.23858141 0.18640577 0.13920751 0.24637681
#>  [31] 0.24265570 0.15280778 0.20521739 0.19163579 0.21002132 0.18314607
#>  [37] 0.12424740 0.21009269 0.30600387 0.29805996 0.14795654 0.19012987
#>  [43] 0.13265306 0.11185309 0.22485876 0.26252983 0.29857513 0.12634989
#>  [49] 0.24240781 0.14177078 0.19015544 0.07552083 0.23340708 0.17565403
#>  [55] 0.24280282 0.25426722 0.10772465 0.26902337 0.08517188 0.23928077
#>  [61] 0.21499449 0.28939076 0.02615385 0.19608971 0.16345123 0.19966254
#>  [67] 0.01168348 0.20353982 0.14113326 0.19258047 0.26181592 0.30895984
#>  [73] 0.15885714 0.14428122 0.23373102 0.19732785 0.21292373 0.22062879
#>  [79] 0.22779456 0.28989362 0.27476882 0.17720798 0.11329220 0.10754332
#>  [85] 0.19615385 0.28121137 0.12939379 0.19591141 0.13564508 0.16114542
#>  [91] 0.12374934 0.27857143 0.16328767 0.18411765 0.18846770 0.16657768
#>  [97] 0.15869981 0.29614243 0.21009325 0.17490696
#>
#> $N_enrolled #> [1] 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 #> [18] 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 #> [35] 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 #> [52] 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 #> [69] 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 #> [86] 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 #> #>$N_control
#>   [1]  83  70  71  93  93  54  86  98  59  78  69  64  49  75  47  77  73
#>  [18]  62  84  83  91  81  89  86  80  68  79  86  94  90  62  80  79  81
#>  [35]  78  72  81  94  61  71  87  89  78  73  70  80  66  82  76  75 100
#>  [52] 104  72  75  87  75  87  67 109  50  72  86 110  75  86  68  99  89
#>  [69]  82  77  64  86  68  82  76  94  84  77  71  58  56  83  73  90  86
#>  [86]  60  93  67  93  79  81  80  81  80  79  85  61  65  73  87
#>
#> $N_treatment #> [1] 117 130 129 107 107 146 114 102 141 122 131 136 151 125 153 123 127 #> [18] 138 116 117 109 119 111 114 120 132 121 114 106 110 138 120 121 119 #> [35] 122 128 119 106 139 129 113 111 122 127 130 120 134 118 124 125 100 #> [52] 96 128 125 113 125 113 133 91 150 128 114 90 125 114 132 101 111 #> [69] 118 123 136 114 132 118 124 106 116 123 129 142 144 117 127 110 114 #> [86] 140 107 133 107 121 119 120 119 120 121 115 139 135 127 113 #> #>$early_stop
#>   [1] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
#>  [36] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
#>  [71] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
#>
#> $randomization_ratio #> [,1] [,2] [,3] [,4] [,5] #> [1,] 0.5 0.7031250 0.6560000 0.6923077 0.6662260 #> [2,] 0.5 0.7000000 0.7111111 0.7342657 0.6792079 #> [3,] 0.5 0.6250000 0.7037037 0.7000737 0.6621622 #> [4,] 0.5 0.6290323 0.5648536 0.5957447 0.5908912 #> [5,] 0.5 0.4339623 0.4745981 0.5421133 0.5677643 #> [6,] 0.5 0.8000000 0.7936508 0.7926267 0.7658662 #> [7,] 0.5 0.7088608 0.6000000 0.5909091 0.5832711 #> [8,] 0.5 0.4731183 0.4524618 0.5531915 0.5409836 #> [9,] 0.5 0.7619048 0.8000000 0.7058228 0.7030129 #> [10,] 0.5 0.8000000 0.7139423 0.7219512 0.7063953 #> [11,] 0.5 0.7188264 0.7005650 0.7472354 0.7202614 #> [12,] 0.5 0.6428571 0.6460674 0.6481481 0.6746988 #> [13,] 0.5 0.8000000 0.7446809 0.7335423 0.7101754 #> [14,] 0.5 0.5909091 0.7222222 0.7408207 0.7123635 #> [15,] 0.5 0.7670807 0.7647059 0.7272727 0.7745342 #> [16,] 0.5 0.5783133 0.5142857 0.6079014 0.6214389 #> [17,] 0.5 0.6521739 0.5762712 0.5927583 0.5933763 #> [18,] 0.5 0.6675462 0.7281553 0.7000000 0.6910732 #> [19,] 0.5 0.6136364 0.6106195 0.6435644 0.6607774 #> [20,] 0.5 0.6067416 0.5832512 0.6621881 0.6891892 #> [21,] 0.5 0.5555556 0.5956873 0.5728814 0.5781250 #> [22,] 0.5 0.6725979 0.6475000 0.6397278 0.6008625 #> [23,] 0.5 0.6691176 0.6584158 0.6449067 0.6272285 #> [24,] 0.5 0.5000000 0.6597938 0.6573034 0.6918768 #> [25,] 0.5 0.5807453 0.5649718 0.5791367 0.6206258 #> [26,] 0.5 0.7916667 0.7252252 0.6783370 0.7218462 #> [27,] 0.5 0.5770235 0.6410256 0.6666667 0.6587957 #> [28,] 0.5 0.4318182 0.5909091 0.6222222 0.6218487 #> [29,] 0.5 0.5670103 0.5544355 0.5889571 0.5857879 #> [30,] 0.5 0.5660377 0.6353591 0.6075994 0.6489171 #> [31,] 0.5 0.6994819 0.6730008 0.6517214 0.6554128 #> [32,] 0.5 0.6217105 0.6589147 0.6761863 0.6635606 #> [33,] 0.5 0.6650246 0.6046512 0.6142964 0.6020707 #> [34,] 0.5 0.6603774 0.6812016 0.6362297 0.6383596 #> [35,] 0.5 0.6511628 0.5488959 0.6171466 0.6265861 #> [36,] 0.5 0.5057208 0.5830904 0.6341463 0.6305907 #> [37,] 0.5 0.6275862 0.6229508 0.5906995 0.6129255 #> [38,] 0.5 0.5434783 0.5937500 0.5882353 0.5730739 #> [39,] 0.5 0.7666667 0.7142857 0.7566524 0.7563117 #> [40,] 0.5 0.6341463 0.6341463 0.6949153 0.6832857 #> [41,] 0.5 0.4772727 0.5885167 0.5864198 0.6099585 #> [42,] 0.5 0.5390244 0.5350076 0.5942623 0.5997572 #> [43,] 0.5 0.6250000 0.5762712 0.6373626 0.6076861 #> [44,] 0.5 0.6538462 0.6155303 0.5423957 0.5807210 #> [45,] 0.5 0.6043956 0.6212701 0.6285714 0.6291946 #> [46,] 0.5 0.5327103 0.5830508 0.6856369 0.7116744 #> [47,] 0.5 0.6940874 0.7035831 0.7331023 0.7366096 #> [48,] 0.5 0.5783133 0.6091205 0.5923836 0.6206897 #> [49,] 0.5 0.5687500 0.6129032 0.6267252 0.6495940 #> [50,] 0.5 0.5120482 0.6006459 0.5747535 0.6153091 #> [51,] 0.5 0.5681818 0.6405229 0.6312331 0.6508728 #> [52,] 0.5 0.5681818 0.5000000 0.5116279 0.5585875 #> [53,] 0.5 0.6750000 0.6872852 0.7028112 0.7103064 #> [54,] 0.5 0.5573770 0.5776173 0.6317597 0.6458333 #> [55,] 0.5 0.7204969 0.6071429 0.6605437 0.6560748 #> [56,] 0.5 0.5743243 0.6108291 0.7010349 0.6962264 #> [57,] 0.5 0.5625000 0.5416667 0.5686275 0.5861468 #> [58,] 0.5 0.7906977 0.6875000 0.7132018 0.6956208 #> [59,] 0.5 0.4966887 0.5121951 0.5187773 0.5487805 #> [60,] 0.5 0.7570093 0.7746114 0.7466216 0.7662338 #> [61,] 0.5 0.6461538 0.7012195 0.6405229 0.6637650 #> [62,] 0.5 0.5681818 0.5362903 0.6286408 0.6489433 #> [63,] 0.5 0.4186047 0.4827586 0.4816754 0.4959882 #> [64,] 0.5 0.6859122 0.6753603 0.6710933 0.6540267 #> [65,] 0.5 0.6136364 0.6537530 0.6077210 0.6472946 #> [66,] 0.5 0.7589286 0.6928808 0.6616654 0.6590909 #> [67,] 0.5 0.5000000 0.5172414 0.4692308 0.4681763 #> [68,] 0.5 0.5681818 0.6505376 0.6369793 0.6330978 #> [69,] 0.5 0.6676301 0.6232877 0.6400000 0.6366530 #> [70,] 0.5 0.6634615 0.6906077 0.6296852 0.6208315 #> [71,] 0.5 0.5084746 0.6388889 0.6957404 0.7005189 #> [72,] 0.5 0.5566265 0.6341841 0.6532348 0.6500708 #> [73,] 0.5 0.6750000 0.6409336 0.6202532 0.6313069 #> [74,] 0.5 0.6470588 0.6341463 0.5975190 0.5919226 #> [75,] 0.5 0.5892857 0.5636998 0.6386176 0.6529237 #> [76,] 0.5 0.6111111 0.6060606 0.6151798 0.6395528 #> [77,] 0.5 0.6284916 0.6666667 0.6931060 0.6495589 #> [78,] 0.5 0.5454545 0.5830640 0.6151798 0.6198448 #> [79,] 0.5 0.6440281 0.6463720 0.5635359 0.6271380 #> [80,] 0.5 0.6634615 0.6149733 0.7312319 0.7154170 #> [81,] 0.5 0.7325581 0.7331461 0.7335423 0.6906759 #> [82,] 0.5 0.6250000 0.6562500 0.5982009 0.5978607 #> [83,] 0.5 0.6460674 0.6320285 0.5912807 0.5597970 #> [84,] 0.5 0.4090909 0.5454545 0.5513393 0.5217574 #> [85,] 0.5 0.7246377 0.6710526 0.5883362 0.6101695 #> [86,] 0.5 0.7267760 0.6970387 0.7042254 0.6814233 #> [87,] 0.5 0.5783133 0.5789474 0.6500000 0.6257170 #> [88,] 0.5 0.6000000 0.6637589 0.6480339 0.6920152 #> [89,] 0.5 0.4444444 0.5921959 0.6517672 0.6159601 #> [90,] 0.5 0.5467197 0.5792174 0.6236162 0.6299213 #> [91,] 0.5 0.5770235 0.5993180 0.6249012 0.5737352 #> [92,] 0.5 0.6704036 0.6116505 0.6511057 0.6919431 #> [93,] 0.5 0.7475083 0.6585366 0.6326803 0.6052632 #> [94,] 0.5 0.6410256 0.6930876 0.6460396 0.6389858 #> [95,] 0.5 0.6725979 0.6591760 0.6009693 0.5927419 #> [96,] 0.5 0.3932584 0.5652174 0.5510204 0.5882944 #> [97,] 0.5 0.6865672 0.6829268 0.6508638 0.6344862 #> [98,] 0.5 0.8000000 0.6889140 0.6707982 0.6978637 #> [99,] 0.5 0.5882353 0.5650558 0.6112957 0.6369355 #> [100,] 0.5 0.6440281 0.6000000 0.5756241 0.6387242 ## Bayesian Approach Computing power, stratified difference in treatment proportion using the binomialbayes function. An example function execution with proportion of events in control is 0.35, proportion of events in treatment is 0.35, targeted sample size of 150, 2 number of blocks where randomization ratio is altered, 0.10 drift is applied, $$Beta(0.5, 0.5)$$ non-informative prior is used, probability of accepting alternative of 0.95, alternative of “greater”, sampling with replacement and early stopping not applied. #>$power
#> [1] 0.02
#>
#> $prop_diff_estimate #> [1] 0.122363723 0.055128537 0.110957049 0.177256657 -0.063364597 #> [6] -0.030541139 -0.146182451 0.115049665 -0.064673658 0.010942050 #> [11] 0.069020976 -0.060747778 -0.102487317 0.104195963 -0.031181332 #> [16] -0.054943879 -0.009224367 0.013152611 -0.168876141 -0.122370683 #> [21] -0.106962552 0.104968428 0.129457780 -0.059345682 -0.031515775 #> [26] -0.008766448 -0.067668744 0.027126949 -0.090403172 0.020712106 #> [31] -0.054741514 0.032219877 -0.092281205 0.090196722 -0.002587080 #> [36] -0.061690033 -0.133710817 -0.015508889 0.006733734 -0.094331787 #> [41] -0.073039661 -0.107869654 -0.074177052 -0.023952252 0.050711198 #> [46] 0.040709279 0.084808042 -0.016901717 -0.056221331 -0.003412997 #> #>$N_enrolled
#>  [1] 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150
#> [18] 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150
#> [35] 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150
#>
#> $N_control #> [1] 61 63 56 54 102 96 103 52 66 78 69 82 98 62 86 73 82 #> [18] 59 98 82 97 77 48 92 107 66 76 51 95 76 97 62 98 70 #> [35] 88 65 95 85 63 91 79 92 91 72 87 77 65 61 94 74 #> #>$N_treatment
#>  [1]  89  87  94  96  48  54  47  98  84  72  81  68  52  88  64  77  68
#> [18]  91  52  68  53  73 102  58  43  84  74  99  55  74  53  88  52  80
#> [35]  62  85  55  65  87  59  71  58  59  78  63  73  85  89  56  76
#>
#> $early_success #> [1] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [36] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> #>$early_futilty
#>  [1] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
#> [36] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
#>
#> \$randomization_ratio
#>            [,1]      [,2]
#>  [1,] 0.4984500 0.7835496
#>  [2,] 0.5003500 0.6905734
#>  [3,] 0.4994500 0.8000000
#>  [4,] 0.5076518 0.8000000
#>  [5,] 0.4994500 0.2000000
#>  [6,] 0.4984000 0.3039898
#>  [7,] 0.5040003 0.2000000
#>  [8,] 0.5048004 0.8000000
#>  [9,] 0.5012000 0.5051505
#> [10,] 0.5003500 0.5895865
#> [11,] 0.4984500 0.6269358
#> [12,] 0.4998000 0.3565377
#> [13,] 0.5009000 0.2000000
#> [14,] 0.4991000 0.7187385
#> [15,] 0.5016000 0.2424371
#> [16,] 0.4950995 0.5825939
#> [17,] 0.5013000 0.3470664
#> [18,] 0.4986500 0.5810231
#> [19,] 0.5026001 0.2000000
#> [20,] 0.4981500 0.3823239
#> [21,] 0.4964498 0.2000000
#> [22,] 0.4948495 0.4717602
#> [23,] 0.4995500 0.7605319
#> [24,] 0.5001500 0.2592282
#> [25,] 0.4984500 0.3321500
#> [26,] 0.5018000 0.4807214
#> [27,] 0.5059008 0.4782087
#> [28,] 0.4997000 0.7696635
#> [29,] 0.4975499 0.3100396
#> [30,] 0.4973999 0.5144120
#> [31,] 0.4948995 0.2680000
#> [32,] 0.5068513 0.6814728
#> [33,] 0.4977000 0.2676232
#> [34,] 0.5013500 0.5061009
#> [35,] 0.4994500 0.5005500
#> [36,] 0.5006000 0.5912403
#> [37,] 0.5033502 0.2000000
#> [38,] 0.5016500 0.3118687
#> [39,] 0.5048004 0.6133391
#> [40,] 0.4993000 0.3799578
#> [41,] 0.5008500 0.4949995
#> [42,] 0.4998500 0.2604097
#> [43,] 0.4986500 0.4068782
#> [44,] 0.5015500 0.3864861
#> [45,] 0.4980000 0.3532645
#> [46,] 0.4949495 0.5750539
#> [47,] 0.4993500 0.6880554
#> [48,] 0.5041003 0.6333564
#> [49,] 0.4977500 0.2786106
#> [50,] 0.4993500 0.5487079

# Session Info

#> R version 3.6.1 (2019-07-05)
#> Platform: x86_64-apple-darwin15.6.0 (64-bit)
#> Running under: macOS Mojave 10.14.6
#>
#> Matrix products: default
#> BLAS:   /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRblas.0.dylib
#> LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib
#>
#> Random number generation:
#>  RNG:     Mersenne-Twister
#>  Normal:  Inversion
#>  Sample:  Rounding
#>
#> locale:
#> [1] C/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
#>
#> attached base packages:
#> [1] stats     graphics  grDevices utils     datasets  methods   base
#>
#> other attached packages:
#> [1] blockRAR_1.0.2 ggplot2_3.2.1
#>
#> loaded via a namespace (and not attached):
#>  [1] Rcpp_1.0.3       nloptr_1.2.1     pillar_1.4.2     compiler_3.6.1
#>  [5] tools_3.6.1      boot_1.3-23      lme4_1.1-21      digest_0.6.22
#>  [9] nlme_3.1-141     evaluate_0.14    tibble_2.1.3     gtable_0.3.0
#> [13] lattice_0.20-38  pkgconfig_2.0.3  rlang_0.4.1      Matrix_1.2-17
#> [17] yaml_2.2.0       xfun_0.10        coda_0.19-3      withr_2.1.2
#> [21] dplyr_0.8.3      stringr_1.4.0    knitr_1.25       ldbounds_1.1-1.1
#> [25] grid_3.6.1       tidyselect_0.2.5 glue_1.3.1       R6_2.4.1
#> [29] arm_1.10-1       rmarkdown_1.16   minqa_1.2.4      purrr_0.3.3
#> [33] magrittr_1.5     splines_3.6.1    scales_1.0.0     htmltools_0.4.0
#> [37] MASS_7.3-51.4    abind_1.4-5      assertthat_0.2.1 colorspace_1.4-1
#> [41] labeling_0.3     stringi_1.4.3    lazyeval_0.2.2   munsell_0.5.0
#> [45] crayon_1.3.4