"3arm_bounds&CI.R" is to compute bounds and CIs for average causal effects within principal strata in three-arm trials with noncompliance discussed in Cheng and Small's paper "Bounds on causal effects in three-arm trials with non-compliance" to appear in JRSSB. There are various functions to compute the bounds, CIs and change the output formats. You just need to input your data by "truedata", define the confidence level by "conf" and the number of bootstrap resamplings you want to use by "r". The first column of the data should be the outcome "Y", the second column should be the treatment-received "D", and the third column should be the randomization assignment "Z". The outputs will give you the bounds, Bonferroni CI, H-M CI and B-method CI for the average causal effects within principal strata. "A_OAB" and "B_OAB" are the average causal effects of treatments A and B for OAB stratum under assumptions 1-4, respectively. "A_OAO" and "B_OOB" are the average causal effects of treatments A and B for strata OAO and OOB under assumptions 1-4, respectively. "A_OAB_monot", "A_OAO_monot" , and "B_OAB_monot" are the corresponding average causal effects within principal strata under the additional monotonicity assumption (assumption 5) in addition to assumptions 1-4. For the example of the hypothetical data used in the paper, we input the data, define the confidence level and the number of bootstrap resamplings as the following. ----------------------------------------------------------------------------------------- Z<-c(rep(0,400),rep(1,400),rep(2,400)) D<-c(rep(0,400),rep(0,20),rep(1,380),rep(0,80),rep(2,320)) Y<-c(rep(0,220),rep(1,180),rep(0,16),rep(1,4),rep(0,19),rep(1,361),rep(0,60),rep(1,20),rep(0,96),rep(1,224)) truedata<-cbind(Y,D,Z) conf<-0.95 r<-1000 ------------------------------------------------------------------------------------------ The outputs are as the following. ---------------------------------------- [1] "Bounds" Lower Bound Upper Bound A_OAB 0.4111842 0.5063291 A_OAO 0.3906250 0.7894737 B_OAB 0.1578947 0.2266667 B_OOB -1.0000000 1.0000000 A_OAB_monot 0.4406250 0.5000000 A_OAO_monot 0.4166667 0.7333333 B_OAB_monot 0.2000000 0.2000000 [1] "Bonferroni CI" Lower Limit Upper Limit A_OAB 0.33121637 0.5720473 A_OAO 0.13507503 0.8965968 B_OAB 0.06280614 0.3122225 B_OOB -1.00000000 1.0000000 A_OAB_monot 0.36486731 0.5657348 A_OAO_monot 0.14593598 0.8684370 B_OAB_monot 0.11582281 0.2834139 [1] "H-M CI" Lower Limit Upper Limit A_OAB 0.33720960 0.5803037 A_OAO 0.22094727 0.9591514 B_OAB 0.06609786 0.3184635 B_OOB -1.00000000 1.0000000 A_OAB_monot 0.37153320 0.5690918 A_OAO_monot 0.19791667 0.9520833 [1] "B-method CI" Lower Limit Upper Limit A_OAB 0.33439030 0.5765856 A_OAO 0.19069740 0.9071469 B_OAB 0.06776053 0.3161835 B_OOB -1.00000000 1.0000000 A_OAB_monot 0.37101515 0.5675152 A_OAO_monot 0.20906792 0.8818657 ----------------------------------------