Introduction

ASSISTant is an R package for Adaptive Subgroup Selection In Sequential Trials. This vignette reproduces all the simulations in the original paper of Lai, Lavori and Liao [-@Lai2014191].

NOTE The number of simulations has been drastically reduced in this vignette in order to avoid taxing CRAN servers. The full_doc sources contain the complete sources and output; see files in the directory

system.file("full_doc", package="ASSISTant")
library(ASSISTant)
data(LLL.SETTINGS)
str(LLL.SETTINGS)
## List of 3
##  $ trialParameters:List of 4
##   ..$ N         : num [1:3] 300 400 500
##   ..$ type1Error: num 0.05
##   ..$ eps       : num 0.5
##   ..$ type2Error: num 0.2
##  $ scenarios      :List of 11
##   ..$ S0 :List of 2
##   .. ..$ mean: num [1:2, 1:6] 0 0 0 0 0 0 0 0 0 0 ...
##   .. ..$ sd  : num [1:2, 1:6] 1 1 1 1 1 1 1 1 1 1 ...
##   ..$ S1 :List of 2
##   .. ..$ mean: num [1:2, 1:6] 0 0.3 0 0.3 0 0.3 0 0.3 0 0.3 ...
##   .. ..$ sd  : num [1:2, 1:6] 1 1 1 1 1 1 1 1 1 1 ...
##   ..$ S2 :List of 2
##   .. ..$ mean: num [1:2, 1:6] 0 0.3 0 0.3 0 0.3 0 0.3 0 0.3 ...
##   .. ..$ sd  : num [1:2, 1:6] 1 1 1 1 1 1 1 1 1 1 ...
##   ..$ S3 :List of 2
##   .. ..$ mean: num [1:2, 1:6] 0 0.3 0 0.3 0 0 0 0 0 0 ...
##   .. ..$ sd  : num [1:2, 1:6] 1 1 1 1 1 1 1 1 1 1 ...
##   ..$ S4 :List of 2
##   .. ..$ mean: num [1:2, 1:6] 0 0 0 0 0 0.3 0 0.3 0 0 ...
##   .. ..$ sd  : num [1:2, 1:6] 1 1 1 1 1 1 1 1 1 1 ...
##   ..$ S5 :List of 2
##   .. ..$ mean: num [1:2, 1:6] 0 0.6 0 0 0 0 0 0 0 0 ...
##   .. ..$ sd  : num [1:2, 1:6] 1 1 1 1 1 1 1 1 1 1 ...
##   ..$ S6 :List of 2
##   .. ..$ mean: num [1:2, 1:6] 0 0.5 0 0 0 0 0 0 0 0 ...
##   .. ..$ sd  : num [1:2, 1:6] 1 1 1 1 1 1 1 1 1 1 ...
##   ..$ S7 :List of 2
##   .. ..$ mean: num [1:2, 1:6] 0 0.5 0 0.4 0 0.3 0 0 0 0 ...
##   .. ..$ sd  : num [1:2, 1:6] 1 1 1 1 1 1 1 1 1 1 ...
##   ..$ S8 :List of 2
##   .. ..$ mean: num [1:2, 1:6] 0 0.5 0 0.4 0 0.3 0 0 0 0 ...
##   .. ..$ sd  : num [1:2, 1:6] 1 2 1 1.5 1 1 1 0.5 1 0.5 ...
##   ..$ S9 :List of 2
##   .. ..$ mean: num [1:2, 1:6] 0 0.5 0 0.4 0 0.3 0 0 0 0 ...
##   .. ..$ sd  : num [1:2, 1:6] 1 0.5 1 1 1 1.5 1 2 1 2 ...
##   ..$ S10:List of 2
##   .. ..$ mean: num [1:2, 1:6] 0 0 0 0 0 0 0 0.3 0 0.4 ...
##   .. ..$ sd  : num [1:2, 1:6] 1 1 1 1 1 1 1 1 1 1 ...
##  $ prevalences    :List of 2
##   ..$ table1: num [1:6] 0.167 0.167 0.167 0.167 0.167 ...
##   ..$ table2: num [1:6] 0.2 0.1 0.3 0.1 0.1 0.2

The LLL.SETTINGS list contains all the scenarios described in the paper.

Table 1 Results

Scenario S0

This is the null setting.

scenario <- LLL.SETTINGS$scenarios$S0
designParameters <- list(prevalence = LLL.SETTINGS$prevalences$table1,
                       mean = scenario$mean,
                       sd = scenario$sd)
designA <- ASSISTDesign$new(trialParameters = LLL.SETTINGS$trialParameters,
                            designParameters = designParameters)
print(designA)
## Design Parameters:
## List of 4
##  $ prevalence: num [1:6] 0.167 0.167 0.167 0.167 0.167 ...
##  $ mean      : num [1:2, 1:6] 0 0 0 0 0 0 0 0 0 0 ...
##  $ sd        : num [1:2, 1:6] 1 1 1 1 1 1 1 1 1 1 ...
##  $ J         : int 6
## Trial Parameters:
## List of 5
##  $ N         : num [1:3] 300 400 500
##  $ type1Error: num 0.05
##  $ eps       : num 0.5
##  $ type2Error: num 0.2
##  $ effectSize: num 0.0642
## Boundaries:
##  Named num [1:3] -1.46 2.39 2.31
##  - attr(*, "names")= chr [1:3] "btilde" "b" "c"
## Data Generating function:
## function (prevalence = rep(1/6, 6), N, mean = matrix(0, 2, 6), 
##     sd = matrix(1, 2, 6)) 
## {
##     if (N == 0) {
##         data.frame(subGroup = integer(0), trt = integer(0), score = numeric(0))
##     }
##     else {
##         subGroup <- sample(seq_along(prevalence), N, replace = TRUE, 
##             prob = prevalence)
##         trt <- sample(c(0L, 1L), N, replace = TRUE)
##         rankin <- unlist(Map(function(i, j) rnorm(n = 1, mean = mean[i, 
##             j], sd = sd[i, j]), trt + 1, subGroup))
##         data.frame(subGroup = subGroup, trt = trt, score = rankin)
##     }
## }
## <environment: 0x7fd45d3bef78>
result <- designA$explore(numberOfSimulations = 50, showProgress = FALSE)
analysis <- designA$analyze(result)
print(designA$summary(analysis))
## P(Reject H0_ITT) = 0.040000; P(Reject H0_subgp) = 0.000000; P(Reject H0) = 0.040000
## P(Early stop for efficacy [futility]) = 0.040000 [0.480000]
## Mean [SD] Randomized N = 428.000000 [78.350338]
## 
## Stage at exit (proportion)
## 
##    1    2    3 
## 0.20 0.32 0.48 
## 
## Mean [SD] Lost N = 194.300000 [91.615490]
## Mean [SD] Analyzed N = 233.700000 [94.038258]
## 
## Chance of each subpopulation rejected
## 
##    6 
## 0.04 
## 
## Counts by futility stage and subgroup choice
##    
##      0  1  2  3  4  5
##   0  2  0  0  0  0  0
##   1  0 16  5  3  5  4
##   2  0  1  4  1  0  0
##   3  0  0  3  2  1  3
## 
## Mean loss by futility stage and subgroup
##    0        1        2   3   4        5
## 0  0       NA       NA  NA  NA       NA
## 1 NA 251.5625 201.6000 155 101 45.25000
## 2 NA 325.0000 277.2500 203  NA       NA
## 3 NA       NA 326.6667 250 179 78.33333
## 
## SD loss by futility stage and subgroup
##    0        1        2        3        4         5
## 0  0       NA       NA       NA       NA        NA
## 1 NA 7.685213 8.049845 6.557439 5.612486  4.193249
## 2 NA       NA 9.639329       NA       NA        NA
## 3 NA       NA 5.773503 2.828427       NA 10.692677
##    0        1        2        3        4         5
## 0  0       NA       NA       NA       NA        NA
## 1 NA 7.685213 8.049845 6.557439 5.612486  4.193249
## 2 NA       NA 9.639329       NA       NA        NA
## 3 NA       NA 5.773503 2.828427       NA 10.692677

Alternative Scenario S1

scenario <- LLL.SETTINGS$scenarios$S1
trueParameters <- list(prevalence = LLL.SETTINGS$prevalences$table1,
                       mean = scenario$mean,
                       sd = scenario$sd)
result <- designA$explore(numberOfSimulations = 50,
                          trueParameters = trueParameters, showProgress = FALSE)
analysis <- designA$analyze(result)
print(designA$summary(analysis))
## P(Reject H0_ITT) = 0.740000; P(Reject H0_subgp) = 0.100000; P(Reject H0) = 0.840000
## P(Early stop for efficacy [futility]) = 0.640000 [0.040000]
## Mean [SD] Randomized N = 378.000000 [91.003476]
## 
## Stage at exit (proportion)
## 
##    1    2    3 
## 0.54 0.14 0.32 
## 
## Mean [SD] Lost N = 33.940000 [68.316613]
## Mean [SD] Analyzed N = 344.060000 [83.644391]
## 
## Chance of each subpopulation rejected
## 
##    1    2    4    5    6 
## 0.02 0.02 0.02 0.04 0.74 
## 
## Counts by futility stage and subgroup choice
##    
##      0  1  2  3  4  5
##   0 37  0  0  0  0  0
##   1  0  1  1  0  0  2
##   3  0  0  0  1  3  5
## 
## Mean loss by futility stage and subgroup
##    0   1   2   3   4    5
## 0  0  NA  NA  NA  NA   NA
## 1 NA 253 195  NA  NA 41.0
## 3 NA  NA  NA 246 169 82.8
## 
## SD loss by futility stage and subgroup
##    0  1  2  3        4         5
## 0  0 NA NA NA       NA        NA
## 1 NA NA NA NA       NA 14.142136
## 3 NA NA NA NA 4.582576  6.534524
##    0  1  2  3        4         5
## 0  0 NA NA NA       NA        NA
## 1 NA NA NA NA       NA 14.142136
## 3 NA NA NA NA 4.582576  6.534524

Alternative Scenario S2

scenario <- LLL.SETTINGS$scenarios$S2
trueParameters <- list(prevalence = LLL.SETTINGS$prevalences$table1,
                       mean = scenario$mean,
                       sd = scenario$sd)
result <- designA$explore(numberOfSimulations = 50,
                          trueParameters = trueParameters, showProgress = FALSE)
analysis <- designA$analyze(result)
print(designA$summary(analysis))
## P(Reject H0_ITT) = 0.680000; P(Reject H0_subgp) = 0.180000; P(Reject H0) = 0.860000
## P(Early stop for efficacy [futility]) = 0.560000 [0.000000]
## Mean [SD] Randomized N = 404.000000 [92.493795]
## 
## Stage at exit (proportion)
## 
##    1    2    3 
## 0.40 0.16 0.44 
## 
## Mean [SD] Lost N = 51.140000 [93.683795]
## Mean [SD] Analyzed N = 352.860000 [85.513100]
## 
## Chance of each subpopulation rejected
## 
##    2    4    5    6 
## 0.04 0.02 0.12 0.68 
## 
## Counts by futility stage and subgroup choice
##    
##      0  2  3  4  5
##   0 34  0  0  0  0
##   1  0  1  0  0  0
##   3  0  3  1  2  9
## 
## Mean loss by futility stage and subgroup
##    0   2   3     4        5
## 0  0  NA  NA    NA       NA
## 1 NA 198  NA    NA       NA
## 3 NA 331 262 173.5 84.11111
## 
## SD loss by futility stage and subgroup
##    0  2  3         4        5
## 0  0 NA NA        NA       NA
## 1 NA NA NA        NA       NA
## 3 NA  7 NA 0.7071068 6.273843
##    0  2  3         4        5
## 0  0 NA NA        NA       NA
## 1 NA NA NA        NA       NA
## 3 NA  7 NA 0.7071068 6.273843

Alternative Scenario S3

scenario <- LLL.SETTINGS$scenarios$S3
trueParameters <- list(prevalence = LLL.SETTINGS$prevalences$table1,
                       mean = scenario$mean,
                       sd = scenario$sd)
result <- designA$explore(numberOfSimulations = 50,
                          trueParameters = trueParameters, showProgress = FALSE)
analysis <- designA$analyze(result)
print(designA$summary(analysis))
## P(Reject H0_ITT) = 0.040000; P(Reject H0_subgp) = 0.580000; P(Reject H0) = 0.620000
## P(Early stop for efficacy [futility]) = 0.200000 [0.040000]
## Mean [SD] Randomized N = 472.000000 [53.604752]
## 
## Stage at exit (proportion)
## 
##    1    2    3 
## 0.04 0.20 0.76 
## 
## Mean [SD] Lost N = 224.720000 [95.940041]
## Mean [SD] Analyzed N = 247.280000 [97.164292]
## 
## Chance of each subpopulation rejected
## 
##    1    2    3    4    5    6 
## 0.04 0.42 0.08 0.02 0.02 0.04 
## 
## Counts by futility stage and subgroup choice
##    
##      0  1  2  3  4  5
##   0  2  0  0  0  0  0
##   1  0  2 10  2  2  1
##   2  0  0  5  0  1  0
##   3  0  1 12  6  3  3
## 
## Mean loss by futility stage and subgroup
##    0     1        2        3   4        5
## 0  0    NA       NA       NA  NA       NA
## 1 NA 249.5 201.0000 153.5000 109 56.00000
## 2 NA    NA 264.4000       NA 128       NA
## 3 NA 413.0 336.3333 248.6667 168 83.66667
## 
## SD loss by futility stage and subgroup
##    0        1        2        3        4        5
## 0  0       NA       NA       NA       NA       NA
## 1 NA 3.535534 6.128259 16.26346 1.414214       NA
## 2 NA       NA 9.208692       NA       NA       NA
## 3 NA       NA 7.923880 14.50057 5.291503 6.027714
##    0        1        2        3        4        5
## 0  0       NA       NA       NA       NA       NA
## 1 NA 3.535534 6.128259 16.26346 1.414214       NA
## 2 NA       NA 9.208692       NA       NA       NA
## 3 NA       NA 7.923880 14.50057 5.291503 6.027714

Alternative Scenario S4

scenario <- LLL.SETTINGS$scenarios$S4
trueParameters <- list(prevalence = LLL.SETTINGS$prevalences$table1,
                       mean = scenario$mean,
                       sd = scenario$sd)
result <- designA$explore(numberOfSimulations = 50,
                          trueParameters = trueParameters, showProgress = FALSE)
analysis <- designA$analyze(result)
print(designA$summary(analysis))
## P(Reject H0_ITT) = 0.120000; P(Reject H0_subgp) = 0.060000; P(Reject H0) = 0.180000
## P(Early stop for efficacy [futility]) = 0.080000 [0.180000]
## Mean [SD] Randomized N = 464.000000 [66.270934]
## 
## Stage at exit (proportion)
## 
##    1    2    3 
## 0.10 0.16 0.74 
## 
## Mean [SD] Lost N = 122.300000 [75.176866]
## Mean [SD] Analyzed N = 341.700000 [85.074577]
## 
## Chance of each subpopulation rejected
## 
##    3    4    6 
## 0.02 0.04 0.12 
## 
## Counts by futility stage and subgroup choice
##    
##      0  1  2  3  4  5
##   0  6  0  0  0  0  0
##   1  0  2  0  4  7  3
##   2  0  0  1  0  3  4
##   3  0  0  0  4 10  6
## 
## Mean loss by futility stage and subgroup
##    0     1   2      3         4        5
## 0  0    NA  NA     NA        NA       NA
## 1 NA 252.5  NA 149.50  98.42857 59.33333
## 2 NA    NA 262     NA 128.33333 66.50000
## 3 NA    NA  NA 249.75 173.10000 83.66667
## 
## SD loss by futility stage and subgroup
##    0        1  2        3         4         5
## 0  0       NA NA       NA        NA        NA
## 1 NA 7.778175 NA 7.047458  6.629659  6.658328
## 2 NA       NA NA       NA 11.718931 10.878113
## 3 NA       NA NA 9.069179 10.082438  7.312090
##    0        1  2        3         4         5
## 0  0       NA NA       NA        NA        NA
## 1 NA 7.778175 NA 7.047458  6.629659  6.658328
## 2 NA       NA NA       NA 11.718931 10.878113
## 3 NA       NA NA 9.069179 10.082438  7.312090

Alternative Scenario S5

scenario <- LLL.SETTINGS$scenarios$S5
trueParameters <- list(prevalence = LLL.SETTINGS$prevalences$table1,
                       mean = scenario$mean,
                       sd = scenario$sd)
result <- designA$explore(numberOfSimulations = 50,
                          trueParameters = trueParameters, showProgress = FALSE)
analysis <- designA$analyze(result)
print(designA$summary(analysis))
## P(Reject H0_ITT) = 0.240000; P(Reject H0_subgp) = 0.700000; P(Reject H0) = 0.940000
## P(Early stop for efficacy [futility]) = 0.420000 [0.000000]
## Mean [SD] Randomized N = 440.000000 [78.246080]
## 
## Stage at exit (proportion)
## 
##    1    2    3 
## 0.18 0.24 0.58 
## 
## Mean [SD] Lost N = 235.380000 [154.285171]
## Mean [SD] Analyzed N = 204.620000 [148.262851]
## 
## Chance of each subpopulation rejected
## 
##    1    2    4    6 
## 0.58 0.10 0.02 0.24 
## 
## Counts by futility stage and subgroup choice
##    
##      0  1  2  3  4
##   0 12  0  0  0  0
##   1  0 13  2  0  1
##   2  0  3  1  0  1
##   3  0 13  3  1  0
## 
## Mean loss by futility stage and subgroup
##    0        1     2   3   4
## 0  0       NA    NA  NA  NA
## 1 NA 250.7692 201.5  NA 100
## 2 NA 333.6667 263.0  NA 130
## 3 NA 412.0769 335.0 250  NA
## 
## SD loss by futility stage and subgroup
##    0        1         2  3  4
## 0  0       NA        NA NA NA
## 1 NA 4.710871 0.7071068 NA NA
## 2 NA 2.516611        NA NA NA
## 3 NA 8.025600 6.0827625 NA NA
##    0        1         2  3  4
## 0  0       NA        NA NA NA
## 1 NA 4.710871 0.7071068 NA NA
## 2 NA 2.516611        NA NA NA
## 3 NA 8.025600 6.0827625 NA NA

Alternative Scenario S6

scenario <- LLL.SETTINGS$scenarios$S6
trueParameters <- list(prevalence = LLL.SETTINGS$prevalences$table1,
                       mean = scenario$mean,
                       sd = scenario$sd)
result <- designA$explore(numberOfSimulations = 50,
                          trueParameters = trueParameters, showProgress = FALSE)
analysis <- designA$analyze(result)
print(designA$summary(analysis))
## P(Reject H0_ITT) = 0.120000; P(Reject H0_subgp) = 0.640000; P(Reject H0) = 0.760000
## P(Early stop for efficacy [futility]) = 0.400000 [0.060000]
## Mean [SD] Randomized N = 438.000000 [75.295337]
## 
## Stage at exit (proportion)
## 
##    1    2    3 
## 0.16 0.30 0.54 
## 
## Mean [SD] Lost N = 261.200000 [129.838675]
## Mean [SD] Analyzed N = 176.800000 [98.540989]
## 
## Chance of each subpopulation rejected
## 
##    1    2    3    6 
## 0.56 0.06 0.02 0.12 
## 
## Counts by futility stage and subgroup choice
##    
##      0  1  2  3  4  5
##   0  6  0  0  0  0  0
##   1  0 14  3  1  1  0
##   2  0  4  1  1  0  0
##   3  0 13  3  2  0  1
## 
## Mean loss by futility stage and subgroup
##    0        1        2   3   4  5
## 0  0       NA       NA  NA  NA NA
## 1 NA 250.2143 197.6667 138 100 NA
## 2 NA 332.0000 271.0000 188  NA NA
## 3 NA 411.6154 324.6667 260  NA 94
## 
## SD loss by futility stage and subgroup
##    0        1        2        3  4  5
## 0  0       NA       NA       NA NA NA
## 1 NA 5.885818 12.09683       NA NA NA
## 2 NA 6.683313       NA       NA NA NA
## 3 NA 6.801207 17.47379 4.242641 NA NA
##    0        1        2        3  4  5
## 0  0       NA       NA       NA NA NA
## 1 NA 5.885818 12.09683       NA NA NA
## 2 NA 6.683313       NA       NA NA NA
## 3 NA 6.801207 17.47379 4.242641 NA NA

Alternative Scenario S7

scenario <- LLL.SETTINGS$scenarios$S7
trueParameters <- list(prevalence = LLL.SETTINGS$prevalences$table1,
                       mean = scenario$mean,
                       sd = scenario$sd)
result <- designA$explore(numberOfSimulations = 50,
                          trueParameters = trueParameters, showProgress = FALSE)
analysis <- designA$analyze(result)
print(designA$summary(analysis))
## P(Reject H0_ITT) = 0.520000; P(Reject H0_subgp) = 0.440000; P(Reject H0) = 0.960000
## P(Early stop for efficacy [futility]) = 0.560000 [0.000000]
## Mean [SD] Randomized N = 414.000000 [85.738092]
## 
## Stage at exit (proportion)
## 
##    1    2    3 
## 0.30 0.26 0.44 
## 
## Mean [SD] Lost N = 112.460000 [126.492431]
## Mean [SD] Analyzed N = 301.540000 [94.530032]
## 
## Chance of each subpopulation rejected
## 
##    1    2    3    4    6 
## 0.02 0.14 0.24 0.04 0.52 
## 
## Counts by futility stage and subgroup choice
##    
##      0  1  2  3  4  5
##   0 26  0  0  0  0  0
##   1  0  1  2  4  0  0
##   2  0  0  1  1  0  0
##   3  0  0  4  8  2  1
## 
## Mean loss by futility stage and subgroup
##    0   1      2       3   4  5
## 0  0  NA     NA      NA  NA NA
## 1 NA 257 203.50 160.000  NA NA
## 2 NA  NA 271.00 202.000  NA NA
## 3 NA  NA 328.25 262.625 171 90
## 
## SD loss by futility stage and subgroup
##    0  1         2         3        4  5
## 0  0 NA        NA        NA       NA NA
## 1 NA NA  7.778175  4.966555       NA NA
## 2 NA NA        NA        NA       NA NA
## 3 NA NA 12.971122 10.689614 8.485281 NA
##    0  1         2         3        4  5
## 0  0 NA        NA        NA       NA NA
## 1 NA NA  7.778175  4.966555       NA NA
## 2 NA NA        NA        NA       NA NA
## 3 NA NA 12.971122 10.689614 8.485281 NA

Alternative Scenario S8

scenario <- LLL.SETTINGS$scenarios$S8
trueParameters <- list(prevalence = LLL.SETTINGS$prevalences$table1,
                       mean = scenario$mean,
                       sd = scenario$sd)
result <- designA$explore(numberOfSimulations = 50,
                          trueParameters = trueParameters, showProgress = FALSE)
analysis <- designA$analyze(result)
print(designA$summary(analysis))
## P(Reject H0_ITT) = 0.400000; P(Reject H0_subgp) = 0.320000; P(Reject H0) = 0.720000
## P(Early stop for efficacy [futility]) = 0.360000 [0.000000]
## Mean [SD] Randomized N = 450.000000 [73.540215]
## 
## Stage at exit (proportion)
## 
##    1    2    3 
## 0.14 0.22 0.64 
## 
## Mean [SD] Lost N = 149.840000 [140.310786]
## Mean [SD] Analyzed N = 300.160000 [116.642548]
## 
## Chance of each subpopulation rejected
## 
##    1    2    3    4    6 
## 0.06 0.08 0.14 0.04 0.40 
## 
## Counts by futility stage and subgroup choice
##    
##      0  1  2  3  4  5
##   0 20  0  0  0  0  0
##   1  0  2  1  1  2  0
##   2  0  0  1  1  0  0
##   3  0  3  4 11  3  1
## 
## Mean loss by futility stage and subgroup
##    0        1     2        3        4  5
## 0  0       NA    NA       NA       NA NA
## 1 NA 249.0000 198.0 148.0000 109.0000 NA
## 2 NA       NA 285.0 208.0000       NA NA
## 3 NA 413.6667 332.5 253.9091 164.6667 79
## 
## SD loss by futility stage and subgroup
##    0         1        2        3        4  5
## 0  0        NA       NA       NA       NA NA
## 1 NA  1.414214       NA       NA 11.31371 NA
## 2 NA        NA       NA       NA       NA NA
## 3 NA 12.096832 7.141428 8.251722 12.50333 NA
##    0         1        2        3        4  5
## 0  0        NA       NA       NA       NA NA
## 1 NA  1.414214       NA       NA 11.31371 NA
## 2 NA        NA       NA       NA       NA NA
## 3 NA 12.096832 7.141428 8.251722 12.50333 NA

Alternative Scenario S9

scenario <- LLL.SETTINGS$scenarios$S9
trueParameters <- list(prevalence = LLL.SETTINGS$prevalences$table1,
                       mean = scenario$mean,
                       sd = scenario$sd)
result <- designA$explore(numberOfSimulations = 50,
                          trueParameters = trueParameters, showProgress = FALSE)
analysis <- designA$analyze(result)
print(designA$summary(analysis))
## P(Reject H0_ITT) = 0.380000; P(Reject H0_subgp) = 0.540000; P(Reject H0) = 0.920000
## P(Early stop for efficacy [futility]) = 0.440000 [0.000000]
## Mean [SD] Randomized N = 428.000000 [88.155706]
## 
## Stage at exit (proportion)
## 
##    1    2    3 
## 0.28 0.16 0.56 
## 
## Mean [SD] Lost N = 180.840000 [161.409652]
## Mean [SD] Analyzed N = 247.160000 [127.419660]
## 
## Chance of each subpopulation rejected
## 
##    1    2    3    5    6 
## 0.16 0.22 0.14 0.02 0.38 
## 
## Counts by futility stage and subgroup choice
##    
##      0  1  2  3  5
##   0 19  0  0  0  0
##   1  0  3  1  2  0
##   2  0  0  1  2  0
##   3  0  6 10  4  2
## 
## Mean loss by futility stage and subgroup
##    0        1     2     3  5
## 0  0       NA    NA    NA NA
## 1 NA 254.3333 198.0 156.5 NA
## 2 NA       NA 273.0 214.0 NA
## 3 NA 416.6667 339.5 252.5 81
## 
## SD loss by futility stage and subgroup
##    0        1        2         3        5
## 0  0       NA       NA        NA       NA
## 1 NA 6.429101       NA 12.020815       NA
## 2 NA       NA       NA  0.000000       NA
## 3 NA 6.772493 6.786424  4.203173 7.071068
##    0        1        2         3        5
## 0  0       NA       NA        NA       NA
## 1 NA 6.429101       NA 12.020815       NA
## 2 NA       NA       NA  0.000000       NA
## 3 NA 6.772493 6.786424  4.203173 7.071068

Alternative Scenario S10

scenario <- LLL.SETTINGS$scenarios$S10
trueParameters <- list(prevalence = LLL.SETTINGS$prevalences$table1,
                       mean = scenario$mean,
                       sd = scenario$sd)
result <- designA$explore(numberOfSimulations = 50,
                          trueParameters = trueParameters, showProgress = FALSE)
analysis <- designA$analyze(result)
print(designA$summary(analysis))
## P(Reject H0_ITT) = 0.540000; P(Reject H0_subgp) = 0.000000; P(Reject H0) = 0.540000
## P(Early stop for efficacy [futility]) = 0.440000 [0.140000]
## Mean [SD] Randomized N = 400.000000 [92.582010]
## 
## Stage at exit (proportion)
## 
##    1    2    3 
## 0.42 0.16 0.42 
## 
## Mean [SD] Lost N = 75.140000 [120.881796]
## Mean [SD] Analyzed N = 324.860000 [116.619740]
## 
## Chance of each subpopulation rejected
## 
##    6 
## 0.54 
## 
## Counts by futility stage and subgroup choice
##    
##      0  1  2  3  4  5
##   0 27  0  0  0  0  0
##   1  0  2  1  0  1  3
##   3  0  4  0  1  0 11
## 
## Mean loss by futility stage and subgroup
##    0      1   2   3   4        5
## 0  0     NA  NA  NA  NA       NA
## 1 NA 246.50 198  NA 114 48.66667
## 3 NA 411.25  NA 252  NA 82.63636
## 
## SD loss by futility stage and subgroup
##    0        1  2  3  4        5
## 0  0       NA NA NA NA       NA
## 1 NA  2.12132 NA NA NA 15.69501
## 3 NA 10.87428 NA NA NA 12.24968
##    0        1  2  3  4        5
## 0  0       NA NA NA NA       NA
## 1 NA  2.12132 NA NA NA 15.69501
## 3 NA 10.87428 NA NA NA 12.24968

Table 2 Results

Scenario S0

scenario <- LLL.SETTINGS$scenarios$S0
designParameters <- list(prevalence = LLL.SETTINGS$prevalences$table2,
                       mean = scenario$mean,
                       sd = scenario$sd)
designA <- ASSISTDesign$new(trialParameters = LLL.SETTINGS$trialParameters,
                            designParameters = designParameters)
print(designA)
## Design Parameters:
## List of 4
##  $ prevalence: num [1:6] 0.2 0.1 0.3 0.1 0.1 0.2
##  $ mean      : num [1:2, 1:6] 0 0 0 0 0 0 0 0 0 0 ...
##  $ sd        : num [1:2, 1:6] 1 1 1 1 1 1 1 1 1 1 ...
##  $ J         : int 6
## Trial Parameters:
## List of 5
##  $ N         : num [1:3] 300 400 500
##  $ type1Error: num 0.05
##  $ eps       : num 0.5
##  $ type2Error: num 0.2
##  $ effectSize: num 0.0642
## Boundaries:
##  Named num [1:3] -1.46 2.37 2.28
##  - attr(*, "names")= chr [1:3] "btilde" "b" "c"
## Data Generating function:
## function (prevalence = rep(1/6, 6), N, mean = matrix(0, 2, 6), 
##     sd = matrix(1, 2, 6)) 
## {
##     if (N == 0) {
##         data.frame(subGroup = integer(0), trt = integer(0), score = numeric(0))
##     }
##     else {
##         subGroup <- sample(seq_along(prevalence), N, replace = TRUE, 
##             prob = prevalence)
##         trt <- sample(c(0L, 1L), N, replace = TRUE)
##         rankin <- unlist(Map(function(i, j) rnorm(n = 1, mean = mean[i, 
##             j], sd = sd[i, j]), trt + 1, subGroup))
##         data.frame(subGroup = subGroup, trt = trt, score = rankin)
##     }
## }
## <environment: 0x7fd45e031698>
result <- designA$explore(numberOfSimulations = 50, showProgress = FALSE)
analysis <- designA$analyze(result)
print(designA$summary(analysis))
## P(Reject H0_ITT) = 0.000000; P(Reject H0_subgp) = 0.060000; P(Reject H0) = 0.060000
## P(Early stop for efficacy [futility]) = 0.060000 [0.400000]
## Mean [SD] Randomized N = 440.000000 [72.843136]
## 
## Stage at exit (proportion)
## 
##    1    2    3 
## 0.14 0.32 0.54 
## 
## Mean [SD] Lost N = 210.980000 [93.765337]
## Mean [SD] Analyzed N = 229.020000 [102.968688]
## 
## Chance of each subpopulation rejected
## 
##    1    2 
## 0.04 0.02 
## 
## Counts by futility stage and subgroup choice
##    
##      1  2  3  4  5
##   1 14  9  2  3  3
##   2  2  2  3  1  1
##   3  4  2  1  0  3
## 
## Mean loss by futility stage and subgroup
##          1        2        3         4        5
## 1 236.7143 209.5556 121.0000  83.66667 59.00000
## 2 325.0000 277.0000 161.3333 140.00000 88.00000
## 3 402.7500 342.5000 183.0000        NA 94.66667
## 
## SD loss by futility stage and subgroup
##           1         2         3       4        5
## 1  8.099654  5.246692  4.242641 4.50925 1.732051
## 2 15.556349  1.414214 13.868429      NA       NA
## 3  6.946222 12.020815        NA      NA 1.527525
##           1         2         3       4        5
## 1  8.099654  5.246692  4.242641 4.50925 1.732051
## 2 15.556349  1.414214 13.868429      NA       NA
## 3  6.946222 12.020815        NA      NA 1.527525

Alternative Scenario S1

scenario <- LLL.SETTINGS$scenarios$S1
trueParameters <- list(prevalence = LLL.SETTINGS$prevalences$table2,
                       mean = scenario$mean,
                       sd = scenario$sd)
result <- designA$explore(numberOfSimulations = 50, trueParameters = trueParameters,
                          showProgress = FALSE)
analysis <- designA$analyze(result)
print(designA$summary(analysis))
## P(Reject H0_ITT) = 0.880000; P(Reject H0_subgp) = 0.020000; P(Reject H0) = 0.900000
## P(Early stop for efficacy [futility]) = 0.720000 [0.020000]
## Mean [SD] Randomized N = 370.000000 [86.307471]
## 
## Stage at exit (proportion)
## 
##    1    2    3 
## 0.56 0.18 0.26 
## 
## Mean [SD] Lost N = 21.720000 [71.888530]
## Mean [SD] Analyzed N = 348.280000 [85.889117]
## 
## Chance of each subpopulation rejected
## 
##    5    6 
## 0.02 0.88 
## 
## Counts by futility stage and subgroup choice
##    
##      0  1  3  5
##   0 44  0  0  0
##   1  0  1  0  1
##   3  0  1  1  2
## 
## Mean loss by futility stage and subgroup
##    0   1   3    5
## 0  0  NA  NA   NA
## 1 NA 244  NA 64.0
## 3 NA 399 190 94.5
## 
## SD loss by futility stage and subgroup
##    0  1  3        5
## 0  0 NA NA       NA
## 1 NA NA NA       NA
## 3 NA NA NA 4.949747
##    0  1  3        5
## 0  0 NA NA       NA
## 1 NA NA NA       NA
## 3 NA NA NA 4.949747

Alternative Scenario S2

scenario <- LLL.SETTINGS$scenarios$S2
trueParameters <- list(prevalence = LLL.SETTINGS$prevalences$table2,
                       mean = scenario$mean,
                       sd = scenario$sd)
result <- designA$explore(numberOfSimulations = 50, trueParameters = trueParameters,
                          showProgress = FALSE)
analysis <- designA$analyze(result)
print(designA$summary(analysis))
## P(Reject H0_ITT) = 0.700000; P(Reject H0_subgp) = 0.180000; P(Reject H0) = 0.880000
## P(Early stop for efficacy [futility]) = 0.500000 [0.000000]
## Mean [SD] Randomized N = 412.000000 [93.982195]
## 
## Stage at exit (proportion)
## 
##    1    2    3 
## 0.38 0.12 0.50 
## 
## Mean [SD] Lost N = 45.820000 [84.837826]
## Mean [SD] Analyzed N = 366.180000 [95.368178]
## 
## Chance of each subpopulation rejected
## 
##    1    2    4    5    6 
## 0.02 0.02 0.06 0.08 0.70 
## 
## Counts by futility stage and subgroup choice
##    
##      0  1  2  3  4  5
##   0 35  0  0  0  0  0
##   1  0  1  0  0  1  0
##   2  0  0  1  0  0  0
##   3  0  1  0  1  3  7
## 
## Mean loss by futility stage and subgroup
##    0   1   2   3        4        5
## 0  0  NA  NA  NA       NA       NA
## 1 NA 235  NA  NA  82.0000       NA
## 2 NA  NA 279  NA       NA       NA
## 3 NA 390  NA 185 146.3333 97.28571
## 
## SD loss by futility stage and subgroup
##    0  1  2  3        4        5
## 0  0 NA NA NA       NA       NA
## 1 NA NA NA NA       NA       NA
## 2 NA NA NA NA       NA       NA
## 3 NA NA NA NA 10.78579 11.61485
##    0  1  2  3        4        5
## 0  0 NA NA NA       NA       NA
## 1 NA NA NA NA       NA       NA
## 2 NA NA NA NA       NA       NA
## 3 NA NA NA NA 10.78579 11.61485

Alternative Scenario S3

scenario <- LLL.SETTINGS$scenarios$S3
trueParameters <- list(prevalence = LLL.SETTINGS$prevalences$table2,
                       mean = scenario$mean,
                       sd = scenario$sd)
result <- designA$explore(numberOfSimulations = 50, trueParameters = trueParameters,
                          showProgress = FALSE)
analysis <- designA$analyze(result)
print(designA$summary(analysis))
## P(Reject H0_ITT) = 0.060000; P(Reject H0_subgp) = 0.560000; P(Reject H0) = 0.620000
## P(Early stop for efficacy [futility]) = 0.340000 [0.060000]
## Mean [SD] Randomized N = 452.000000 [64.649763]
## 
## Stage at exit (proportion)
## 
##    1    2    3 
## 0.08 0.32 0.60 
## 
## Mean [SD] Lost N = 213.040000 [99.616809]
## Mean [SD] Analyzed N = 238.960000 [109.326316]
## 
## Chance of each subpopulation rejected
## 
##    1    2    3    4    5    6 
## 0.14 0.34 0.04 0.02 0.02 0.06 
## 
## Counts by futility stage and subgroup choice
##    
##      0  1  2  3  4  5
##   0  3  0  0  0  0  0
##   1  0  4 16  1  2  2
##   2  0  2  3  0  0  1
##   3  0  3  4  6  2  1
## 
## Mean loss by futility stage and subgroup
##    0      1        2   3     4   5
## 0  0     NA       NA  NA    NA  NA
## 1 NA 235.75 211.3125 123  98.0  61
## 2 NA 316.50 291.0000  NA    NA  85
## 3 NA 407.00 354.5000 202 166.5 112
## 
## SD loss by futility stage and subgroup
##    0         1         2        3        4        5
## 0  0        NA        NA       NA       NA       NA
## 1 NA  5.560276  8.631097       NA 0.000000 1.414214
## 2 NA 13.435029 14.000000       NA       NA       NA
## 3 NA  7.549834  7.937254 12.91511 6.363961       NA
##    0         1         2        3        4        5
## 0  0        NA        NA       NA       NA       NA
## 1 NA  5.560276  8.631097       NA 0.000000 1.414214
## 2 NA 13.435029 14.000000       NA       NA       NA
## 3 NA  7.549834  7.937254 12.91511 6.363961       NA

Alternative Scenario S4

scenario <- LLL.SETTINGS$scenarios$S4
trueParameters <- list(prevalence = LLL.SETTINGS$prevalences$table2,
                       mean = scenario$mean,
                       sd = scenario$sd)
result <- designA$explore(numberOfSimulations = 50, trueParameters = trueParameters,
                          showProgress = FALSE)
analysis <- designA$analyze(result)
print(designA$summary(analysis))
## P(Reject H0_ITT) = 0.100000; P(Reject H0_subgp) = 0.200000; P(Reject H0) = 0.300000
## P(Early stop for efficacy [futility]) = 0.120000 [0.200000]
## Mean [SD] Randomized N = 456.000000 [70.450446]
## 
## Stage at exit (proportion)
## 
##    1    2    3 
## 0.12 0.20 0.68 
## 
## Mean [SD] Lost N = 125.700000 [75.198038]
## Mean [SD] Analyzed N = 330.300000 [69.693571]
## 
## Chance of each subpopulation rejected
## 
##    1    2    3    4    5    6 
## 0.02 0.02 0.06 0.04 0.06 0.10 
## 
## Counts by futility stage and subgroup choice
##    
##      0  1  2  3  4  5
##   0  5  0  0  0  0  0
##   1  0  2  0  3  6  4
##   2  0  0  0  4  5  0
##   3  0  1  1  3 10  6
## 
## Mean loss by futility stage and subgroup
##    0   1   2        3         4      5
## 0  0  NA  NA       NA        NA     NA
## 1 NA 235  NA 122.3333  89.66667  59.75
## 2 NA  NA  NA 153.2500 117.00000     NA
## 3 NA 385 344 206.0000 149.60000 105.00
## 
## SD loss by futility stage and subgroup
##    0        1  2        3        4        5
## 0  0       NA NA       NA       NA       NA
## 1 NA 1.414214 NA 1.527525 12.17648 7.632169
## 2 NA       NA NA 7.932003 10.95445       NA
## 3 NA       NA NA 8.185353 11.42317 5.138093
##    0        1  2        3        4        5
## 0  0       NA NA       NA       NA       NA
## 1 NA 1.414214 NA 1.527525 12.17648 7.632169
## 2 NA       NA NA 7.932003 10.95445       NA
## 3 NA       NA NA 8.185353 11.42317 5.138093

Alternative Scenario S5

scenario <- LLL.SETTINGS$scenarios$S5
trueParameters <- list(prevalence = LLL.SETTINGS$prevalences$table2,
                       mean = scenario$mean,
                       sd = scenario$sd)
result <- designA$explore(numberOfSimulations = 50, trueParameters = trueParameters,
                          showProgress = FALSE)
analysis <- designA$analyze(result)
print(designA$summary(analysis))
## P(Reject H0_ITT) = 0.180000; P(Reject H0_subgp) = 0.760000; P(Reject H0) = 0.940000
## P(Early stop for efficacy [futility]) = 0.440000 [0.000000]
## Mean [SD] Randomized N = 438.000000 [77.958649]
## 
## Stage at exit (proportion)
## 
##    1    2    3 
## 0.18 0.26 0.56 
## 
## Mean [SD] Lost N = 264.200000 [145.644801]
## Mean [SD] Analyzed N = 173.800000 [117.296763]
## 
## Chance of each subpopulation rejected
## 
##    1    2    3    6 
## 0.64 0.10 0.02 0.18 
## 
## Counts by futility stage and subgroup choice
##    
##      0  1  2  3  5
##   0  9  0  0  0  0
##   1  0 12  2  0  0
##   2  0  3  0  0  0
##   3  0 18  4  1  1
## 
## Mean loss by futility stage and subgroup
##    0        1      2   3  5
## 0  0       NA     NA  NA NA
## 1 NA 243.6667 211.50  NA NA
## 2 NA 322.3333     NA  NA NA
## 3 NA 398.7222 353.25 210 96
## 
## SD loss by futility stage and subgroup
##    0        1         2  3  5
## 0  0       NA        NA NA NA
## 1 NA 6.169328 10.606602 NA NA
## 2 NA 7.371115        NA NA NA
## 3 NA 7.759666  5.678908 NA NA
##    0        1         2  3  5
## 0  0       NA        NA NA NA
## 1 NA 6.169328 10.606602 NA NA
## 2 NA 7.371115        NA NA NA
## 3 NA 7.759666  5.678908 NA NA

Alternative Scenario S6

scenario <- LLL.SETTINGS$scenarios$S6
trueParameters <- list(prevalence = LLL.SETTINGS$prevalences$table2,
                       mean = scenario$mean,
                       sd = scenario$sd)
result <- designA$explore(numberOfSimulations = 50, trueParameters = trueParameters,
                          showProgress = FALSE)
analysis <- designA$analyze(result)
print(designA$summary(analysis))
## P(Reject H0_ITT) = 0.100000; P(Reject H0_subgp) = 0.700000; P(Reject H0) = 0.800000
## P(Early stop for efficacy [futility]) = 0.360000 [0.000000]
## Mean [SD] Randomized N = 458.000000 [60.911445]
## 
## Stage at exit (proportion)
## 
##    1    2    3 
## 0.06 0.30 0.64 
## 
## Mean [SD] Lost N = 257.000000 [123.352821]
## Mean [SD] Analyzed N = 201.000000 [127.133226]
## 
## Chance of each subpopulation rejected
## 
##    1    2    3    6 
## 0.50 0.16 0.04 0.10 
## 
## Counts by futility stage and subgroup choice
##    
##      0  1  2  3  4  5
##   0  5  0  0  0  0  0
##   1  0 10  4  0  1  0
##   2  0  6  2  0  0  0
##   3  0 11  5  3  0  3
## 
## Mean loss by futility stage and subgroup
##    0        1     2        3  4        5
## 0  0       NA    NA       NA NA       NA
## 1 NA 241.2000 211.5       NA 99       NA
## 2 NA 320.5000 283.5       NA NA       NA
## 3 NA 397.3636 352.0 193.3333 NA 97.33333
## 
## SD loss by futility stage and subgroup
##    0         1         2        3  4        5
## 0  0        NA        NA       NA NA       NA
## 1 NA  6.232531  9.000000       NA NA       NA
## 2 NA  5.612486  4.949747       NA NA       NA
## 3 NA 11.775166 11.768602 13.57694 NA 14.57166
##    0         1         2        3  4        5
## 0  0        NA        NA       NA NA       NA
## 1 NA  6.232531  9.000000       NA NA       NA
## 2 NA  5.612486  4.949747       NA NA       NA
## 3 NA 11.775166 11.768602 13.57694 NA 14.57166

Alternative Scenario S7

scenario <- LLL.SETTINGS$scenarios$S7
trueParameters <- list(prevalence = LLL.SETTINGS$prevalences$table2,
                       mean = scenario$mean,
                       sd = scenario$sd)
result <- designA$explore(numberOfSimulations = 50, trueParameters = trueParameters,
                          showProgress = FALSE)
analysis <- designA$analyze(result)
print(designA$summary(analysis))
## P(Reject H0_ITT) = 0.640000; P(Reject H0_subgp) = 0.320000; P(Reject H0) = 0.960000
## P(Early stop for efficacy [futility]) = 0.540000 [0.000000]
## Mean [SD] Randomized N = 414.000000 [88.086229]
## 
## Stage at exit (proportion)
## 
##    1    2    3 
## 0.32 0.22 0.46 
## 
## Mean [SD] Lost N = 84.740000 [123.778243]
## Mean [SD] Analyzed N = 329.260000 [114.318533]
## 
## Chance of each subpopulation rejected
## 
##    1    2    3    4    6 
## 0.08 0.04 0.18 0.02 0.64 
## 
## Counts by futility stage and subgroup choice
##    
##      0  1  2  3  4
##   0 32  0  0  0  0
##   1  0  3  0  1  0
##   2  0  0  0  1  0
##   3  0  2  2  8  1
## 
## Mean loss by futility stage and subgroup
##    0   1     2       3   4
## 0  0  NA    NA      NA  NA
## 1 NA 242    NA 109.000  NA
## 2 NA  NA    NA 157.000  NA
## 3 NA 391 346.5 201.875 155
## 
## SD loss by futility stage and subgroup
##    0         1        2        3  4
## 0  0        NA       NA       NA NA
## 1 NA  6.244998       NA       NA NA
## 2 NA        NA       NA       NA NA
## 3 NA 11.313708 4.949747 14.05538 NA
##    0         1        2        3  4
## 0  0        NA       NA       NA NA
## 1 NA  6.244998       NA       NA NA
## 2 NA        NA       NA       NA NA
## 3 NA 11.313708 4.949747 14.05538 NA

Alternative Scenario S8

scenario <- LLL.SETTINGS$scenarios$S8
trueParameters <- list(prevalence = LLL.SETTINGS$prevalences$table2,
                       mean = scenario$mean,
                       sd = scenario$sd)
result <- designA$explore(numberOfSimulations = 50, trueParameters = trueParameters,
                          showProgress = FALSE)
analysis <- designA$analyze(result)
print(designA$summary(analysis))
## P(Reject H0_ITT) = 0.440000; P(Reject H0_subgp) = 0.360000; P(Reject H0) = 0.800000
## P(Early stop for efficacy [futility]) = 0.420000 [0.020000]
## Mean [SD] Randomized N = 432.000000 [84.370417]
## 
## Stage at exit (proportion)
## 
##    1    2    3 
## 0.24 0.20 0.56 
## 
## Mean [SD] Lost N = 104.300000 [114.934276]
## Mean [SD] Analyzed N = 327.700000 [95.751006]
## 
## Chance of each subpopulation rejected
## 
##    1    2    3    4    5    6 
## 0.04 0.08 0.18 0.04 0.02 0.44 
## 
## Counts by futility stage and subgroup choice
##    
##      0  1  2  3  4  5
##   0 22  0  0  0  0  0
##   1  0  1  2  3  0  3
##   2  0  0  2  1  0  0
##   3  0  1  2  8  2  3
## 
## Mean loss by futility stage and subgroup
##    0   1   2   3   4         5
## 0  0  NA  NA  NA  NA        NA
## 1 NA 245 212 120  NA  56.66667
## 2 NA  NA 285 165  NA        NA
## 3 NA 407 350 199 140 100.66667
## 
## SD loss by futility stage and subgroup
##    0  1         2       3        4        5
## 0  0 NA        NA      NA       NA       NA
## 1 NA NA  1.414214 16.0000       NA 7.023769
## 2 NA NA  4.242641      NA       NA       NA
## 3 NA NA 11.313708 10.5695 11.31371 5.507571
##    0  1         2       3        4        5
## 0  0 NA        NA      NA       NA       NA
## 1 NA NA  1.414214 16.0000       NA 7.023769
## 2 NA NA  4.242641      NA       NA       NA
## 3 NA NA 11.313708 10.5695 11.31371 5.507571

Alternative Scenario S9

scenario <- LLL.SETTINGS$scenarios$S9
trueParameters <- list(prevalence = LLL.SETTINGS$prevalences$table2,
                       mean = scenario$mean,
                       sd = scenario$sd)
result <- designA$explore(numberOfSimulations = 50, trueParameters = trueParameters,
                          showProgress = FALSE)
analysis <- designA$analyze(result)
print(designA$summary(analysis))
## P(Reject H0_ITT) = 0.640000; P(Reject H0_subgp) = 0.340000; P(Reject H0) = 0.980000
## P(Early stop for efficacy [futility]) = 0.540000 [0.000000]
## Mean [SD] Randomized N = 412.000000 [89.533941]
## 
## Stage at exit (proportion)
## 
##    1    2    3 
## 0.34 0.20 0.46 
## 
## Mean [SD] Lost N = 107.080000 [153.440122]
## Mean [SD] Analyzed N = 304.920000 [115.418111]
## 
## Chance of each subpopulation rejected
## 
##    1    2    3    6 
## 0.12 0.12 0.10 0.64 
## 
## Counts by futility stage and subgroup choice
##    
##      0  1  2  3  5
##   0 32  0  0  0  0
##   1  0  1  0  0  0
##   2  0  1  0  0  0
##   3  0  4  6  5  1
## 
## Mean loss by futility stage and subgroup
##    0   1   2     3   5
## 0  0  NA  NA    NA  NA
## 1 NA 243  NA    NA  NA
## 2 NA 315  NA    NA  NA
## 3 NA 399 343 206.4 110
## 
## SD loss by futility stage and subgroup
##    0       1        2        3  5
## 0  0      NA       NA       NA NA
## 1 NA      NA       NA       NA NA
## 2 NA      NA       NA       NA NA
## 3 NA 11.5181 8.809086 4.827007 NA
##    0       1        2        3  5
## 0  0      NA       NA       NA NA
## 1 NA      NA       NA       NA NA
## 2 NA      NA       NA       NA NA
## 3 NA 11.5181 8.809086 4.827007 NA

Alternative Scenario S10

scenario <- LLL.SETTINGS$scenarios$S10
trueParameters <- list(prevalence = LLL.SETTINGS$prevalences$table2,
                       mean = scenario$mean,
                       sd = scenario$sd)
result <- designA$explore(numberOfSimulations = 50, trueParameters = trueParameters,
                          showProgress = FALSE)
analysis <- designA$analyze(result)
print(designA$summary(analysis))
## P(Reject H0_ITT) = 0.340000; P(Reject H0_subgp) = 0.000000; P(Reject H0) = 0.340000
## P(Early stop for efficacy [futility]) = 0.180000 [0.120000]
## Mean [SD] Randomized N = 460.000000 [67.005939]
## 
## Stage at exit (proportion)
## 
##   1   2   3 
## 0.1 0.2 0.7 
## 
## Mean [SD] Lost N = 121.720000 [130.210354]
## Mean [SD] Analyzed N = 338.280000 [127.607664]
## 
## Chance of each subpopulation rejected
## 
##    6 
## 0.34 
## 
## Counts by futility stage and subgroup choice
##    
##      0  1  2  3  4  5
##   0 17  0  0  0  0  0
##   1  0  4  0  0  0  0
##   2  0  0  0  0  1  1
##   3  0  5  2  1  2 17
## 
## Mean loss by futility stage and subgroup
##    0     1   2   3   4        5
## 0  0    NA  NA  NA  NA       NA
## 1 NA 240.0  NA  NA  NA       NA
## 2 NA    NA  NA  NA 123 87.00000
## 3 NA 403.8 349 211 153 98.94118
## 
## SD loss by futility stage and subgroup
##    0         1        2  3        4        5
## 0  0        NA       NA NA       NA       NA
## 1 NA  3.741657       NA NA       NA       NA
## 2 NA        NA       NA NA       NA       NA
## 3 NA 13.065221 5.656854 NA 7.071068 8.034851
##    0         1        2  3        4        5
## 0  0        NA       NA NA       NA       NA
## 1 NA  3.741657       NA NA       NA       NA
## 2 NA        NA       NA NA       NA       NA
## 3 NA 13.065221 5.656854 NA 7.071068 8.034851