Introduction

Here, we present the calculations for the initial design of the DEFUSE3 trial based on [@Lai2014191] and [@Lai201593]. The trial parameters are fixed as follows.

library(ASSISTant)
##Fix randomization vector N, errors, eps
trialParameters <- list(N = c(200, 340, 476), type1Error = 0.025,
                        eps = 1/2, type2Error = 0.1)

The design parameters are the following for various scenarios.

designParameters <- list(
    nul0 = list(prevalence = rep(1/6, 6), mean = matrix(0, 2, 6),
                sd = matrix(1, 2, 6)),
    alt1 = list(prevalence = rep(1/6, 6), mean = rbind(rep(0, 6),
                                                       c(0.5, 0.4, 0.3, 0, 0, 0)),
                sd = matrix(1, 2, 6)),
    alt2 = list(prevalence = rep(1/6, 6), mean = rbind(rep(0, 6),
                                                     c(0.5, 0.5, 0, 0, 0, 0)),
                sd = matrix(1,2, 6)),
    alt3 = list(prevalence = rep(1/6, 6), mean = rbind(rep(0, 6), rep(0.36, 6)),
                sd = matrix(1,2, 6)),
    alt4 = list(prevalence = rep(1/6, 6), mean = rbind(rep(0, 6), rep(0.30, 6)),
                sd = matrix(1,2, 6)),
    alt5 = list(prevalence = rep(1/6, 6), mean = rbind(rep(0, 6),
                                                       c(0.4, 0.3, 0.2, 0, 0, 0)),
                sd = matrix(1,2, 6)),
    alt6 = list(prevalence = rep(1/6, 6), mean = rbind(rep(0, 6),
                                                       c(0.5, 0.5, 0.3, 0.3, 0.1, 0.1)),
                sd = matrix(1,2, 6))
)

The NULL Scenario

defuse3 <- DEFUSE3Design$new(trialParameters = trialParameters,
                             numberOfSimulations = 25000,
                             designParameters = designParameters$nul0,
                             showProgress = FALSE)
print(defuse3)
## Design Parameters:
##  Number of Groups: 6
##  Prevalence:
## 
##     Group1      Group2      Group3      Group4      Group5      Group6
## ----------  ----------  ----------  ----------  ----------  ----------
##  0.1666667   0.1666667   0.1666667   0.1666667   0.1666667   0.1666667
## 
##  Using Discrete Rankin scores? FALSE
## 
##  Normal Rankin Distribution means (null row, alt. row):
## 
## 
##         Group1   Group2   Group3   Group4   Group5   Group6
## -----  -------  -------  -------  -------  -------  -------
## Null         0        0        0        0        0        0
## Alt          0        0        0        0        0        0
## 
##  Normal Rankin Distribution SDs (null row, alt. row):
## 
## 
##         Group1   Group2   Group3   Group4   Group5   Group6
## -----  -------  -------  -------  -------  -------  -------
## Null         1        1        1        1        1        1
## Alt          1        1        1        1        1        1
## 
## Trial Parameters:
## List of 6
##  $ N                 : num [1:3] 200 340 476
##  $ type1Error        : num 0.025
##  $ eps               : num 0.5
##  $ type2Error        : num 0.1
##  $ effectSize        : num 0.105
##  $ originalEffectSize: num 0.0858
## 
## Boundaries:
## 
## 
##     btilde          b          c
## ----------  ---------  ---------
##  -1.885041   2.591142   2.758487
result <- defuse3$explore(numberOfSimulations = 25000,
                          rngSeed = 283768,
                          showProgress = FALSE)
analysis <- defuse3$analyze(result)
print(defuse3$summary(analysis))
## P(Reject H0_ITT) = 0.009440; P(Reject H0_subgp) = 0.013680; P(Reject H0) = 0.023120
## P(Early stop for efficacy [futility]) = 0.016600 [0.623360]
## Mean [SD] Randomized N = 360.651840 [100.980757]
## 
## Stage at exit (proportion)
## 
## 
##  exitStage   proportion
## ----------  -----------
##          1      0.20224
##          2      0.43772
##          3      0.36004
## 
## Mean [SD] Lost N = 126.219520 [67.917607]
## Mean [SD] Analyzed N = 234.432320 [88.785785]
## 
## Mean loss by futility stage and subgroup
## 
## 
##  FutilityStage   selectedGroup        mean          sd
## --------------  --------------  ----------  ----------
##              1               1   166.73208    5.282328
##              1               2   133.31167    6.706815
##              1               3   100.03768    7.207760
##              1               4    66.80180    6.708474
##              1               5    33.28748    5.302060
##              2               1   283.22233    6.814492
##              2               2   226.74677    8.587151
##              2               3   169.37171    9.327705
##              2               4   113.54567    8.773543
##              2               5    56.44107    6.707931
##              3               1   397.14286    8.889303
##              3               2   316.76970   10.773513
##              3               3   238.00000   11.588645
##              3               4   157.19685   10.422717
##              3               5    79.68850    8.212990
## 
## Chance of each subpopulation rejected
## 
## 
##  group   count   proportion
## ------  ------  -----------
##      1     150      0.00600
##      2      88      0.00352
##      3      61      0.00244
##      4      34      0.00136
##      5       9      0.00036
##      6     236      0.00944
## 
## Counts by futility stage and subgroup choice
## 
## 
##  FutilityStage     G1     G2     G3     G4     G5
## --------------  -----  -----  -----  -----  -----
##              1   6584   3770   2866   2447   2988
##              2    985    774    721    843   1383
##              3    175    165    183    254    626
## 
## CI Statistics:
## Overall coverage and coverage for rejections:
## 
##  overall   rejection
## --------  ----------
##  0.97688           0
## 
## P(theta_test is in the confidence interval)
## 
## 
##   coverage   selectedCount   rejectedCount
## ----------  --------------  --------------
##  0.9806302            7744             150
##  0.9813124            4709              88
##  0.9838196            3770              61
##  0.9904063            3544              34
##  0.9981989            4997               9
##  0.0000000             236             236
## NULL

The ALT1 Scenario

result <- defuse3$explore(numberOfSimulations = 25000,
                          rngSeed = 873782,
                          trueParameters = designParameters$alt1,
                          showProgress = FALSE)
analysis <- defuse3$analyze(result)
print(defuse3$summary(analysis))
## P(Reject H0_ITT) = 0.306200; P(Reject H0_subgp) = 0.523360; P(Reject H0) = 0.829560
## P(Early stop for efficacy [futility]) = 0.431280 [0.013240]
## Mean [SD] Randomized N = 398.375680 [96.283710]
## 
## Stage at exit (proportion)
## 
## 
##  exitStage   proportion
## ----------  -----------
##          1      0.12264
##          2      0.32188
##          3      0.55548
## 
## Mean [SD] Lost N = 133.730680 [112.456201]
## Mean [SD] Analyzed N = 264.645000 [103.523990]
## 
## Mean loss by futility stage and subgroup
## 
## 
##  FutilityStage   selectedGroup        mean          sd
## --------------  --------------  ----------  ----------
##              1               1   166.86978    5.358502
##              1               2   133.85851    6.749631
##              1               3   101.36111    7.107872
##              1               4    67.25000    6.653375
##              1               5    33.99578    5.523062
##              2               1   283.34610    6.790169
##              2               2   227.09242    8.529788
##              2               3   171.32554    9.083939
##              2               4   114.62830    8.951175
##              2               5    57.83796    6.843544
##              3               1   395.55470    8.415182
##              3               2   317.00843    9.991258
##              3               3   237.79627   11.289501
##              3               4   159.39588   10.257978
##              3               5    79.27233    8.055614
## 
## Chance of each subpopulation rejected
## 
## 
##  group   count   proportion
## ------  ------  -----------
##      1    2832      0.11328
##      2    3891      0.15564
##      3    5231      0.20924
##      4     914      0.03656
##      5     216      0.00864
##      6    7655      0.30620
## 
## Counts by futility stage and subgroup choice
## 
## 
##  FutilityStage     G1     G2     G3    G4    G5
## --------------  -----  -----  -----  ----  ----
##              1   1797   1774   1836   504   237
##              2    783   1201   1711   417   216
##              3    649   1661   3274   826   459
## 
## CI Statistics:
## Overall coverage and coverage for rejections:
## 
##  overall   rejection
## --------  ----------
##  0.17044           0
## 
## P(theta_test is in the confidence interval)
## 
## 
##   coverage   selectedCount   rejectedCount
## ----------  --------------  --------------
##  0.1229483            3229            2832
##  0.1606989            4636            3891
##  0.2331037            6821            5231
##  0.4768174            1747             914
##  0.7631579             912             216
##  0.0000000            7655            7655
## NULL

The ALT2 Scenario

result <- defuse3$explore(numberOfSimulations = 25000,
                          rngSeed = 45242,
                          trueParameters = designParameters$alt2,
                          showProgress = FALSE)
analysis <- defuse3$analyze(result)
print(defuse3$summary(analysis))
## P(Reject H0_ITT) = 0.201480; P(Reject H0_subgp) = 0.641200; P(Reject H0) = 0.842680
## P(Early stop for efficacy [futility]) = 0.449640 [0.015880]
## Mean [SD] Randomized N = 398.258080 [92.262922]
## 
## Stage at exit (proportion)
## 
## 
##  exitStage   proportion
## ----------  -----------
##          1      0.10308
##          2      0.36244
##          3      0.53448
## 
## Mean [SD] Lost N = 165.325520 [113.176619]
## Mean [SD] Analyzed N = 232.932560 [102.271835]
## 
## Mean loss by futility stage and subgroup
## 
## 
##  FutilityStage   selectedGroup        mean          sd
## --------------  --------------  ----------  ----------
##              1               1   167.05005    5.292496
##              1               2   134.02275    6.591091
##              1               3   101.24512    7.329654
##              1               4    67.99533    7.150439
##              1               5    33.80753    5.307022
##              2               1   283.01577    7.156871
##              2               2   227.32080    8.475192
##              2               3   171.38363    9.051773
##              2               4   114.26829    8.699397
##              2               5    58.07273    6.793616
##              3               1   396.41366    7.818986
##              3               2   316.88525   10.213084
##              3               3   237.98603   10.519924
##              3               4   159.10829   10.106124
##              3               5    80.16061    8.750595
## 
## Chance of each subpopulation rejected
## 
## 
##  group   count   proportion
## ------  ------  -----------
##      1    2899      0.11596
##      2   10842      0.43368
##      3    1665      0.06660
##      4     468      0.01872
##      5     156      0.00624
##      6    5037      0.20148
## 
## Counts by futility stage and subgroup choice
## 
## 
##  FutilityStage     G1     G2     G3    G4    G5
## --------------  -----  -----  -----  ----  ----
##              1   1998   4396   1024   428   239
##              2    761   3404    623   287   165
##              3    527   4488    859   434   330
## 
## CI Statistics:
## Overall coverage and coverage for rejections:
## 
##  overall   rejection
## --------  ----------
##  0.15732           0
## 
## P(theta_test is in the confidence interval)
## 
## 
##   coverage   selectedCount   rejectedCount
## ----------  --------------  --------------
##  0.1177724            3286            2899
##  0.1176758           12288           10842
##  0.3355946            2506            1665
##  0.5926893            1149             468
##  0.7874659             734             156
##  0.0000000            5037            5037
## NULL

The ALT3 Scenario

result <- defuse3$explore(numberOfSimulations = 25000,
                          rngSeed = 833722,
                          trueParameters = designParameters$alt3,
                          showProgress = FALSE)
analysis <- defuse3$analyze(result)
print(defuse3$summary(analysis))
## P(Reject H0_ITT) = 0.867200; P(Reject H0_subgp) = 0.038640; P(Reject H0) = 0.905840
## P(Early stop for efficacy [futility]) = 0.760200 [0.012360]
## Mean [SD] Randomized N = 307.539840 [109.674197]
## 
## Stage at exit (proportion)
## 
## 
##  exitStage   proportion
## ----------  -----------
##          1      0.45280
##          2      0.31976
##          3      0.22744
## 
## Mean [SD] Lost N = 18.005880 [55.682339]
## Mean [SD] Analyzed N = 289.533960 [98.278778]
## 
## Mean loss by futility stage and subgroup
## 
## 
##  FutilityStage   selectedGroup        mean          sd
## --------------  --------------  ----------  ----------
##              1               1   166.40000    5.462532
##              1               2   133.28289    6.861369
##              1               3   100.64539    7.049959
##              1               4    66.76871    6.263690
##              1               5    33.75622    5.223531
##              2               1   283.21839    6.567052
##              2               2   227.18182    9.021187
##              2               3   169.27551    9.305558
##              2               4   114.13675    9.092348
##              2               5    56.94382    6.585139
##              3               1   397.78125    9.534649
##              3               2   316.77848    9.828221
##              3               3   236.43902   10.735338
##              3               4   159.43445   10.776738
##              3               5    79.32710    8.066232
## 
## Chance of each subpopulation rejected
## 
## 
##  group   count   proportion
## ------  ------  -----------
##      1     205      0.00820
##      2     158      0.00632
##      3     185      0.00740
##      4     208      0.00832
##      5     210      0.00840
##      6   21680      0.86720
## 
## Counts by futility stage and subgroup choice
## 
## 
##  FutilityStage    G1    G2    G3    G4     G5
## --------------  ----  ----  ----  ----  -----
##              1   215   152   141   147    201
##              2    87    66    98   117    178
##              3    96   158   205   389   1070
## 
## CI Statistics:
## Overall coverage and coverage for rejections:
## 
##  overall   rejection
## --------  ----------
##  0.09416           0
## 
## P(theta_test is in the confidence interval)
## 
## 
##   coverage   selectedCount   rejectedCount
## ----------  --------------  --------------
##  0.4849246             398             205
##  0.5797872             376             158
##  0.5833333             444             185
##  0.6814701             653             208
##  0.8550725            1449             210
##  0.0000000           21680           21680
## NULL

The ALT4 Scenario

result <- defuse3$explore(numberOfSimulations = 25000,
                          rngSeed = 434272,
                          trueParameters = designParameters$alt4,
                          showProgress = FALSE)
analysis <- defuse3$analyze(result)
print(defuse3$summary(analysis))
## P(Reject H0_ITT) = 0.693680; P(Reject H0_subgp) = 0.072120; P(Reject H0) = 0.765800
## P(Early stop for efficacy [futility]) = 0.575160 [0.032880]
## Mean [SD] Randomized N = 351.155360 [114.135617]
## 
## Stage at exit (proportion)
## 
## 
##  exitStage   proportion
## ----------  -----------
##          1      0.30108
##          2      0.30696
##          3      0.39196
## 
## Mean [SD] Lost N = 42.178000 [79.575309]
## Mean [SD] Analyzed N = 308.977360 [100.787897]
## 
## Mean loss by futility stage and subgroup
## 
## 
##  FutilityStage   selectedGroup        mean          sd
## --------------  --------------  ----------  ----------
##              1               1   166.49654    5.262024
##              1               2   133.57990    6.728113
##              1               3    99.90028    6.909933
##              1               4    66.63772    6.441039
##              1               5    32.95604    5.239027
##              2               1   283.10798    6.996130
##              2               2   227.42132    8.777299
##              2               3   168.80288    8.815039
##              2               4   113.11364    8.661042
##              2               5    56.32245    7.285172
##              3               1   396.60633    8.969329
##              3               2   316.72087    9.940072
##              3               3   237.27930    9.991098
##              3               4   157.91962   10.800862
##              3               5    79.20565    8.351549
## 
## Chance of each subpopulation rejected
## 
## 
##  group   count   proportion
## ------  ------  -----------
##      1     409      0.01636
##      2     350      0.01400
##      3     332      0.01328
##      4     357      0.01428
##      5     355      0.01420
##      6   17342      0.69368
## 
## Counts by futility stage and subgroup choice
## 
## 
##  FutilityStage    G1    G2    G3    G4     G5
## --------------  ----  ----  ----  ----  -----
##              1   578   388   351   334    455
##              2   213   197   208   264    490
##              3   221   369   512   846   2232
## 
## CI Statistics:
## Overall coverage and coverage for rejections:
## 
##  overall   rejection
## --------  ----------
##   0.2342           0
## 
## P(theta_test is in the confidence interval)
## 
## 
##   coverage   selectedCount   rejectedCount
## ----------  --------------  --------------
##  0.5958498            1012             409
##  0.6331237             954             350
##  0.6900093            1071             332
##  0.7527701            1444             357
##  0.8882594            3177             355
##  0.0000000           17342           17342
## NULL

The ALT5 Scenario

result <- defuse3$explore(numberOfSimulations = 25000,
                          rngSeed = 132323,
                          trueParameters = designParameters$alt5,
                          showProgress = FALSE)
analysis <- defuse3$analyze(result)
print(defuse3$summary(analysis))
## P(Reject H0_ITT) = 0.166040; P(Reject H0_subgp) = 0.454400; P(Reject H0) = 0.620440
## P(Early stop for efficacy [futility]) = 0.298280 [0.050720]
## Mean [SD] Randomized N = 416.288800 [89.083334]
## 
## Stage at exit (proportion)
## 
## 
##  exitStage   proportion
## ----------  -----------
##          1      0.08748
##          2      0.26152
##          3      0.65100
## 
## Mean [SD] Lost N = 149.395640 [102.070883]
## Mean [SD] Analyzed N = 266.893160 [99.495587]
## 
## Mean loss by futility stage and subgroup
## 
## 
##  FutilityStage   selectedGroup        mean          sd
## --------------  --------------  ----------  ----------
##              1               1   166.84577    5.216502
##              1               2   133.93242    6.682847
##              1               3   100.78997    6.988188
##              1               4    68.02927    6.685558
##              1               5    33.68081    5.103690
##              2               1   282.84910    6.803451
##              2               2   227.13743    8.834386
##              2               3   170.57788    9.186361
##              2               4   113.69005    8.946930
##              2               5    56.88683    7.058339
##              3               1   396.10160    8.195591
##              3               2   317.01791   10.063610
##              3               3   237.56308   10.928906
##              3               4   159.13271   10.265928
##              3               5    80.03485    7.628021
## 
## Chance of each subpopulation rejected
## 
## 
##  group   count   proportion
## ------  ------  -----------
##      1    3391      0.13564
##      2    3695      0.14780
##      3    3244      0.12976
##      4     786      0.03144
##      5     244      0.00976
##      6    4151      0.16604
## 
## Counts by futility stage and subgroup choice
## 
## 
##  FutilityStage     G1     G2     G3    G4    G5
## --------------  -----  -----  -----  ----  ----
##              1   2814   2619   2214   854   542
##              2   1173   1579   1682   613   486
##              3    748   1563   2259   957   746
## 
## CI Statistics:
## Overall coverage and coverage for rejections:
## 
##  overall   rejection
## --------  ----------
##  0.37956           0
## 
## P(theta_test is in the confidence interval)
## 
## 
##   coverage   selectedCount   rejectedCount
## ----------  --------------  --------------
##  0.2838437            4735            3391
##  0.3586183            5761            3695
##  0.4729488            6155            3244
##  0.6757426            2424             786
##  0.8624577            1774             244
##  0.0000000            4151            4151
## NULL

The ALT6 Scenario

result <- defuse3$explore(numberOfSimulations = 25000,
                          rngSeed = 653221,
                          trueParameters = designParameters$alt6,
                          showProgress = FALSE)
analysis <- defuse3$analyze(result)
print(defuse3$summary(analysis))
## P(Reject H0_ITT) = 0.689200; P(Reject H0_subgp) = 0.222560; P(Reject H0) = 0.911760
## P(Early stop for efficacy [futility]) = 0.620160 [0.005760]
## Mean [SD] Randomized N = 350.045280 [111.958570]
## 
## Stage at exit (proportion)
## 
## 
##  exitStage   proportion
## ----------  -----------
##          1      0.29164
##          2      0.33428
##          3      0.37408
## 
## Mean [SD] Lost N = 56.389760 [97.289279]
## Mean [SD] Analyzed N = 293.655520 [102.395658]
## 
## Mean loss by futility stage and subgroup
## 
## 
##  FutilityStage   selectedGroup        mean          sd
## --------------  --------------  ----------  ----------
##              1               1   167.24125    5.326766
##              1               2   133.85602    6.667043
##              1               3   100.63939    7.273442
##              1               4    67.58146    6.906343
##              1               5    33.21910    4.634954
##              2               1   282.28502    6.724894
##              2               2   227.30112    8.352273
##              2               3   170.53012    9.527302
##              2               4   114.40103    8.910413
##              2               5    56.76000    7.728341
##              3               1   396.53226    8.023181
##              3               2   317.10060   10.478808
##              3               3   238.41327   10.326392
##              3               4   159.57902   10.678604
##              3               5    79.63057    8.339324
## 
## Chance of each subpopulation rejected
## 
## 
##  group   count   proportion
## ------  ------  -----------
##      1     800      0.03200
##      2    1727      0.06908
##      3    1215      0.04860
##      4    1487      0.05948
##      5     335      0.01340
##      6   17230      0.68920
## 
## Counts by futility stage and subgroup choice
## 
## 
##  FutilityStage    G1     G2    G3     G4    G5
## --------------  ----  -----  ----  -----  ----
##              1   514    639   391    356   178
##              2   207    445   332    389   150
##              3   248   1004   859   1430   628
## 
## CI Statistics:
## Overall coverage and coverage for rejections:
## 
##  overall   rejection
## --------  ----------
##  0.08824           0
## 
## P(theta_test is in the confidence interval)
## 
## 
##   coverage   selectedCount   rejectedCount
## ----------  --------------  --------------
##  0.1744066             969             800
##  0.1728927            2088            1727
##  0.2319848            1582            1215
##  0.3163218            2175            1487
##  0.6495816             956             335
##  0.0000000           17230           17230
## NULL

References