rpact: Confirmatory Adaptive Clinical Trial Design and Analysis

Summary

This R Markdown document provides many different examples that illustrate the usage of so-called R generic functions (short: R generics) with rpact, e.g., as.data.frame or summary.

1 Working with objects

First, load the rpact package

library(rpact)
packageVersion("rpact") # version should be version 2.0.5 or later
## [1] '2.0.5'

1.1 Create an example of all available rpact objects

design <- getDesignGroupSequential(alpha = 0.05, kMax = 4, 
    sided = 1, typeOfDesign = "WT", deltaWT = 0.1)

designFisher <- getDesignFisher(kMax = 4, alpha = 0.025, 
    informationRates = c(0.2, 0.5, 0.8, 1), alpha0Vec = rep(0.4, 3))

designCharacteristics <- getDesignCharacteristics(design)

powerAndASN <- getPowerAndAverageSampleNumber(design, theta = 1, nMax = 100)

designSet <- getDesignSet(design = design, deltaWT = c(0.3, 0.4))

dataset <- getDataset(
    n1 = c(22, 11, 22, 11),
    n2 = c(22, 13, 22, 13),
    means1 = c(1, 1.1, 1, 1),
    means2 = c(1.4, 1.5, 3, 2.5),
    stDevs1 = c(1, 2, 2, 1.3),
    stDevs2 = c(1, 2, 2, 1.3)
)

stageResults <- getStageResults(design, dataset)

analysisResults <- getAnalysisResults(design, dataset)
## Warning: Observed sample sizes not according to specified information rates
## in group sequential design. Test procedure might not control Type I error
## rate.
## [PROGRESS] Stage results calculated [0.02 secs] 
## [PROGRESS] Conditional power calculated [0 secs] 
## [PROGRESS] Conditional rejection probabilities (CRP) calculated [0.001 secs] 
## [PROGRESS] Repeated confidence interval of stage 1 calculated [0.2622 secs] 
## [PROGRESS] Repeated confidence interval of stage 2 calculated [0.2793 secs] 
## [PROGRESS] Repeated confidence interval of stage 3 calculated [0.2853 secs] 
## [PROGRESS] Repeated confidence interval of stage 4 calculated [0.3083 secs] 
## [PROGRESS] Repeated confidence interval calculated [1.136 secs] 
## [PROGRESS] Overall repeated p-values of stage 1 calculated [0.2277 secs] 
## [PROGRESS] Overall repeated p-values of stage 2 calculated [0.2362 secs] 
## [PROGRESS] Overall repeated p-values of stage 3 calculated [0.2262 secs] 
## [PROGRESS] Overall repeated p-values of stage 4 calculated [0.2353 secs] 
## [PROGRESS] Repeated p-values calculated [0.9254 secs] 
## [PROGRESS] Final p-value calculated [0.001 secs] 
## [PROGRESS] Final confidence interval calculated [0.0571 secs]
designPlan <- getSampleSizeMeans(design)

simulationResults <- getSimulationSurvival(design, 
    maxNumberOfSubjects = 100, plannedEvents = c(50, 100, 150, 200), seed = 12345)

piecewiseSurvivalTime <- getPiecewiseSurvivalTime(list(
    "0 - <6"   = 0.025, 
    "6 - <9"   = 0.04, 
    "9 - <15"  = 0.015, 
    "15 - <21" = 0.01, 
    ">=21"     = 0.007), hazardRatio = 0.8)

accrualTime <- getAccrualTime(list(
    "0  - <12" = 15,
    "12 - <13" = 21,
    "13 - <14" = 27,
    "14 - <15" = 33,
    "15 - <16" = 39,
    ">=16"     = 45), maxNumberOfSubjects = 1400)

2 How to use R generic functions with rpact objects

2.1 Get field names of the object

names(design)
##  [1] "kMax"                  "alpha"                
##  [3] "stages"                "informationRates"     
##  [5] "userAlphaSpending"     "criticalValues"       
##  [7] "stageLevels"           "alphaSpent"           
##  [9] "bindingFutility"       "tolerance"            
## [11] "typeOfDesign"          "beta"                 
## [13] "deltaWT"               "futilityBounds"       
## [15] "gammaA"                "gammaB"               
## [17] "optimizationCriterion" "sided"                
## [19] "betaSpent"             "typeBetaSpending"     
## [21] "userBetaSpending"      "power"                
## [23] "twoSidedPower"         "constantBoundsHP"
names(designFisher)
##  [1] "kMax"                     "alpha"                   
##  [3] "stages"                   "informationRates"        
##  [5] "userAlphaSpending"        "criticalValues"          
##  [7] "stageLevels"              "alphaSpent"              
##  [9] "bindingFutility"          "tolerance"               
## [11] "method"                   "alpha0Vec"               
## [13] "scale"                    "nonStochasticCurtailment"
## [15] "sided"                    "simAlpha"                
## [17] "iterations"               "seed"
names(designCharacteristics)
##  [1] "nFixed"                 "shift"                 
##  [3] "inflationFactor"        "stages"                
##  [5] "information"            "power"                 
##  [7] "rejectionProbabilities" "futilityProbabilities" 
##  [9] "averageSampleNumber1"   "averageSampleNumber01" 
## [11] "averageSampleNumber0"
names(powerAndASN)
##  [1] "nMax"                "theta"               "averageSampleNumber"
##  [4] "calculatedPower"     "overallEarlyStop"    "earlyStop"          
##  [7] "overallReject"       "rejectPerStage"      "overallFutility"    
## [10] "futilityPerStage"
names(designSet)
## [1] "designs"          "variedParameters"
names(dataset)
## [1] "stages"             "groups"             "sampleSizes"       
## [4] "means"              "stDevs"             "overallSampleSizes"
## [7] "overallMeans"       "overallStDevs"
names(stageResults)
##  [1] "stages"                "overallTestStatistics"
##  [3] "overallPValues"        "overallMeans1"        
##  [5] "overallMeans2"         "overallStDevs1"       
##  [7] "overallStDevs2"        "overallSampleSizes1"  
##  [9] "overallSampleSizes2"   "testStatistics"       
## [11] "pValues"               "effectSizes"          
## [13] "thetaH0"               "direction"            
## [15] "normalApproximation"   "equalVariances"
names(analysisResults)
##  [1] "stages"                               
##  [2] "informationRates"                     
##  [3] "criticalValues"                       
##  [4] "futilityBounds"                       
##  [5] "alphaSpent"                           
##  [6] "stageLevels"                          
##  [7] "effectSizes"                          
##  [8] "testStatistics"                       
##  [9] "pValues"                              
## [10] "testActions"                          
## [11] "thetaH0"                              
## [12] "thetaH1"                              
## [13] "assumedStDev"                         
## [14] "conditionalRejectionProbabilities"    
## [15] "nPlanned"                             
## [16] "allocationRatioPlanned"               
## [17] "pi1"                                  
## [18] "pi2"                                  
## [19] "conditionalPower"                     
## [20] "repeatedConfidenceIntervalLowerBounds"
## [21] "repeatedConfidenceIntervalUpperBounds"
## [22] "repeatedPValues"                      
## [23] "finalStage"                           
## [24] "finalPValues"                         
## [25] "finalConfidenceIntervalLowerBounds"   
## [26] "finalConfidenceIntervalUpperBounds"   
## [27] "medianUnbiasedEstimates"              
## [28] "normalApproximation"                  
## [29] "equalVariances"                       
## [30] "directionUpper"                       
## [31] "overallTestStatistics"                
## [32] "overallPValues"
names(designPlan)
##  [1] "normalApproximation"            "meanRatio"                     
##  [3] "thetaH0"                        "alternative"                   
##  [5] "stDev"                          "groups"                        
##  [7] "allocationRatioPlanned"         "optimumAllocationRatio"        
##  [9] "directionUpper"                 "nFixed"                        
## [11] "nFixed1"                        "nFixed2"                       
## [13] "informationRates"               "maxNumberOfSubjects"           
## [15] "maxNumberOfSubjects1"           "maxNumberOfSubjects2"          
## [17] "numberOfSubjects"               "numberOfSubjects1"             
## [19] "numberOfSubjects2"              "expectedNumberOfSubjectsH0"    
## [21] "expectedNumberOfSubjectsH01"    "expectedNumberOfSubjectsH1"    
## [23] "effect"                         "expectedNumberOfSubjects"      
## [25] "rejectPerStage"                 "overallReject"                 
## [27] "futilityPerStage"               "futilityStop"                  
## [29] "earlyStop"                      "criticalValuesEffectScale"     
## [31] "criticalValuesEffectScaleLower" "criticalValuesEffectScaleUpper"
## [33] "criticalValuesPValueScale"      "futilityBoundsEffectScale"     
## [35] "futilityBoundsPValueScale"
names(simulationResults)
##  [1] "maxNumberOfSubjects"       "accrualTime"              
##  [3] "accrualIntensity"          "plannedEvents"            
##  [5] "pi1"                       "pi2"                      
##  [7] "median1"                   "median2"                  
##  [9] "allocationRatioPlanned"    "directionUpper"           
## [11] "dropoutRate1"              "dropoutRate2"             
## [13] "dropoutTime"               "eventTime"                
## [15] "thetaH0"                   "allocation1"              
## [17] "allocation2"               "minNumberOfEventsPerStage"
## [19] "maxNumberOfEventsPerStage" "conditionalPower"         
## [21] "thetaH1"                   "maxNumberOfIterations"    
## [23] "kappa"                     "piecewiseSurvivalTime"    
## [25] "lambda1"                   "lambda2"                  
## [27] "hazardRatio"               "iterations"               
## [29] "analysisTime"              "studyDuration"            
## [31] "eventsPerStage"            "expectedNumberOfEvents"   
## [33] "eventsNotAchieved"         "numberOfSubjects"         
## [35] "numberOfSubjects1"         "numberOfSubjects2"        
## [37] "expectedNumberOfSubjects"  "rejectPerStage"           
## [39] "overallReject"             "futilityPerStage"         
## [41] "futilityStop"              "earlyStop"                
## [43] "conditionalPowerAchieved"  "seed"
names(piecewiseSurvivalTime)
##  [1] "piecewiseSurvivalTime"    "lambda1"                 
##  [3] "lambda2"                  "hazardRatio"             
##  [5] "pi1"                      "pi2"                     
##  [7] "median1"                  "median2"                 
##  [9] "eventTime"                "kappa"                   
## [11] "piecewiseSurvivalEnabled" "delayedResponseAllowed"  
## [13] "delayedResponseEnabled"
names(accrualTime)
##  [1] "endOfAccrualIsUserDefined"                 
##  [2] "followUpTimeMustBeUserDefined"             
##  [3] "maxNumberOfSubjectsIsUserDefined"          
##  [4] "maxNumberOfSubjectsCanBeCalculatedDirectly"
##  [5] "absoluteAccrualIntensityEnabled"           
##  [6] "accrualTime"                               
##  [7] "accrualIntensity"                          
##  [8] "accrualIntensityRelative"                  
##  [9] "maxNumberOfSubjects"                       
## [10] "remainingTime"                             
## [11] "piecewiseAccrualEnabled"

2.1.1 Access data of a field

design$criticalValues
## [1] 3.069028 2.325888 1.977663 1.762694
design[["criticalValues"]]
## [1] 3.069028 2.325888 1.977663 1.762694

2.3 Show a summary of the object

summary(design)
## Sequential analysis with a maximum of 4 looks (group sequential design)
## 
## Stage                                    1       2       3       4  
## Information rate                       25%     50%     75%    100%  
## Efficacy boundary (z-value scale)    3.069   2.326   1.978   1.763  
## Cumulative alpha spent              0.0011  0.0105  0.0282  0.0500  
## One-sided local significance level  0.0011  0.0100  0.0240  0.0390
summary(designFisher)
## Sequential analysis with a maximum of 4 looks (Fisher design)
## 
## Stage                                            1       2       3       4  
## Information rate                               20%     50%     80%    100%  
## Efficacy boundary (p product scale)          0.014  <0.001  <0.001  <0.001  
## Futility boundary (separate p-value scale)   0.400   0.400   0.400  
## Cumulative alpha spent                      0.0137  0.0206  0.0237  0.0250  
## One-sided local significance level          0.0137  0.0137  0.0137  0.0137
summary(designCharacteristics)
## This output summarizes the group sequential design characteristics specification.
## 
## Group sequential design characteristics:
##   Number of subjects fixed                     : 6.2 
##   Shift                                        : 6.4822 
##   Inflation factor                             : 1.0485 
##   Informations                                 : 1.6205, 3.2411, 4.8616, 6.4822 
##   Power                                        : 0.03625, 0.30265, 0.60337, 0.80000 
##   Rejection probabilities                      : 0.03625, 0.26640, 0.30072, 0.19663 
##   Futility probabilities                       : 0, 0, 0 
##   Ratio expected vs fixed sample size under H1 : 0.8015 
##   Ratio expected vs fixed sample size under a value between H0 and H1 : 0.9724 
##   Ratio expected vs fixed sample size under H0 : 1.0380 
## 
## 
## Technical summary of the design characteristics object of class "TrialDesignCharacteristics":
##   [g] Number of subjects fixed                 : 6.2 
##   [g] Shift                                    : 6.4822 
##   [g] Inflation factor                         : 1.0485 
##   [u] Stages                                   : 1, 2, 3, 4 
##   [g] Informations                             : 1.6205, 3.2411, 4.8616, 6.4822 
##   [g] Power                                    : 0.03625, 0.30265, 0.60337, 0.80000 
##   [g] Rejection probabilities                  : 0.03625, 0.26640, 0.30072, 0.19663 
##   [g] Futility probabilities                   : 0, 0, 0 
##   [g] Ratio expected vs fixed sample size under H1 : 0.8015 
##   [g] Ratio expected vs fixed sample size under a value between H0 and H1 : 0.9724 
##   [g] Ratio expected vs fixed sample size under H0 : 1.0380 
## 
## Legend:
##   u: user defined
##   >: derived value
##   d: default value
##   g: generated/calculated value
##   .: not applicable or hidden
## 
## Group sequential design characteristics table:
##           information      power rejectionProbabilities
##   Stage 1    1.620541 0.03624538             0.03624538
##   Stage 2    3.241081 0.30264612             0.26640074
##   Stage 3    4.861622 0.60337036             0.30072424
##   Stage 4    6.482163 0.80000000             0.19662964
##           futilityProbabilities
##   Stage 1    0.0000000009865876
##   Stage 2    0.0000000009758407
##   Stage 3    0.0000000009359906
##   Stage 4                    NA
summary(powerAndASN)
## This output summarizes the power and average sample size (ASN) specification.
## 
## Power and average sample size (ASN):
## 
## User defined parameters:
##   Effect                                       : 1 
## 
## Default parameters:
##   N_max                                        : 100 
## 
## Output:
##   Average sample sizes (ASN)                   : 25.7 
##   Power                                        : 1.0000 
##   Overall Early stop                           : 1 
##   Early stop [1]                               : 0.97325673 
##   Early stop [2]                               : 0.02674225 
##   Early stop [3]                               : 0.00000103 
##   Early stop [4]                               : NA 
##   Overall reject                               : 1 
##   Reject per stage [1]                         : 0.97325673 
##   Reject per stage [2]                         : 0.02674225 
##   Reject per stage [3]                         : 0.00000102 
##   Reject per stage [4]                         : 0.00000000 
##   Overall futility                             : 0 
##   Futility stop per stage [1]                  : 0 
##   Futility stop per stage [2]                  : 0 
##   Futility stop per stage [3]                  : 0 
## 
## Legend:
##   [k]: values at stage k
## 
## 
## Technical summary of the power and average sample size (ASN) object:
##   [d] N_max                                    : 100 
##   [u] Effect                                   : 1 
##   [g] Average sample sizes (ASN)               : 25.7 
##   [g] Power                                    : 1.0000 
##   [g] Overall Early stop                       : 1 
##   [g] Early stop [1]                           : 0.97325673 
##   [g] Early stop [2]                           : 0.02674225 
##   [g] Early stop [3]                           : 0.00000103 
##   [g] Early stop [4]                           : NA 
##   [g] Overall reject                           : 1 
##   [g] Reject per stage [1]                     : 0.97325673 
##   [g] Reject per stage [2]                     : 0.02674225 
##   [g] Reject per stage [3]                     : 0.00000102 
##   [g] Reject per stage [4]                     : 0.00000000 
##   [g] Overall futility                         : 0 
##   [g] Futility stop per stage [1]              : 0 
##   [g] Futility stop per stage [2]              : 0 
##   [g] Futility stop per stage [3]              : 0 
## 
## Legend:
##   u: user defined
##   >: derived value
##   d: default value
##   g: generated/calculated value
##   .: not applicable or hidden
## 
## Power and average sample size (ASN) table:
##      stages      earlyStop rejectPerStage   futilityPerStage
## [1,]      1 0.973256727989 0.973256727002 0.0000000009865876
## [2,]      2 0.026742246997 0.026742246022 0.0000000009755040
## [3,]      3 0.000001025014 0.000001024395 0.0000000006188329
## [4,]      4             NA 0.000000000000                 NA
summary(designSet)
##         Length          Class           Mode 
##              3 TrialDesignSet             S4
summary(dataset)
## This output summarizes the dataset of means specification.
## 
## Dataset of means:
##   Stages                                       : 1, 1, 2, 2, 3, 3, 4, 4 
##   Treatment groups                             : 1, 2, 1, 2, 1, 2, 1, 2 
##   Sample sizes                                 : 22, 22, 11, 13, 22, 22, 11, 13 
##   Means                                        : 1.0, 1.4, 1.1, 1.5, 1.0, 3.0, 1.0, 2.5 
##   Standard deviations                          : 1.0, 1.0, 2.0, 2.0, 2.0, 2.0, 1.3, 1.3 
## 
## Calculated data:
##   Overall sample sizes                         : 22, 22, 33, 35, 55, 57, 66, 70 
##   Overall means                                : 1.000, 1.400, 1.033, 1.437, 1.020, 2.040, 1.017, 2.126 
##   Overall standard deviations                  : 1.000, 1.000, 1.381, 1.425, 1.639, 1.823, 1.579, 1.739 
## 
## 
## Technical summary of the dataset object of class"DatasetMeans":
##   [u] Stages                                   : 1, 1, 2, 2, 3, 3, 4, 4 
##   [u] Treatment groups                         : 1, 2, 1, 2, 1, 2, 1, 2 
##   [u] Sample sizes                             : 22, 22, 11, 13, 22, 22, 11, 13 
##   [u] Means                                    : 1.0, 1.4, 1.1, 1.5, 1.0, 3.0, 1.0, 2.5 
##   [u] Standard deviations                      : 1.0, 1.0, 2.0, 2.0, 2.0, 2.0, 1.3, 1.3 
##   [g] Overall sample sizes                     : 22, 22, 33, 35, 55, 57, 66, 70 
##   [g] Overall means                            : 1.000, 1.400, 1.033, 1.437, 1.020, 2.040, 1.017, 2.126 
##   [g] Overall standard deviations              : 1.000, 1.000, 1.381, 1.425, 1.639, 1.823, 1.579, 1.739 
## 
## Legend:
##   u: user defined
##   >: derived value
##   d: default value
##   g: generated/calculated value
##   .: not applicable or hidden
## 
## Dataset of means table:
##           groups sampleSizes means stDevs overallSampleSizes overallMeans
##   Stage 1      1          22   1.0    1.0                 22     1.000000
##   Stage 2      2          22   1.4    1.0                 22     1.400000
##   Stage 3      1          11   1.1    2.0                 33     1.033333
##   Stage 4      2          13   1.5    2.0                 35     1.437143
##   Stage 5      1          22   1.0    2.0                 55     1.020000
##   Stage 6      2          22   3.0    2.0                 57     2.040351
##   Stage 7      1          11   1.0    1.3                 66     1.016667
##   Stage 8      2          13   2.5    1.3                 70     2.125714
##           overallStDevs
##   Stage 1      1.000000
##   Stage 2      1.000000
##   Stage 3      1.381500
##   Stage 4      1.425418
##   Stage 5      1.639151
##   Stage 6      1.822857
##   Stage 7      1.578664
##   Stage 8      1.738706
summary(stageResults)
## This output summarizes the stage results of means specification.
## 
## Stage results of means:
## 
## User defined parameters:
##   Stages                                       : 1, 2, 3, 4 
## 
## Default parameters:
##   Theta H0                                     : 0 
##   Direction                                    : upper 
##   Normal approximation                         : FALSE 
##   Equal variances                              : TRUE 
## 
## Output:
##   Overall test statistics                      : -1.327, -1.185, -3.111, -3.887 
##   Overall p-values                             : 0.9041, 0.8799, 0.9988, 0.9999 
##   Overall means (1)                            : 1.000, 1.033, 1.020, 1.017 
##   Overall means (2)                            : 1.400, 1.437, 2.040, 2.126 
##   Overall standard deviations (1)              : 1.000, 1.381, 1.639, 1.579 
##   Overall standard deviations (2)              : 1.000, 1.425, 1.823, 1.739 
##   Overall sample sizes (1)                     : 22, 33, 55, 66 
##   Overall sample sizes (2)                     : 22, 35, 57, 70 
##   Test statistics                              : -1.327, -0.488, -3.317, -2.817 
##   p-values                                     : 0.9041, 0.6849, 0.9991, 0.9950 
##   Effect sizes                                 : -0.4000, -0.4038, -1.0204, -1.1090 
## 
## 
## Technical summary of the stage results object of class "StageResultsMeans":
## 
##   [u] Stages                                   : 1, 2, 3, 4 
##   [g] Overall test statistics                  : -1.327, -1.185, -3.111, -3.887 
##   [g] Overall p-values                         : 0.9041, 0.8799, 0.9988, 0.9999 
##   [g] Overall means (1)                        : 1.000, 1.033, 1.020, 1.017 
##   [g] Overall means (2)                        : 1.400, 1.437, 2.040, 2.126 
##   [g] Overall standard deviations (1)          : 1.000, 1.381, 1.639, 1.579 
##   [g] Overall standard deviations (2)          : 1.000, 1.425, 1.823, 1.739 
##   [g] Overall sample sizes (1)                 : 22, 33, 55, 66 
##   [g] Overall sample sizes (2)                 : 22, 35, 57, 70 
##   [g] Test statistics                          : -1.327, -0.488, -3.317, -2.817 
##   [g] p-values                                 : 0.9041, 0.6849, 0.9991, 0.9950 
##   [g] Effect sizes                             : -0.4000, -0.4038, -1.0204, -1.1090 
##   [d] Theta H0                                 : 0 
##   [d] Direction                                : upper 
##   [d] Normal approximation                     : FALSE 
##   [d] Equal variances                          : TRUE 
##   [.] Weights Fisher                           : 1.000, 1.000, 1.000, 1.000 
##   [.] Weights inverse normal                   : 0.500, 0.500, 0.500, 0.500 
##   [.] Inverse normal combination               : -1.305, -1.263, -2.826, -3.734 
##   [.] Fisher combination                       : 0.9041, 0.6192, 0.6186, 0.6155 
##   [?] Overall means                            :  
##   [?] Overall standard deviations              : 1.000, 1.404, 1.735, 1.663 
##   [?] Overall sample sizes                     :  
## 
## Legend:
##   u: user defined
##   >: derived value
##   d: default value
##   g: generated/calculated value
##   .: not applicable or hidden
## 
## Stage results of means table:
##           overallTestStatistics overallPValues overallMeans1 overallMeans2
##   Stage 1             -1.326650      0.9041035      1.000000      1.400000
##   Stage 2             -1.185099      0.8798860      1.033333      1.437143
##   Stage 3             -3.111238      0.9988132      1.020000      2.040351
##   Stage 4             -3.886959      0.9999205      1.016667      2.125714
##           overallStDevs1 overallStDevs2 overallSampleSizes1
##   Stage 1       1.000000       1.000000                  22
##   Stage 2       1.381500       1.425418                  33
##   Stage 3       1.639151       1.822857                  55
##   Stage 4       1.578664       1.738706                  66
##           overallSampleSizes2 testStatistics   pValues effectSizes
##   Stage 1                  22      -1.326650 0.9041035  -0.4000000
##   Stage 2                  35      -0.488194 0.6848785  -0.4038095
##   Stage 3                  57      -3.316625 0.9990567  -1.0203509
##   Stage 4                  70      -2.816504 0.9949743  -1.1090476
summary(analysisResults)
## This output summarizes the analysis results (group sequential design) specification.
## 
## Analysis results (group sequential design):
##   Stages                                       : 1, 2, 3, 4 
##   Information rates                            : 0.250, 0.500, 0.750, 1.000 
##   Critical values                              : 3.069, 2.326, 1.978, 1.763 
##   Futility bounds (non-binding)                : -Inf, -Inf, -Inf 
##   Cumulative alpha spending                    : 0.001074, 0.010527, 0.028206, 0.050000 
##   Stage levels                                 : 0.001074, 0.010012, 0.023983, 0.038976 
##   Effect sizes                                 : -0.4000, -0.4038, -1.0204, -1.1090 
##   Test statistics                              : -1.327, -0.488, -3.317, -2.817 
##   p-values                                     : 0.9041, 0.6849, 0.9991, 0.9950 
##   Overall test statistics                      : -1.327, -1.185, -3.111, -3.887 
##   Overall p-values                             : 0.9041, 0.8799, 0.9988, 0.9999 
##   Actions                                      : continue, continue, continue, accept 
##   Theta H0                                     : 0 
##   Cond. rejection probability                  : 0.0028100911698034636, 0.0001226755584807782, 0.0000000000000006661, NA 
##   Planned sample size                          : NA, NA, NA, NA 
##   Planned allocation ratio                     : 1 
##   Assumed effect                               : -1.109 
##   Assumed standard deviation                   : 1.663 
##   Conditional power                            : NA, NA, NA, NA 
##   RCIs (lower)                                 : -1.386, -1.216, -1.676, -1.616 
##   RCIs (upper)                                 : 0.5861, 0.4084, -0.3644, -0.6022 
##   Repeated p-values                            : >0.5, >0.5, >0.5, >0.5 
##   Final stage                                  : 4 
##   Final p-value                                : NA, NA, NA, 0.9999 
##   Final CIs (lower)                            : NA, NA, NA, -1.547 
##   Final CIs (upper)                            : NA, NA, NA, -0.6082 
##   Median unbiased estimate                     : NA, NA, NA, -1.078 
## 
## 
## Technical summary of the analysis results object of class "AnalysisResultsGroupSequential":
##   [u] Stages                                   : 1, 2, 3, 4 
##   [?] Information rates                        : 0.250, 0.500, 0.750, 1.000 
##   [?] Critical values                          : 3.069, 2.326, 1.978, 1.763 
##   [?] Futility bounds (non-binding)            : -Inf, -Inf, -Inf 
##   [?] Cumulative alpha spending                : 0.001074, 0.010527, 0.028206, 0.050000 
##   [?] Stage levels                             : 0.001074, 0.010012, 0.023983, 0.038976 
##   [?] Effect sizes                             : -0.4000, -0.4038, -1.0204, -1.1090 
##   [?] Test statistics                          : -1.327, -0.488, -3.317, -2.817 
##   [?] p-values                                 : 0.9041, 0.6849, 0.9991, 0.9950 
##   [?] Overall test statistics                  : -1.327, -1.185, -3.111, -3.887 
##   [?] Overall p-values                         : 0.9041, 0.8799, 0.9988, 0.9999 
##   [?] Actions                                  : continue, continue, continue, accept 
##   [?] Theta H0                                 : 0 
##   [?] Cond. rejection probability              : 0.0028100911698034636, 0.0001226755584807782, 0.0000000000000006661, NA 
##   [?] Planned sample size                      : NA, NA, NA, NA 
##   [?] Planned allocation ratio                 : 1 
##   [?] Assumed effect                           : -1.109 
##   [?] Assumed standard deviation               : 1.663 
##   [?] Conditional power                        : NA, NA, NA, NA 
##   [?] RCIs (lower)                             : -1.386, -1.216, -1.676, -1.616 
##   [?] RCIs (upper)                             : 0.5861, 0.4084, -0.3644, -0.6022 
##   [?] Repeated p-values                        : >0.5, >0.5, >0.5, >0.5 
##   [?] Final stage                              : 4 
##   [?] Final p-value                            : NA, NA, NA, 0.9999 
##   [?] Final CIs (lower)                        : NA, NA, NA, -1.547 
##   [?] Final CIs (upper)                        : NA, NA, NA, -0.6082 
##   [?] Median unbiased estimate                 : NA, NA, NA, -1.078 
##   [?] pi (1)                                   :  
##   [?] pi (2)                                   :  
##   [?] Normal approximation                     : FALSE 
##   [?] Equal variances                          : TRUE 
##   [?] Direction upper                          : TRUE 
## 
## Legend:
##   u: user defined
##   >: derived value
##   d: default value
##   g: generated/calculated value
##   .: not applicable or hidden
## 
## Analysis results (group sequential design) table:
##           informationRates criticalValues futilityBounds alphaSpent 
##   Stage 1 0.25             3.069028       -Inf           0.001073781
##   Stage 2 0.50             2.325888       -Inf           0.010526914
##   Stage 3 0.75             1.977663       -Inf           0.028205994
##   Stage 4 1.00             1.762694       <NA>           0.050000000
##           stageLevels effectSizes testStatistics pValues  
##   Stage 1 0.001073781 -0.4000000  -1.326650      0.9041035
##   Stage 2 0.010012250 -0.4038095  -0.488194      0.6848785
##   Stage 3 0.023983344 -1.0203509  -3.316625      0.9990567
##   Stage 4 0.038976069 -1.1090476  -2.816504      0.9949743
##           overallTestStatistics overallPValues testActions
##   Stage 1 -1.326650             0.9041035      continue   
##   Stage 2 -1.185099             0.8798860      continue   
##   Stage 3 -3.111238             0.9988132      continue   
##   Stage 4 -3.886959             0.9999205      accept     
##           conditionalRejectionProbabilities
##   Stage 1 0.0028100911698034636288         
##   Stage 2 0.0001226755584807781574         
##   Stage 3 0.0000000000000006661338         
##   Stage 4 <NA>                             
##           repeatedConfidenceIntervalLowerBounds
##   Stage 1 -1.386144                            
##   Stage 2 -1.216028                            
##   Stage 3 -1.676258                            
##   Stage 4 -1.615872                            
##           repeatedConfidenceIntervalUpperBounds repeatedPValues
##   Stage 1  0.5861439                            0.499999       
##   Stage 2  0.4084087                            0.499999       
##   Stage 3 -0.3644440                            0.499999       
##   Stage 4 -0.6022231                            0.499999       
##           finalPValues finalConfidenceIntervalLowerBounds
##   Stage 1 <NA>         <NA>                              
##   Stage 2 <NA>         <NA>                              
##   Stage 3 <NA>         <NA>                              
##   Stage 4 0.9999205    -1.546886                         
##           finalConfidenceIntervalUpperBounds medianUnbiasedEstimates
##   Stage 1 <NA>                               <NA>                   
##   Stage 2 <NA>                               <NA>                   
##   Stage 3 <NA>                               <NA>                   
##   Stage 4 -0.608249                          -1.077568
summary(designPlan)
## Sample size calculation for a continuous endpoint
## 
## Sequential analysis with a maximum of 4 looks (group sequential design).
## The sample size was calculated for a two-sample t-test (one-sided),
## alternative as specified, standard deviation = 1, allocation ratio = 1, and power 80%.
## 
## Stage                                          1       2       3       4  
## Information rate                             25%     50%     75%    100%  
## Efficacy boundary (z-value scale)          3.069   2.326   1.978   1.763  
## Number of subjects, alt. = 0.2               163     325     488     650  
## Number of subjects, alt. = 0.4                41      82     123     164  
## Number of subjects, alt. = 0.6                19      37      56      74  
## Number of subjects, alt. = 0.8                11      22      32      43  
## Number of subjects, alt. = 1                   7      14      21      28  
## Cumulative alpha spent                    0.0011  0.0105  0.0282  0.0500  
## Cumulative power                          0.0362  0.3026  0.6034  0.8000  
## One-sided local significance level        0.0011  0.0100  0.0240  0.0390  
## Efficacy boundary (t), alt. = 0.2          0.482   0.258   0.179   0.138  
## Efficacy boundary (t), alt. = 0.4          0.960   0.515   0.357   0.276  
## Efficacy boundary (t), alt. = 0.6          1.432   0.767   0.533   0.411  
## Efficacy boundary (t), alt. = 0.8          1.894   1.015   0.705   0.544  
## Efficacy boundary (t), alt. = 1            2.342   1.255   0.871   0.673  
## Exit probability for efficacy (under H0)  0.0011  0.0095  0.0177  
## Exit probability for efficacy (under H1)  0.0362  0.2664  0.3007  
## 
## Legend:
##   alt.: alternative
##   (t): approximate treatment effect scale
summary(simulationResults)
## Simulation of a survival endpoint
## 
## Sequential analysis with a maximum of 4 looks (group sequential design).
## The results were simulated for a two-sample logrank test (one-sided),
## treatment pi (1) as specified, control pi (2) = 0.2, allocation ratio = 1.
## 
## Stage                                           1       2       3       4  
## Information rate                              25%     50%     75%    100%  
## Efficacy boundary (z-value scale)           3.069   2.326   1.978   1.763  
## Number of subjects, pi (1) = 0.2              100      NA      NA      NA  
## Number of subjects, pi (1) = 0.3              100      NA      NA      NA  
## Number of subjects, pi (1) = 0.4              100      NA      NA      NA  
## Number of subjects, pi (1) = 0.5              100      NA      NA      NA  
## Cumulative number of events, pi (1) = 0.2    50.0      NA      NA      NA  
## Cumulative number of events, pi (1) = 0.3    50.0      NA      NA      NA  
## Cumulative number of events, pi (1) = 0.4    50.0      NA      NA      NA  
## Cumulative number of events, pi (1) = 0.5    50.0      NA      NA      NA  
## Analysis time, pi (1) = 0.2                  43.2      NA      NA      NA  
## Analysis time, pi (1) = 0.3                  35.4      NA      NA      NA  
## Analysis time, pi (1) = 0.4                  30.1      NA      NA      NA  
## Analysis time, pi (1) = 0.5                  26.3      NA      NA      NA  
## Simulated cumulative power, pi (1) = 0.2   0.0020  0.0020  0.0020  0.0020  
## Simulated cumulative power, pi (1) = 0.3   0.0740  0.0740  0.0740  0.0740  
## Simulated cumulative power, pi (1) = 0.4   0.4040  0.4040  0.4040  0.4040  
## Simulated cumulative power, pi (1) = 0.5   0.7870  0.7870  0.7870  0.7870  
## 
## Legend:
##   (1): values of treatment arm 1
summary(piecewiseSurvivalTime)
## This output summarizes the piecewise survival time specification.
## 
## Piecewise exponential survival times:
##    0 - < 6: 0.025
##    6 - < 9: 0.040
##    9 - <15: 0.015
##   15 - <21: 0.010
##       >=21: 0.007
## 
## Details:
## 
## User defined parameters:
##   Piecewise survival times                     : 0.00, 6.00, 9.00, 15.00, 21.00 
##   lambda (2)                                   : 0.025, 0.040, 0.015, 0.010, 0.007 
##   Hazard ratio                                 : 0.800 
## 
## Default parameters:
##   kappa                                        : 1 
##   Delayed response allowed                     : FALSE 
## 
## Generated parameters:
##   lambda (1)                                   : 0.0200, 0.0320, 0.0120, 0.0080, 0.0056 
##   Piecewise exponential survival enabled       : TRUE 
## 
## 
## Technical summary of the piecewise survival time object of class"PiecewiseSurvivalTime":
## 
##   [u] Piecewise survival times                 : 0.00, 6.00, 9.00, 15.00, 21.00 
##   [g] lambda (1)                               : 0.0200, 0.0320, 0.0120, 0.0080, 0.0056 
##   [u] lambda (2)                               : 0.025, 0.040, 0.015, 0.010, 0.007 
##   [u] Hazard ratio                             : 0.800 
##   [.] pi (1)                                   : NA 
##   [.] pi (2)                                   : NA 
##   [.] median (1)                               : NA 
##   [.] median (2)                               : NA 
##   [.] Event time                               : 12 
##   [d] kappa                                    : 1 
##   [g] Piecewise exponential survival enabled   : TRUE 
##   [d] Delayed response allowed                 : FALSE 
##   [.] Delayed response enabled                 : FALSE 
## 
## Legend:
##   u: user defined
##   >: derived value
##   d: default value
##   g: generated/calculated value
##   .: not applicable or hidden
## 
## Piecewise survival time table:
##      piecewiseSurvivalTime lambda1 lambda2
## [1,]                     0  0.0200   0.025
## [2,]                     6  0.0320   0.040
## [3,]                     9  0.0120   0.015
## [4,]                    15  0.0080   0.010
## [5,]                    21  0.0056   0.007
summary(accrualTime)
## This output summarizes the accrual time specification.
## 
## Accrual time and intensity:
##    0.00000 -  <12.00000: 15
##   12.00000 -  <13.00000: 21
##   13.00000 -  <14.00000: 27
##   14.00000 -  <15.00000: 33
##   15.00000 -  <16.00000: 39
##   16.00000 - <=40.44444: 45
## 
## Formula:
##   maxNumberOfSubjects = 1400 = 12 * 15 + 1 * 21 + 1 * 27 + 1 * 33 + 1 * 39 + 24.4444 * 45
## 
## Case (#5):
##   'maxNumberOfSubjects' and absolute accrual intensity are given, end of accrual* and 'followUpTime'** shall be calculated
##   Example: getAccrualTime(accrualTime = c(0, 6), accrualIntensity = c(22, 33), maxNumberOfSubjects = 1000)
## 
##   (*) Can be calculated directly.
##   (**) Cannot be calculated directly but with 'getSampleSizeSurvival' or 'getPowerSurvival'.
## 
## Details:
## 
## User defined parameters:
##   Accrual intensity                            : 15.0, 21.0, 27.0, 33.0, 39.0, 45.0 
##   Maximum number of subjects                   : 1400.0 
## 
## Default parameters: not available
## 
## Generated parameters:
##   End of accrual is user defined               : FALSE 
##   Follow-up time must be user defined          : FALSE 
##   Max number of subjects is user defined       : TRUE 
##   Max number of subjects can be calculated directly : TRUE 
##   Absolute accrual intensity is enabled        : TRUE 
##   Accrual time                                 : 0.00, 12.00, 13.00, 14.00, 15.00, 16.00, 40.44 
##   Remaining time                               : 24.44 
## 
## 
## Technical summary of the accrual time object of class"AccrualTime":
## 
##   [g] End of accrual is user defined           : FALSE 
##   [g] Follow-up time must be user defined      : FALSE 
##   [g] Max number of subjects is user defined   : TRUE 
##   [g] Max number of subjects can be calculated directly : TRUE 
##   [g] Absolute accrual intensity is enabled    : TRUE 
##   [g] Accrual time                             : 0.00, 12.00, 13.00, 14.00, 15.00, 16.00, 40.44 
##   [u] Accrual intensity                        : 15.0, 21.0, 27.0, 33.0, 39.0, 45.0 
##   [.] Accrual intensity (relative)             : NA 
##   [u] Maximum number of subjects               : 1400.0 
##   [g] Remaining time                           : 24.44 
##   [?] %piecewiseAccrualEnabled%                : TRUE 
## 
## Legend:
##   u: user defined
##   >: derived value
##   d: default value
##   g: generated/calculated value
##   .: not applicable or hidden
## 
## Accrual time table:
##      accrualTime accrualIntensity
## [1,]     0.00000               15
## [2,]    12.00000               21
## [3,]    13.00000               27
## [4,]    14.00000               33
## [5,]    15.00000               39
## [6,]    16.00000               45
## [7,]    40.44444               NA

2.4 Coerce object to data.frame: as.data.frame

as.data.frame(design)
##   typeOfDesign kMax stages informationRates alpha beta twoSidedPower
## 1           WT    4      1             0.25  0.05  0.2         FALSE
## 2           WT    4      2             0.50  0.05  0.2         FALSE
## 3           WT    4      3             0.75  0.05  0.2         FALSE
## 4           WT    4      4             1.00  0.05  0.2         FALSE
##   deltaWT sided  tolerance  alphaSpent criticalValues stageLevels
## 1     0.1     1 0.00000001 0.001073781       3.069028 0.001073781
## 2     0.1     1 0.00000001 0.010526914       2.325888 0.010012250
## 3     0.1     1 0.00000001 0.028205994       1.977663 0.023983344
## 4     0.1     1 0.00000001 0.050000000       1.762694 0.038976069
as.data.frame(designFisher)
##       method kMax stages informationRates alpha alpha0Vec bindingFutility
## 1 equalAlpha    4      1              0.2 0.025       0.4            TRUE
## 2 equalAlpha    4      2              0.5 0.025       0.4            TRUE
## 3 equalAlpha    4      3              0.8 0.025       0.4            TRUE
## 4 equalAlpha    4      4              1.0 0.025        NA            TRUE
##   sided        tolerance iterations alphaSpent criticalValues stageLevels
## 1     1 0.00000000000001          0 0.01366638  0.01366637982  0.01366638
## 2     1 0.00000000000001          0 0.02055086  0.00089215382  0.01366638
## 3     1 0.00000000000001          0 0.02372061  0.00009643023  0.01366638
## 4     1 0.00000000000001          0 0.02500000  0.00002151406  0.01366638
##      scale nonStochasticCurtailment
## 1 1.224745                    FALSE
## 2 1.224745                    FALSE
## 3 1.000000                    FALSE
## 4       NA                    FALSE
as.data.frame(designCharacteristics)
##   inflationFactor stages information      power rejectionProbabilities
## 1         1.04846      1    1.620541 0.03624538             0.03624538
## 2         1.04846      2    3.241081 0.30264612             0.26640074
## 3         1.04846      3    4.861622 0.60337036             0.30072424
## 4         1.04846      4    6.482163 0.80000000             0.19662964
##   futilityProbabilities averageSampleNumber1 averageSampleNumber01
## 1    0.0000000009865876            0.8014789             0.9724133
## 2    0.0000000009758407            0.8014789             0.9724133
## 3    0.0000000009359906            0.8014789             0.9724133
## 4                    NA            0.8014789             0.9724133
##   averageSampleNumber0
## 1             1.038026
## 2             1.038026
## 3             1.038026
## 4             1.038026
as.data.frame(powerAndASN)
##   stages theta averageSampleNumber calculatedPower overallEarlyStop
## 1      1     1            25.66861               1                1
## 2      2     1            25.66861               1                1
## 3      3     1            25.66861               1                1
## 4      4     1            25.66861               1                1
##        earlyStop overallReject rejectPerStage   overallFutility
## 1 0.973256727989             1 0.973256727002 0.000000002580925
## 2 0.026742246997             1 0.026742246022 0.000000002580925
## 3 0.000001025014             1 0.000001024395 0.000000002580925
## 4             NA             1 0.000000000000 0.000000002580925
##     futilityPerStage
## 1 0.0000000009865876
## 2 0.0000000009755040
## 3 0.0000000006188329
## 4                 NA
as.data.frame(designSet)
##    designNumber typeOfDesign kMax stages informationRates alpha beta
## 1             1           WT    4      1             0.25  0.05  0.2
## 2             1           WT    4      2             0.50  0.05  0.2
## 3             1           WT    4      3             0.75  0.05  0.2
## 4             1           WT    4      4             1.00  0.05  0.2
## 5             2           WT    4      1             0.25  0.05  0.2
## 6             2           WT    4      2             0.50  0.05  0.2
## 7             2           WT    4      3             0.75  0.05  0.2
## 8             2           WT    4      4             1.00  0.05  0.2
## 9             3           WT    4      1             0.25  0.05  0.2
## 10            3           WT    4      2             0.50  0.05  0.2
## 11            3           WT    4      3             0.75  0.05  0.2
## 12            3           WT    4      4             1.00  0.05  0.2
##    twoSidedPower deltaWT sided  tolerance  alphaSpent criticalValues
## 1          FALSE     0.1     1 0.00000001 0.001073781       3.069028
## 2          FALSE     0.1     1 0.00000001 0.010526914       2.325888
## 3          FALSE     0.1     1 0.00000001 0.028205994       1.977663
## 4          FALSE     0.1     1 0.00000001 0.050000000       1.762694
## 5          FALSE     0.3     1 0.00000001 0.006915859       2.461604
## 6          FALSE     0.3     1 0.00000001 0.020169238       2.142951
## 7          FALSE     0.3     1 0.00000001 0.035108439       1.976032
## 8          FALSE     0.3     1 0.00000001 0.050000000       1.865547
## 9          FALSE     0.4     1 0.00000001 0.012504953       2.241250
## 10         FALSE     0.4     1 0.00000001 0.026260600       2.091160
## 11         FALSE     0.4     1 0.00000001 0.038792487       2.008067
## 12         FALSE     0.4     1 0.00000001 0.050000000       1.951121
##    stageLevels
## 1  0.001073781
## 2  0.010012250
## 3  0.023983344
## 4  0.038976069
## 5  0.006915859
## 6  0.016058517
## 7  0.024075572
## 8  0.031052371
## 9  0.012504953
## 10 0.018256866
## 11 0.022318106
## 12 0.025521316
as.data.frame(dataset)
##   stages groups sampleSizes means stDevs overallSampleSizes overallMeans
## 1      1      1          22   1.0    1.0                 22     1.000000
## 2      1      2          22   1.4    1.0                 22     1.400000
## 3      2      1          11   1.1    2.0                 33     1.033333
## 4      2      2          13   1.5    2.0                 35     1.437143
## 5      3      1          22   1.0    2.0                 55     1.020000
## 6      3      2          22   3.0    2.0                 57     2.040351
## 7      4      1          11   1.0    1.3                 66     1.016667
## 8      4      2          13   2.5    1.3                 70     2.125714
##   overallStDevs
## 1      1.000000
## 2      1.000000
## 3      1.381500
## 4      1.425418
## 5      1.639151
## 6      1.822857
## 7      1.578664
## 8      1.738706
as.data.frame(stageResults)
##   stages overallTestStatistics overallPValues overallMeans1 overallMeans2
## 1      1             -1.326650      0.9041035      1.000000      1.400000
## 2      2             -1.185099      0.8798860      1.033333      1.437143
## 3      3             -3.111238      0.9988132      1.020000      2.040351
## 4      4             -3.886959      0.9999205      1.016667      2.125714
##   overallStDevs1 overallStDevs2 overallSampleSizes1 overallSampleSizes2
## 1       1.000000       1.000000                  22                  22
## 2       1.381500       1.425418                  33                  35
## 3       1.639151       1.822857                  55                  57
## 4       1.578664       1.738706                  66                  70
##   testStatistics   pValues effectSizes thetaH0 direction
## 1      -1.326650 0.9041035  -0.4000000       0     upper
## 2      -0.488194 0.6848785  -0.4038095       0     upper
## 3      -3.316625 0.9990567  -1.0203509       0     upper
## 4      -2.816504 0.9949743  -1.1090476       0     upper
##   normalApproximation equalVariances
## 1               FALSE           TRUE
## 2               FALSE           TRUE
## 3               FALSE           TRUE
## 4               FALSE           TRUE
as.data.frame(analysisResults)
##   Stage Information rate Critical value Futility bound (non-binding)
## 1     1             0.25       3.069028                         -Inf
## 2     2             0.50       2.325888                         -Inf
## 3     3             0.75       1.977663                         -Inf
## 4     4             1.00       1.762694                           NA
##   Cumulative alpha spending Stage level Effect size Test statistic
## 1               0.001073781 0.001073781  -0.4000000      -1.326650
## 2               0.010526914 0.010012250  -0.4038095      -0.488194
## 3               0.028205994 0.023983344  -1.0203509      -3.316625
## 4               0.050000000 0.038976069  -1.1090476      -2.816504
##     p-value Overall test statistic Overall p-value   Action
## 1 0.9041035              -1.326650       0.9041035 continue
## 2 0.6848785              -1.185099       0.8798860 continue
## 3 0.9990567              -3.111238       0.9988132 continue
## 4 0.9949743              -3.886959       0.9999205   accept
##   Cond. rejection probabilities Assumed standard deviation RCI (lower)
## 1      0.0028100911698034636288                   1.662998   -1.386144
## 2      0.0001226755584807781574                   1.662998   -1.216028
## 3      0.0000000000000006661338                   1.662998   -1.676258
## 4                            NA                   1.662998   -1.615872
##   RCI (upper) Repeated p-value Final p-value Final CI (lower)
## 1   0.5861439         0.499999            NA               NA
## 2   0.4084087         0.499999            NA               NA
## 3  -0.3644440         0.499999            NA               NA
## 4  -0.6022231         0.499999     0.9999205        -1.546886
##   Final CI (upper) Median unbiased estimate
## 1               NA                       NA
## 2               NA                       NA
## 3               NA                       NA
## 4        -0.608249                -1.077568
as.data.frame(designPlan)
##    stages alternative normalApproximation meanRatio thetaH0 stDev groups
## 1       1         0.2               FALSE     FALSE       0     1      2
## 2       1         0.4               FALSE     FALSE       0     1      2
## 3       1         0.6               FALSE     FALSE       0     1      2
## 4       1         0.8               FALSE     FALSE       0     1      2
## 5       1         1.0               FALSE     FALSE       0     1      2
## 6       2         0.2               FALSE     FALSE       0     1      2
## 7       2         0.4               FALSE     FALSE       0     1      2
## 8       2         0.6               FALSE     FALSE       0     1      2
## 9       2         0.8               FALSE     FALSE       0     1      2
## 10      2         1.0               FALSE     FALSE       0     1      2
## 11      3         0.2               FALSE     FALSE       0     1      2
## 12      3         0.4               FALSE     FALSE       0     1      2
## 13      3         0.6               FALSE     FALSE       0     1      2
## 14      3         0.8               FALSE     FALSE       0     1      2
## 15      3         1.0               FALSE     FALSE       0     1      2
## 16      4         0.2               FALSE     FALSE       0     1      2
## 17      4         0.4               FALSE     FALSE       0     1      2
## 18      4         0.6               FALSE     FALSE       0     1      2
## 19      4         0.8               FALSE     FALSE       0     1      2
## 20      4         1.0               FALSE     FALSE       0     1      2
##    allocationRatioPlanned informationRates maxNumberOfSubjects
## 1                       1             0.25           649.63926
## 2                       1             0.25           163.49107
## 3                       1             0.25            73.48452
## 4                       1             0.25            42.00708
## 5                       1             0.25            27.46496
## 6                       1             0.50           649.63926
## 7                       1             0.50           163.49107
## 8                       1             0.50            73.48452
## 9                       1             0.50            42.00708
## 10                      1             0.50            27.46496
## 11                      1             0.75           649.63926
## 12                      1             0.75           163.49107
## 13                      1             0.75            73.48452
## 14                      1             0.75            42.00708
## 15                      1             0.75            27.46496
## 16                      1             1.00           649.63926
## 17                      1             1.00           163.49107
## 18                      1             1.00            73.48452
## 19                      1             1.00            42.00708
## 20                      1             1.00            27.46496
##    maxNumberOfSubjects1 maxNumberOfSubjects2 numberOfSubjects
## 1             324.81963            324.81963       162.409815
## 2              81.74554             81.74554        40.872769
## 3              36.74226             36.74226        18.371130
## 4              21.00354             21.00354        10.501771
## 5              13.73248             13.73248         6.866239
## 6             324.81963            324.81963       324.819630
## 7              81.74554             81.74554        81.745537
## 8              36.74226             36.74226        36.742260
## 9              21.00354             21.00354        21.003541
## 10             13.73248             13.73248        13.732478
## 11            324.81963            324.81963       487.229445
## 12             81.74554             81.74554       122.618306
## 13             36.74226             36.74226        55.113391
## 14             21.00354             21.00354        31.505312
## 15             13.73248             13.73248        20.598717
## 16            324.81963            324.81963       649.639259
## 17             81.74554             81.74554       163.491074
## 18             36.74226             36.74226        73.484521
## 19             21.00354             21.00354        42.007082
## 20             13.73248             13.73248        27.464956
##    expectedNumberOfSubjectsH0 expectedNumberOfSubjectsH01
## 1                   643.17426                   602.51988
## 2                   161.86406                   151.63280
## 3                    72.75323                    68.15457
## 4                    41.58904                    38.96024
## 5                    27.19163                    25.47288
## 6                   643.17426                   602.51988
## 7                   161.86406                   151.63280
## 8                    72.75323                    68.15457
## 9                    41.58904                    38.96024
## 10                   27.19163                    25.47288
## 11                  643.17426                   602.51988
## 12                  161.86406                   151.63280
## 13                   72.75323                    68.15457
## 14                   41.58904                    38.96024
## 15                   27.19163                    25.47288
## 16                  643.17426                   602.51988
## 17                  161.86406                   151.63280
## 18                   72.75323                    68.15457
## 19                   41.58904                    38.96024
## 20                   27.19163                    25.47288
##    expectedNumberOfSubjectsH1 rejectPerStage earlyStop
## 1                   496.60668     0.03624538 0.6033704
## 2                   124.97822     0.03624538 0.6033704
## 3                    56.17411     0.03624538 0.6033704
## 4                    32.11166     0.03624538 0.6033704
## 5                    20.99516     0.03624538 0.6033704
## 6                   496.60668     0.26640074 0.6033704
## 7                   124.97822     0.26640074 0.6033704
## 8                    56.17411     0.26640074 0.6033704
## 9                    32.11166     0.26640074 0.6033704
## 10                   20.99516     0.26640074 0.6033704
## 11                  496.60668     0.30072424 0.6033704
## 12                  124.97822     0.30072424 0.6033704
## 13                   56.17411     0.30072424 0.6033704
## 14                   32.11166     0.30072424 0.6033704
## 15                   20.99516     0.30072424 0.6033704
## 16                  496.60668     0.19662964 0.6033704
## 17                  124.97822     0.19662964 0.6033704
## 18                   56.17411     0.19662964 0.6033704
## 19                   32.11166     0.19662964 0.6033704
## 20                   20.99516     0.19662964 0.6033704
##    criticalValuesEffectScale criticalValuesPValueScale
## 1                  0.4816424               0.001073781
## 2                  0.9600942               0.001073781
## 3                  1.4320657               0.001073781
## 4                  1.8940857               0.001073781
## 5                  2.3424559               0.001073781
## 6                  0.2581058               0.010012250
## 7                  0.5145018               0.010012250
## 8                  0.7674250               0.010012250
## 9                  1.0150154               0.010012250
## 10                 1.2552910               0.010012250
## 11                 0.1791908               0.023983344
## 12                 0.3571945               0.023983344
## 13                 0.5327872               0.023983344
## 14                 0.7046776               0.023983344
## 15                 0.8714898               0.023983344
## 16                 0.1383155               0.038976069
## 17                 0.2757147               0.038976069
## 18                 0.4112529               0.038976069
## 19                 0.5439333               0.038976069
## 20                 0.6726938               0.038976069
as.data.frame(simulationResults)
##    stages pi1 maxNumberOfSubjects accrualTime accrualIntensity
## 1       1 0.2                 100          12         8.333333
## 2       1 0.3                 100          12         8.333333
## 3       1 0.4                 100          12         8.333333
## 4       1 0.5                 100          12         8.333333
## 5       2 0.2                 100          12         8.333333
## 6       2 0.3                 100          12         8.333333
## 7       2 0.4                 100          12         8.333333
## 8       2 0.5                 100          12         8.333333
## 9       3 0.2                 100          12         8.333333
## 10      3 0.3                 100          12         8.333333
## 11      3 0.4                 100          12         8.333333
## 12      3 0.5                 100          12         8.333333
## 13      4 0.2                 100          12         8.333333
## 14      4 0.3                 100          12         8.333333
## 15      4 0.4                 100          12         8.333333
## 16      4 0.5                 100          12         8.333333
##    plannedEvents pi2  median1 median2 allocationRatioPlanned
## 1             50 0.2 37.27540 37.2754                      1
## 2            100 0.2 23.32030 37.2754                      1
## 3            150 0.2 16.28299 37.2754                      1
## 4            200 0.2 12.00000 37.2754                      1
## 5             50 0.2 37.27540 37.2754                      1
## 6            100 0.2 23.32030 37.2754                      1
## 7            150 0.2 16.28299 37.2754                      1
## 8            200 0.2 12.00000 37.2754                      1
## 9             50 0.2 37.27540 37.2754                      1
## 10           100 0.2 23.32030 37.2754                      1
## 11           150 0.2 16.28299 37.2754                      1
## 12           200 0.2 12.00000 37.2754                      1
## 13            50 0.2 37.27540 37.2754                      1
## 14           100 0.2 23.32030 37.2754                      1
## 15           150 0.2 16.28299 37.2754                      1
## 16           200 0.2 12.00000 37.2754                      1
##    directionUpper dropoutRate1 dropoutRate2 dropoutTime eventTime thetaH0
## 1            TRUE            0            0          12        12       1
## 2            TRUE            0            0          12        12       1
## 3            TRUE            0            0          12        12       1
## 4            TRUE            0            0          12        12       1
## 5            TRUE            0            0          12        12       1
## 6            TRUE            0            0          12        12       1
## 7            TRUE            0            0          12        12       1
## 8            TRUE            0            0          12        12       1
## 9            TRUE            0            0          12        12       1
## 10           TRUE            0            0          12        12       1
## 11           TRUE            0            0          12        12       1
## 12           TRUE            0            0          12        12       1
## 13           TRUE            0            0          12        12       1
## 14           TRUE            0            0          12        12       1
## 15           TRUE            0            0          12        12       1
## 16           TRUE            0            0          12        12       1
##    allocation1 allocation2 conditionalPower maxNumberOfIterations kappa
## 1            1           1               NA                  1000     1
## 2            1           1               NA                  1000     1
## 3            1           1               NA                  1000     1
## 4            1           1               NA                  1000     1
## 5            1           1               NA                  1000     1
## 6            1           1               NA                  1000     1
## 7            1           1               NA                  1000     1
## 8            1           1               NA                  1000     1
## 9            1           1               NA                  1000     1
## 10           1           1               NA                  1000     1
## 11           1           1               NA                  1000     1
## 12           1           1               NA                  1000     1
## 13           1           1               NA                  1000     1
## 14           1           1               NA                  1000     1
## 15           1           1               NA                  1000     1
## 16           1           1               NA                  1000     1
##       lambda1   lambda2 hazardRatio iterations analysisTime studyDuration
## 1  0.01859530 0.0185953    1.000000       1000     43.21694    0.08291135
## 2  0.02972291 0.0185953    1.598410       1000     35.35808    2.62353692
## 3  0.04256880 0.0185953    2.289224       1000     30.09956   12.30402608
## 4  0.05776227 0.0185953    3.106284       1000     26.28163   20.84068580
## 5  0.01859530 0.0185953    1.000000          0           NA    0.08291135
## 6  0.02972291 0.0185953    1.598410          0           NA    2.62353692
## 7  0.04256880 0.0185953    2.289224          0           NA   12.30402608
## 8  0.05776227 0.0185953    3.106284          0           NA   20.84068580
## 9  0.01859530 0.0185953    1.000000          0           NA    0.08291135
## 10 0.02972291 0.0185953    1.598410          0           NA    2.62353692
## 11 0.04256880 0.0185953    2.289224          0           NA   12.30402608
## 12 0.05776227 0.0185953    3.106284          0           NA   20.84068580
## 13 0.01859530 0.0185953    1.000000          0           NA    0.08291135
## 14 0.02972291 0.0185953    1.598410          0           NA    2.62353692
## 15 0.04256880 0.0185953    2.289224          0           NA   12.30402608
## 16 0.05776227 0.0185953    3.106284          0           NA   20.84068580
##    eventsPerStage expectedNumberOfEvents eventsNotAchieved
## 1              50                   0.10             0.000
## 2              50                   3.70             0.000
## 3              50                  20.20             0.000
## 4              50                  39.35             0.000
## 5              NA                   0.10             0.998
## 6              NA                   3.70             0.926
## 7              NA                  20.20             0.596
## 8              NA                  39.35             0.213
## 9              NA                   0.10             0.000
## 10             NA                   3.70             0.000
## 11             NA                  20.20             0.000
## 12             NA                  39.35             0.000
## 13             NA                   0.10             0.000
## 14             NA                   3.70             0.000
## 15             NA                  20.20             0.000
## 16             NA                  39.35             0.000
##    numberOfSubjects expectedNumberOfSubjects rejectPerStage overallReject
## 1               100                      0.2          0.002         0.002
## 2               100                      7.4          0.074         0.074
## 3               100                     40.4          0.404         0.404
## 4               100                     78.7          0.787         0.787
## 5                NA                      0.2          0.000         0.002
## 6                NA                      7.4          0.000         0.074
## 7                NA                     40.4          0.000         0.404
## 8                NA                     78.7          0.000         0.787
## 9                NA                      0.2          0.000         0.002
## 10               NA                      7.4          0.000         0.074
## 11               NA                     40.4          0.000         0.404
## 12               NA                     78.7          0.000         0.787
## 13               NA                      0.2          0.000         0.002
## 14               NA                      7.4          0.000         0.074
## 15               NA                     40.4          0.000         0.404
## 16               NA                     78.7          0.000         0.787
##    futilityPerStage futilityStop earlyStop  seed
## 1                 0            0     0.002 12345
## 2                 0            0     0.074 12345
## 3                 0            0     0.404 12345
## 4                 0            0     0.787 12345
## 5                 0            0     0.002 12345
## 6                 0            0     0.074 12345
## 7                 0            0     0.404 12345
## 8                 0            0     0.787 12345
## 9                 0            0     0.002 12345
## 10                0            0     0.074 12345
## 11                0            0     0.404 12345
## 12                0            0     0.787 12345
## 13               NA            0     0.002 12345
## 14               NA            0     0.074 12345
## 15               NA            0     0.404 12345
## 16               NA            0     0.787 12345
as.data.frame(piecewiseSurvivalTime)
##   piecewiseSurvivalTime lambda1 lambda2 hazardRatio kappa
## 1                     0  0.0200   0.025         0.8     1
## 2                     6  0.0320   0.040         0.8     1
## 3                     9  0.0120   0.015         0.8     1
## 4                    15  0.0080   0.010         0.8     1
## 5                    21  0.0056   0.007         0.8     1
##   piecewiseSurvivalEnabled delayedResponseAllowed
## 1                     TRUE                  FALSE
## 2                     TRUE                  FALSE
## 3                     TRUE                  FALSE
## 4                     TRUE                  FALSE
## 5                     TRUE                  FALSE
as.data.frame(accrualTime)
##   endOfAccrualIsUserDefined followUpTimeMustBeUserDefined
## 1                     FALSE                         FALSE
## 2                     FALSE                         FALSE
## 3                     FALSE                         FALSE
## 4                     FALSE                         FALSE
## 5                     FALSE                         FALSE
## 6                     FALSE                         FALSE
## 7                     FALSE                         FALSE
##   maxNumberOfSubjectsIsUserDefined
## 1                             TRUE
## 2                             TRUE
## 3                             TRUE
## 4                             TRUE
## 5                             TRUE
## 6                             TRUE
## 7                             TRUE
##   maxNumberOfSubjectsCanBeCalculatedDirectly
## 1                                       TRUE
## 2                                       TRUE
## 3                                       TRUE
## 4                                       TRUE
## 5                                       TRUE
## 6                                       TRUE
## 7                                       TRUE
##   absoluteAccrualIntensityEnabled accrualTime accrualIntensity
## 1                            TRUE     0.00000               15
## 2                            TRUE    12.00000               21
## 3                            TRUE    13.00000               27
## 4                            TRUE    14.00000               33
## 5                            TRUE    15.00000               39
## 6                            TRUE    16.00000               45
## 7                            TRUE    40.44444               NA
##   maxNumberOfSubjects remainingTime piecewiseAccrualEnabled
## 1                1400      24.44444                    TRUE
## 2                1400      24.44444                    TRUE
## 3                1400      24.44444                    TRUE
## 4                1400      24.44444                    TRUE
## 5                1400      24.44444                    TRUE
## 6                1400      24.44444                    TRUE
## 7                1400      24.44444                    TRUE

2.5 Coerce object to data.frame: as.data.frame with argument ‘niceColumnNamesEnabled = FALSE’

as.data.frame(design, niceColumnNamesEnabled = FALSE)
##   typeOfDesign kMax stages informationRates alpha beta twoSidedPower
## 1           WT    4      1             0.25  0.05  0.2         FALSE
## 2           WT    4      2             0.50  0.05  0.2         FALSE
## 3           WT    4      3             0.75  0.05  0.2         FALSE
## 4           WT    4      4             1.00  0.05  0.2         FALSE
##   deltaWT sided  tolerance  alphaSpent criticalValues stageLevels
## 1     0.1     1 0.00000001 0.001073781       3.069028 0.001073781
## 2     0.1     1 0.00000001 0.010526914       2.325888 0.010012250
## 3     0.1     1 0.00000001 0.028205994       1.977663 0.023983344
## 4     0.1     1 0.00000001 0.050000000       1.762694 0.038976069
as.data.frame(designFisher, niceColumnNamesEnabled = FALSE)
##       method kMax stages informationRates alpha alpha0Vec bindingFutility
## 1 equalAlpha    4      1              0.2 0.025       0.4            TRUE
## 2 equalAlpha    4      2              0.5 0.025       0.4            TRUE
## 3 equalAlpha    4      3              0.8 0.025       0.4            TRUE
## 4 equalAlpha    4      4              1.0 0.025        NA            TRUE
##   sided        tolerance iterations alphaSpent criticalValues stageLevels
## 1     1 0.00000000000001          0 0.01366638  0.01366637982  0.01366638
## 2     1 0.00000000000001          0 0.02055086  0.00089215382  0.01366638
## 3     1 0.00000000000001          0 0.02372061  0.00009643023  0.01366638
## 4     1 0.00000000000001          0 0.02500000  0.00002151406  0.01366638
##      scale nonStochasticCurtailment
## 1 1.224745                    FALSE
## 2 1.224745                    FALSE
## 3 1.000000                    FALSE
## 4       NA                    FALSE
as.data.frame(designCharacteristics, niceColumnNamesEnabled = FALSE)
##   inflationFactor stages information      power rejectionProbabilities
## 1         1.04846      1    1.620541 0.03624538             0.03624538
## 2         1.04846      2    3.241081 0.30264612             0.26640074
## 3         1.04846      3    4.861622 0.60337036             0.30072424
## 4         1.04846      4    6.482163 0.80000000             0.19662964
##   futilityProbabilities averageSampleNumber1 averageSampleNumber01
## 1    0.0000000009865876            0.8014789             0.9724133
## 2    0.0000000009758407            0.8014789             0.9724133
## 3    0.0000000009359906            0.8014789             0.9724133
## 4                    NA            0.8014789             0.9724133
##   averageSampleNumber0
## 1             1.038026
## 2             1.038026
## 3             1.038026
## 4             1.038026
as.data.frame(powerAndASN, niceColumnNamesEnabled = FALSE)
##   stages theta averageSampleNumber calculatedPower overallEarlyStop
## 1      1     1            25.66861               1                1
## 2      2     1            25.66861               1                1
## 3      3     1            25.66861               1                1
## 4      4     1            25.66861               1                1
##        earlyStop overallReject rejectPerStage   overallFutility
## 1 0.973256727989             1 0.973256727002 0.000000002580925
## 2 0.026742246997             1 0.026742246022 0.000000002580925
## 3 0.000001025014             1 0.000001024395 0.000000002580925
## 4             NA             1 0.000000000000 0.000000002580925
##     futilityPerStage
## 1 0.0000000009865876
## 2 0.0000000009755040
## 3 0.0000000006188329
## 4                 NA
as.data.frame(designSet, niceColumnNamesEnabled = FALSE)
##    designNumber typeOfDesign kMax stages informationRates alpha beta
## 1             1           WT    4      1             0.25  0.05  0.2
## 2             1           WT    4      2             0.50  0.05  0.2
## 3             1           WT    4      3             0.75  0.05  0.2
## 4             1           WT    4      4             1.00  0.05  0.2
## 5             2           WT    4      1             0.25  0.05  0.2
## 6             2           WT    4      2             0.50  0.05  0.2
## 7             2           WT    4      3             0.75  0.05  0.2
## 8             2           WT    4      4             1.00  0.05  0.2
## 9             3           WT    4      1             0.25  0.05  0.2
## 10            3           WT    4      2             0.50  0.05  0.2
## 11            3           WT    4      3             0.75  0.05  0.2
## 12            3           WT    4      4             1.00  0.05  0.2
##    twoSidedPower deltaWT sided  tolerance  alphaSpent criticalValues
## 1          FALSE     0.1     1 0.00000001 0.001073781       3.069028
## 2          FALSE     0.1     1 0.00000001 0.010526914       2.325888
## 3          FALSE     0.1     1 0.00000001 0.028205994       1.977663
## 4          FALSE     0.1     1 0.00000001 0.050000000       1.762694
## 5          FALSE     0.3     1 0.00000001 0.006915859       2.461604
## 6          FALSE     0.3     1 0.00000001 0.020169238       2.142951
## 7          FALSE     0.3     1 0.00000001 0.035108439       1.976032
## 8          FALSE     0.3     1 0.00000001 0.050000000       1.865547
## 9          FALSE     0.4     1 0.00000001 0.012504953       2.241250
## 10         FALSE     0.4     1 0.00000001 0.026260600       2.091160
## 11         FALSE     0.4     1 0.00000001 0.038792487       2.008067
## 12         FALSE     0.4     1 0.00000001 0.050000000       1.951121
##    stageLevels
## 1  0.001073781
## 2  0.010012250
## 3  0.023983344
## 4  0.038976069
## 5  0.006915859
## 6  0.016058517
## 7  0.024075572
## 8  0.031052371
## 9  0.012504953
## 10 0.018256866
## 11 0.022318106
## 12 0.025521316
as.data.frame(dataset, niceColumnNamesEnabled = FALSE)
##   stages groups sampleSizes means stDevs overallSampleSizes overallMeans
## 1      1      1          22   1.0    1.0                 22     1.000000
## 2      1      2          22   1.4    1.0                 22     1.400000
## 3      2      1          11   1.1    2.0                 33     1.033333
## 4      2      2          13   1.5    2.0                 35     1.437143
## 5      3      1          22   1.0    2.0                 55     1.020000
## 6      3      2          22   3.0    2.0                 57     2.040351
## 7      4      1          11   1.0    1.3                 66     1.016667
## 8      4      2          13   2.5    1.3                 70     2.125714
##   overallStDevs
## 1      1.000000
## 2      1.000000
## 3      1.381500
## 4      1.425418
## 5      1.639151
## 6      1.822857
## 7      1.578664
## 8      1.738706
as.data.frame(stageResults, niceColumnNamesEnabled = FALSE)
##   stages overallTestStatistics overallPValues overallMeans1 overallMeans2
## 1      1             -1.326650      0.9041035      1.000000      1.400000
## 2      2             -1.185099      0.8798860      1.033333      1.437143
## 3      3             -3.111238      0.9988132      1.020000      2.040351
## 4      4             -3.886959      0.9999205      1.016667      2.125714
##   overallStDevs1 overallStDevs2 overallSampleSizes1 overallSampleSizes2
## 1       1.000000       1.000000                  22                  22
## 2       1.381500       1.425418                  33                  35
## 3       1.639151       1.822857                  55                  57
## 4       1.578664       1.738706                  66                  70
##   testStatistics   pValues effectSizes thetaH0 direction
## 1      -1.326650 0.9041035  -0.4000000       0     upper
## 2      -0.488194 0.6848785  -0.4038095       0     upper
## 3      -3.316625 0.9990567  -1.0203509       0     upper
## 4      -2.816504 0.9949743  -1.1090476       0     upper
##   normalApproximation equalVariances
## 1               FALSE           TRUE
## 2               FALSE           TRUE
## 3               FALSE           TRUE
## 4               FALSE           TRUE
as.data.frame(analysisResults, niceColumnNamesEnabled = FALSE)
##   Stage Information rate Critical value Futility bound (non-binding)
## 1     1             0.25       3.069028                         -Inf
## 2     2             0.50       2.325888                         -Inf
## 3     3             0.75       1.977663                         -Inf
## 4     4             1.00       1.762694                           NA
##   Cumulative alpha spending Stage level Effect size Test statistic
## 1               0.001073781 0.001073781  -0.4000000      -1.326650
## 2               0.010526914 0.010012250  -0.4038095      -0.488194
## 3               0.028205994 0.023983344  -1.0203509      -3.316625
## 4               0.050000000 0.038976069  -1.1090476      -2.816504
##     p-value Overall test statistic Overall p-value   Action
## 1 0.9041035              -1.326650       0.9041035 continue
## 2 0.6848785              -1.185099       0.8798860 continue
## 3 0.9990567              -3.111238       0.9988132 continue
## 4 0.9949743              -3.886959       0.9999205   accept
##   Cond. rejection probabilities Assumed standard deviation RCI (lower)
## 1      0.0028100911698034636288                   1.662998   -1.386144
## 2      0.0001226755584807781574                   1.662998   -1.216028
## 3      0.0000000000000006661338                   1.662998   -1.676258
## 4                            NA                   1.662998   -1.615872
##   RCI (upper) Repeated p-value Final p-value Final CI (lower)
## 1   0.5861439         0.499999            NA               NA
## 2   0.4084087         0.499999            NA               NA
## 3  -0.3644440         0.499999            NA               NA
## 4  -0.6022231         0.499999     0.9999205        -1.546886
##   Final CI (upper) Median unbiased estimate
## 1               NA                       NA
## 2               NA                       NA
## 3               NA                       NA
## 4        -0.608249                -1.077568
as.data.frame(designPlan, niceColumnNamesEnabled = FALSE)
##    stages alternative normalApproximation meanRatio thetaH0 stDev groups
## 1       1         0.2               FALSE     FALSE       0     1      2
## 2       1         0.4               FALSE     FALSE       0     1      2
## 3       1         0.6               FALSE     FALSE       0     1      2
## 4       1         0.8               FALSE     FALSE       0     1      2
## 5       1         1.0               FALSE     FALSE       0     1      2
## 6       2         0.2               FALSE     FALSE       0     1      2
## 7       2         0.4               FALSE     FALSE       0     1      2
## 8       2         0.6               FALSE     FALSE       0     1      2
## 9       2         0.8               FALSE     FALSE       0     1      2
## 10      2         1.0               FALSE     FALSE       0     1      2
## 11      3         0.2               FALSE     FALSE       0     1      2
## 12      3         0.4               FALSE     FALSE       0     1      2
## 13      3         0.6               FALSE     FALSE       0     1      2
## 14      3         0.8               FALSE     FALSE       0     1      2
## 15      3         1.0               FALSE     FALSE       0     1      2
## 16      4         0.2               FALSE     FALSE       0     1      2
## 17      4         0.4               FALSE     FALSE       0     1      2
## 18      4         0.6               FALSE     FALSE       0     1      2
## 19      4         0.8               FALSE     FALSE       0     1      2
## 20      4         1.0               FALSE     FALSE       0     1      2
##    allocationRatioPlanned informationRates maxNumberOfSubjects
## 1                       1             0.25           649.63926
## 2                       1             0.25           163.49107
## 3                       1             0.25            73.48452
## 4                       1             0.25            42.00708
## 5                       1             0.25            27.46496
## 6                       1             0.50           649.63926
## 7                       1             0.50           163.49107
## 8                       1             0.50            73.48452
## 9                       1             0.50            42.00708
## 10                      1             0.50            27.46496
## 11                      1             0.75           649.63926
## 12                      1             0.75           163.49107
## 13                      1             0.75            73.48452
## 14                      1             0.75            42.00708
## 15                      1             0.75            27.46496
## 16                      1             1.00           649.63926
## 17                      1             1.00           163.49107
## 18                      1             1.00            73.48452
## 19                      1             1.00            42.00708
## 20                      1             1.00            27.46496
##    maxNumberOfSubjects1 maxNumberOfSubjects2 numberOfSubjects
## 1             324.81963            324.81963       162.409815
## 2              81.74554             81.74554        40.872769
## 3              36.74226             36.74226        18.371130
## 4              21.00354             21.00354        10.501771
## 5              13.73248             13.73248         6.866239
## 6             324.81963            324.81963       324.819630
## 7              81.74554             81.74554        81.745537
## 8              36.74226             36.74226        36.742260
## 9              21.00354             21.00354        21.003541
## 10             13.73248             13.73248        13.732478
## 11            324.81963            324.81963       487.229445
## 12             81.74554             81.74554       122.618306
## 13             36.74226             36.74226        55.113391
## 14             21.00354             21.00354        31.505312
## 15             13.73248             13.73248        20.598717
## 16            324.81963            324.81963       649.639259
## 17             81.74554             81.74554       163.491074
## 18             36.74226             36.74226        73.484521
## 19             21.00354             21.00354        42.007082
## 20             13.73248             13.73248        27.464956
##    expectedNumberOfSubjectsH0 expectedNumberOfSubjectsH01
## 1                   643.17426                   602.51988
## 2                   161.86406                   151.63280
## 3                    72.75323                    68.15457
## 4                    41.58904                    38.96024
## 5                    27.19163                    25.47288
## 6                   643.17426                   602.51988
## 7                   161.86406                   151.63280
## 8                    72.75323                    68.15457
## 9                    41.58904                    38.96024
## 10                   27.19163                    25.47288
## 11                  643.17426                   602.51988
## 12                  161.86406                   151.63280
## 13                   72.75323                    68.15457
## 14                   41.58904                    38.96024
## 15                   27.19163                    25.47288
## 16                  643.17426                   602.51988
## 17                  161.86406                   151.63280
## 18                   72.75323                    68.15457
## 19                   41.58904                    38.96024
## 20                   27.19163                    25.47288
##    expectedNumberOfSubjectsH1 rejectPerStage earlyStop
## 1                   496.60668     0.03624538 0.6033704
## 2                   124.97822     0.03624538 0.6033704
## 3                    56.17411     0.03624538 0.6033704
## 4                    32.11166     0.03624538 0.6033704
## 5                    20.99516     0.03624538 0.6033704
## 6                   496.60668     0.26640074 0.6033704
## 7                   124.97822     0.26640074 0.6033704
## 8                    56.17411     0.26640074 0.6033704
## 9                    32.11166     0.26640074 0.6033704
## 10                   20.99516     0.26640074 0.6033704
## 11                  496.60668     0.30072424 0.6033704
## 12                  124.97822     0.30072424 0.6033704
## 13                   56.17411     0.30072424 0.6033704
## 14                   32.11166     0.30072424 0.6033704
## 15                   20.99516     0.30072424 0.6033704
## 16                  496.60668     0.19662964 0.6033704
## 17                  124.97822     0.19662964 0.6033704
## 18                   56.17411     0.19662964 0.6033704
## 19                   32.11166     0.19662964 0.6033704
## 20                   20.99516     0.19662964 0.6033704
##    criticalValuesEffectScale criticalValuesPValueScale
## 1                  0.4816424               0.001073781
## 2                  0.9600942               0.001073781
## 3                  1.4320657               0.001073781
## 4                  1.8940857               0.001073781
## 5                  2.3424559               0.001073781
## 6                  0.2581058               0.010012250
## 7                  0.5145018               0.010012250
## 8                  0.7674250               0.010012250
## 9                  1.0150154               0.010012250
## 10                 1.2552910               0.010012250
## 11                 0.1791908               0.023983344
## 12                 0.3571945               0.023983344
## 13                 0.5327872               0.023983344
## 14                 0.7046776               0.023983344
## 15                 0.8714898               0.023983344
## 16                 0.1383155               0.038976069
## 17                 0.2757147               0.038976069
## 18                 0.4112529               0.038976069
## 19                 0.5439333               0.038976069
## 20                 0.6726938               0.038976069
as.data.frame(simulationResults, niceColumnNamesEnabled = FALSE)
##    stages pi1 maxNumberOfSubjects accrualTime accrualIntensity
## 1       1 0.2                 100          12         8.333333
## 2       1 0.3                 100          12         8.333333
## 3       1 0.4                 100          12         8.333333
## 4       1 0.5                 100          12         8.333333
## 5       2 0.2                 100          12         8.333333
## 6       2 0.3                 100          12         8.333333
## 7       2 0.4                 100          12         8.333333
## 8       2 0.5                 100          12         8.333333
## 9       3 0.2                 100          12         8.333333
## 10      3 0.3                 100          12         8.333333
## 11      3 0.4                 100          12         8.333333
## 12      3 0.5                 100          12         8.333333
## 13      4 0.2                 100          12         8.333333
## 14      4 0.3                 100          12         8.333333
## 15      4 0.4                 100          12         8.333333
## 16      4 0.5                 100          12         8.333333
##    plannedEvents pi2  median1 median2 allocationRatioPlanned
## 1             50 0.2 37.27540 37.2754                      1
## 2            100 0.2 23.32030 37.2754                      1
## 3            150 0.2 16.28299 37.2754                      1
## 4            200 0.2 12.00000 37.2754                      1
## 5             50 0.2 37.27540 37.2754                      1
## 6            100 0.2 23.32030 37.2754                      1
## 7            150 0.2 16.28299 37.2754                      1
## 8            200 0.2 12.00000 37.2754                      1
## 9             50 0.2 37.27540 37.2754                      1
## 10           100 0.2 23.32030 37.2754                      1
## 11           150 0.2 16.28299 37.2754                      1
## 12           200 0.2 12.00000 37.2754                      1
## 13            50 0.2 37.27540 37.2754                      1
## 14           100 0.2 23.32030 37.2754                      1
## 15           150 0.2 16.28299 37.2754                      1
## 16           200 0.2 12.00000 37.2754                      1
##    directionUpper dropoutRate1 dropoutRate2 dropoutTime eventTime thetaH0
## 1            TRUE            0            0          12        12       1
## 2            TRUE            0            0          12        12       1
## 3            TRUE            0            0          12        12       1
## 4            TRUE            0            0          12        12       1
## 5            TRUE            0            0          12        12       1
## 6            TRUE            0            0          12        12       1
## 7            TRUE            0            0          12        12       1
## 8            TRUE            0            0          12        12       1
## 9            TRUE            0            0          12        12       1
## 10           TRUE            0            0          12        12       1
## 11           TRUE            0            0          12        12       1
## 12           TRUE            0            0          12        12       1
## 13           TRUE            0            0          12        12       1
## 14           TRUE            0            0          12        12       1
## 15           TRUE            0            0          12        12       1
## 16           TRUE            0            0          12        12       1
##    allocation1 allocation2 conditionalPower maxNumberOfIterations kappa
## 1            1           1               NA                  1000     1
## 2            1           1               NA                  1000     1
## 3            1           1               NA                  1000     1
## 4            1           1               NA                  1000     1
## 5            1           1               NA                  1000     1
## 6            1           1               NA                  1000     1
## 7            1           1               NA                  1000     1
## 8            1           1               NA                  1000     1
## 9            1           1               NA                  1000     1
## 10           1           1               NA                  1000     1
## 11           1           1               NA                  1000     1
## 12           1           1               NA                  1000     1
## 13           1           1               NA                  1000     1
## 14           1           1               NA                  1000     1
## 15           1           1               NA                  1000     1
## 16           1           1               NA                  1000     1
##       lambda1   lambda2 hazardRatio iterations analysisTime studyDuration
## 1  0.01859530 0.0185953    1.000000       1000     43.21694    0.08291135
## 2  0.02972291 0.0185953    1.598410       1000     35.35808    2.62353692
## 3  0.04256880 0.0185953    2.289224       1000     30.09956   12.30402608
## 4  0.05776227 0.0185953    3.106284       1000     26.28163   20.84068580
## 5  0.01859530 0.0185953    1.000000          0           NA    0.08291135
## 6  0.02972291 0.0185953    1.598410          0           NA    2.62353692
## 7  0.04256880 0.0185953    2.289224          0           NA   12.30402608
## 8  0.05776227 0.0185953    3.106284          0           NA   20.84068580
## 9  0.01859530 0.0185953    1.000000          0           NA    0.08291135
## 10 0.02972291 0.0185953    1.598410          0           NA    2.62353692
## 11 0.04256880 0.0185953    2.289224          0           NA   12.30402608
## 12 0.05776227 0.0185953    3.106284          0           NA   20.84068580
## 13 0.01859530 0.0185953    1.000000          0           NA    0.08291135
## 14 0.02972291 0.0185953    1.598410          0           NA    2.62353692
## 15 0.04256880 0.0185953    2.289224          0           NA   12.30402608
## 16 0.05776227 0.0185953    3.106284          0           NA   20.84068580
##    eventsPerStage expectedNumberOfEvents eventsNotAchieved
## 1              50                   0.10             0.000
## 2              50                   3.70             0.000
## 3              50                  20.20             0.000
## 4              50                  39.35             0.000
## 5              NA                   0.10             0.998
## 6              NA                   3.70             0.926
## 7              NA                  20.20             0.596
## 8              NA                  39.35             0.213
## 9              NA                   0.10             0.000
## 10             NA                   3.70             0.000
## 11             NA                  20.20             0.000
## 12             NA                  39.35             0.000
## 13             NA                   0.10             0.000
## 14             NA                   3.70             0.000
## 15             NA                  20.20             0.000
## 16             NA                  39.35             0.000
##    numberOfSubjects expectedNumberOfSubjects rejectPerStage overallReject
## 1               100                      0.2          0.002         0.002
## 2               100                      7.4          0.074         0.074
## 3               100                     40.4          0.404         0.404
## 4               100                     78.7          0.787         0.787
## 5                NA                      0.2          0.000         0.002
## 6                NA                      7.4          0.000         0.074
## 7                NA                     40.4          0.000         0.404
## 8                NA                     78.7          0.000         0.787
## 9                NA                      0.2          0.000         0.002
## 10               NA                      7.4          0.000         0.074
## 11               NA                     40.4          0.000         0.404
## 12               NA                     78.7          0.000         0.787
## 13               NA                      0.2          0.000         0.002
## 14               NA                      7.4          0.000         0.074
## 15               NA                     40.4          0.000         0.404
## 16               NA                     78.7          0.000         0.787
##    futilityPerStage futilityStop earlyStop  seed
## 1                 0            0     0.002 12345
## 2                 0            0     0.074 12345
## 3                 0            0     0.404 12345
## 4                 0            0     0.787 12345
## 5                 0            0     0.002 12345
## 6                 0            0     0.074 12345
## 7                 0            0     0.404 12345
## 8                 0            0     0.787 12345
## 9                 0            0     0.002 12345
## 10                0            0     0.074 12345
## 11                0            0     0.404 12345
## 12                0            0     0.787 12345
## 13               NA            0     0.002 12345
## 14               NA            0     0.074 12345
## 15               NA            0     0.404 12345
## 16               NA            0     0.787 12345
as.data.frame(piecewiseSurvivalTime, niceColumnNamesEnabled = FALSE)
##   piecewiseSurvivalTime lambda1 lambda2 hazardRatio kappa
## 1                     0  0.0200   0.025         0.8     1
## 2                     6  0.0320   0.040         0.8     1
## 3                     9  0.0120   0.015         0.8     1
## 4                    15  0.0080   0.010         0.8     1
## 5                    21  0.0056   0.007         0.8     1
##   piecewiseSurvivalEnabled delayedResponseAllowed
## 1                     TRUE                  FALSE
## 2                     TRUE                  FALSE
## 3                     TRUE                  FALSE
## 4                     TRUE                  FALSE
## 5                     TRUE                  FALSE
as.data.frame(accrualTime, niceColumnNamesEnabled = FALSE)
##   endOfAccrualIsUserDefined followUpTimeMustBeUserDefined
## 1                     FALSE                         FALSE
## 2                     FALSE                         FALSE
## 3                     FALSE                         FALSE
## 4                     FALSE                         FALSE
## 5                     FALSE                         FALSE
## 6                     FALSE                         FALSE
## 7                     FALSE                         FALSE
##   maxNumberOfSubjectsIsUserDefined
## 1                             TRUE
## 2                             TRUE
## 3                             TRUE
## 4                             TRUE
## 5                             TRUE
## 6                             TRUE
## 7                             TRUE
##   maxNumberOfSubjectsCanBeCalculatedDirectly
## 1                                       TRUE
## 2                                       TRUE
## 3                                       TRUE
## 4                                       TRUE
## 5                                       TRUE
## 6                                       TRUE
## 7                                       TRUE
##   absoluteAccrualIntensityEnabled accrualTime accrualIntensity
## 1                            TRUE     0.00000               15
## 2                            TRUE    12.00000               21
## 3                            TRUE    13.00000               27
## 4                            TRUE    14.00000               33
## 5                            TRUE    15.00000               39
## 6                            TRUE    16.00000               45
## 7                            TRUE    40.44444               NA
##   maxNumberOfSubjects remainingTime piecewiseAccrualEnabled
## 1                1400      24.44444                    TRUE
## 2                1400      24.44444                    TRUE
## 3                1400      24.44444                    TRUE
## 4                1400      24.44444                    TRUE
## 5                1400      24.44444                    TRUE
## 6                1400      24.44444                    TRUE
## 7                1400      24.44444                    TRUE

2.6 Coerce object to matrix: as.matrix

as.matrix(design)
##           typeOfDesign kMax stages informationRates alpha  beta 
##   Stage 1 "WT"         "4"  "1"    "0.25"           "0.05" "0.2"
##   Stage 2 "WT"         "4"  "2"    "0.50"           "0.05" "0.2"
##   Stage 3 "WT"         "4"  "3"    "0.75"           "0.05" "0.2"
##   Stage 4 "WT"         "4"  "4"    "1.00"           "0.05" "0.2"
##           twoSidedPower deltaWT sided tolerance    alphaSpent   
##   Stage 1 "FALSE"       "0.1"   "1"   "0.00000001" "0.001073781"
##   Stage 2 "FALSE"       "0.1"   "1"   "0.00000001" "0.010526914"
##   Stage 3 "FALSE"       "0.1"   "1"   "0.00000001" "0.028205994"
##   Stage 4 "FALSE"       "0.1"   "1"   "0.00000001" "0.050000000"
##           criticalValues stageLevels  
##   Stage 1 "3.069028"     "0.001073781"
##   Stage 2 "2.325888"     "0.010012250"
##   Stage 3 "1.977663"     "0.023983344"
##   Stage 4 "1.762694"     "0.038976069"
as.matrix(designFisher)
##           method       kMax stages informationRates alpha   alpha0Vec
##   Stage 1 "equalAlpha" "4"  "1"    "0.2"            "0.025" "0.4"    
##   Stage 2 "equalAlpha" "4"  "2"    "0.5"            "0.025" "0.4"    
##   Stage 3 "equalAlpha" "4"  "3"    "0.8"            "0.025" "0.4"    
##   Stage 4 "equalAlpha" "4"  "4"    "1.0"            "0.025" NA       
##           bindingFutility sided tolerance          iterations alphaSpent  
##   Stage 1 "TRUE"          "1"   "0.00000000000001" "0"        "0.01366638"
##   Stage 2 "TRUE"          "1"   "0.00000000000001" "0"        "0.02055086"
##   Stage 3 "TRUE"          "1"   "0.00000000000001" "0"        "0.02372061"
##   Stage 4 "TRUE"          "1"   "0.00000000000001" "0"        "0.02500000"
##           criticalValues  stageLevels  scale      nonStochasticCurtailment
##   Stage 1 "0.01366637982" "0.01366638" "1.224745" "FALSE"                 
##   Stage 2 "0.00089215382" "0.01366638" "1.224745" "FALSE"                 
##   Stage 3 "0.00009643023" "0.01366638" "1.000000" "FALSE"                 
##   Stage 4 "0.00002151406" "0.01366638" NA         "FALSE"
as.matrix(designCharacteristics)
##           inflationFactor stages information      power
##   Stage 1         1.04846      1    1.620541 0.03624538
##   Stage 2         1.04846      2    3.241081 0.30264612
##   Stage 3         1.04846      3    4.861622 0.60337036
##   Stage 4         1.04846      4    6.482163 0.80000000
##           rejectionProbabilities futilityProbabilities
##   Stage 1             0.03624538    0.0000000009865876
##   Stage 2             0.26640074    0.0000000009758407
##   Stage 3             0.30072424    0.0000000009359906
##   Stage 4             0.19662964                    NA
##           averageSampleNumber1 averageSampleNumber01 averageSampleNumber0
##   Stage 1            0.8014789             0.9724133             1.038026
##   Stage 2            0.8014789             0.9724133             1.038026
##   Stage 3            0.8014789             0.9724133             1.038026
##   Stage 4            0.8014789             0.9724133             1.038026
as.matrix(powerAndASN)
##  stages theta averageSampleNumber calculatedPower overallEarlyStop
##       1     1            25.66861               1                1
##       2     1            25.66861               1                1
##       3     1            25.66861               1                1
##       4     1            25.66861               1                1
##       earlyStop overallReject rejectPerStage   overallFutility
##  0.973256727989             1 0.973256727002 0.000000002580925
##  0.026742246997             1 0.026742246022 0.000000002580925
##  0.000001025014             1 0.000001024395 0.000000002580925
##              NA             1 0.000000000000 0.000000002580925
##    futilityPerStage
##  0.0000000009865876
##  0.0000000009755040
##  0.0000000006188329
##                  NA
as.matrix(designSet)
##       designNumber typeOfDesign kMax stages informationRates alpha  beta 
##  [1,] "1"          "WT"         "4"  "1"    "0.25"           "0.05" "0.2"
##  [2,] "1"          "WT"         "4"  "2"    "0.50"           "0.05" "0.2"
##  [3,] "1"          "WT"         "4"  "3"    "0.75"           "0.05" "0.2"
##  [4,] "1"          "WT"         "4"  "4"    "1.00"           "0.05" "0.2"
##  [5,] "2"          "WT"         "4"  "1"    "0.25"           "0.05" "0.2"
##  [6,] "2"          "WT"         "4"  "2"    "0.50"           "0.05" "0.2"
##  [7,] "2"          "WT"         "4"  "3"    "0.75"           "0.05" "0.2"
##  [8,] "2"          "WT"         "4"  "4"    "1.00"           "0.05" "0.2"
##  [9,] "3"          "WT"         "4"  "1"    "0.25"           "0.05" "0.2"
## [10,] "3"          "WT"         "4"  "2"    "0.50"           "0.05" "0.2"
## [11,] "3"          "WT"         "4"  "3"    "0.75"           "0.05" "0.2"
## [12,] "3"          "WT"         "4"  "4"    "1.00"           "0.05" "0.2"
##       twoSidedPower deltaWT sided tolerance    alphaSpent   
##  [1,] "FALSE"       "0.1"   "1"   "0.00000001" "0.001073781"
##  [2,] "FALSE"       "0.1"   "1"   "0.00000001" "0.010526914"
##  [3,] "FALSE"       "0.1"   "1"   "0.00000001" "0.028205994"
##  [4,] "FALSE"       "0.1"   "1"   "0.00000001" "0.050000000"
##  [5,] "FALSE"       "0.3"   "1"   "0.00000001" "0.006915859"
##  [6,] "FALSE"       "0.3"   "1"   "0.00000001" "0.020169238"
##  [7,] "FALSE"       "0.3"   "1"   "0.00000001" "0.035108439"
##  [8,] "FALSE"       "0.3"   "1"   "0.00000001" "0.050000000"
##  [9,] "FALSE"       "0.4"   "1"   "0.00000001" "0.012504953"
## [10,] "FALSE"       "0.4"   "1"   "0.00000001" "0.026260600"
## [11,] "FALSE"       "0.4"   "1"   "0.00000001" "0.038792487"
## [12,] "FALSE"       "0.4"   "1"   "0.00000001" "0.050000000"
##       criticalValues stageLevels  
##  [1,] "3.069028"     "0.001073781"
##  [2,] "2.325888"     "0.010012250"
##  [3,] "1.977663"     "0.023983344"
##  [4,] "1.762694"     "0.038976069"
##  [5,] "2.461604"     "0.006915859"
##  [6,] "2.142951"     "0.016058517"
##  [7,] "1.976032"     "0.024075572"
##  [8,] "1.865547"     "0.031052371"
##  [9,] "2.241250"     "0.012504953"
## [10,] "2.091160"     "0.018256866"
## [11,] "2.008067"     "0.022318106"
## [12,] "1.951121"     "0.025521316"
as.matrix(dataset)
##           stages groups sampleSizes means stDevs overallSampleSizes
##   Stage 1      1      1          22   1.0    1.0                 22
##   Stage 2      1      2          22   1.4    1.0                 22
##   Stage 3      2      1          11   1.1    2.0                 33
##   Stage 4      2      2          13   1.5    2.0                 35
##   Stage 5      3      1          22   1.0    2.0                 55
##   Stage 6      3      2          22   3.0    2.0                 57
##   Stage 7      4      1          11   1.0    1.3                 66
##   Stage 8      4      2          13   2.5    1.3                 70
##           overallMeans overallStDevs
##   Stage 1     1.000000      1.000000
##   Stage 2     1.400000      1.000000
##   Stage 3     1.033333      1.381500
##   Stage 4     1.437143      1.425418
##   Stage 5     1.020000      1.639151
##   Stage 6     2.040351      1.822857
##   Stage 7     1.016667      1.578664
##   Stage 8     2.125714      1.738706
as.matrix(stageResults)
##           stages overallTestStatistics overallPValues overallMeans1
##   Stage 1 "1"    "-1.326650"           "0.9041035"    "1.000000"   
##   Stage 2 "2"    "-1.185099"           "0.8798860"    "1.033333"   
##   Stage 3 "3"    "-3.111238"           "0.9988132"    "1.020000"   
##   Stage 4 "4"    "-3.886959"           "0.9999205"    "1.016667"   
##           overallMeans2 overallStDevs1 overallStDevs2 overallSampleSizes1
##   Stage 1 "1.400000"    "1.000000"     "1.000000"     "22"               
##   Stage 2 "1.437143"    "1.381500"     "1.425418"     "33"               
##   Stage 3 "2.040351"    "1.639151"     "1.822857"     "55"               
##   Stage 4 "2.125714"    "1.578664"     "1.738706"     "66"               
##           overallSampleSizes2 testStatistics pValues     effectSizes 
##   Stage 1 "22"                "-1.326650"    "0.9041035" "-0.4000000"
##   Stage 2 "35"                "-0.488194"    "0.6848785" "-0.4038095"
##   Stage 3 "57"                "-3.316625"    "0.9990567" "-1.0203509"
##   Stage 4 "70"                "-2.816504"    "0.9949743" "-1.1090476"
##           thetaH0 direction normalApproximation equalVariances
##   Stage 1 "0"     "upper"   "FALSE"             "TRUE"        
##   Stage 2 "0"     "upper"   "FALSE"             "TRUE"        
##   Stage 3 "0"     "upper"   "FALSE"             "TRUE"        
##   Stage 4 "0"     "upper"   "FALSE"             "TRUE"
as.matrix(analysisResults)
##           Stage Information rate Critical value
##   Stage 1 "1"   "0.25"           "3.069028"    
##   Stage 2 "2"   "0.50"           "2.325888"    
##   Stage 3 "3"   "0.75"           "1.977663"    
##   Stage 4 "4"   "1.00"           "1.762694"    
##           Futility bound (non-binding) Cumulative alpha spending
##   Stage 1 "-Inf"                       "0.001073781"            
##   Stage 2 "-Inf"                       "0.010526914"            
##   Stage 3 "-Inf"                       "0.028205994"            
##   Stage 4 NA                           "0.050000000"            
##           Stage level   Effect size  Test statistic p-value    
##   Stage 1 "0.001073781" "-0.4000000" "-1.326650"    "0.9041035"
##   Stage 2 "0.010012250" "-0.4038095" "-0.488194"    "0.6848785"
##   Stage 3 "0.023983344" "-1.0203509" "-3.316625"    "0.9990567"
##   Stage 4 "0.038976069" "-1.1090476" "-2.816504"    "0.9949743"
##           Overall test statistic Overall p-value Action    
##   Stage 1 "-1.326650"            "0.9041035"     "continue"
##   Stage 2 "-1.185099"            "0.8798860"     "continue"
##   Stage 3 "-3.111238"            "0.9988132"     "continue"
##   Stage 4 "-3.886959"            "0.9999205"     "accept"  
##           Cond. rejection probabilities Assumed standard deviation
##   Stage 1 "0.0028100911698034636288"    "1.662998"                
##   Stage 2 "0.0001226755584807781574"    "1.662998"                
##   Stage 3 "0.0000000000000006661338"    "1.662998"                
##   Stage 4 NA                            "1.662998"                
##           RCI (lower) RCI (upper)  Repeated p-value Final p-value
##   Stage 1 "-1.386144" " 0.5861439" "0.499999"       NA           
##   Stage 2 "-1.216028" " 0.4084087" "0.499999"       NA           
##   Stage 3 "-1.676258" "-0.3644440" "0.499999"       NA           
##   Stage 4 "-1.615872" "-0.6022231" "0.499999"       "0.9999205"  
##           Final CI (lower) Final CI (upper) Median unbiased estimate
##   Stage 1 NA               NA               NA                      
##   Stage 2 NA               NA               NA                      
##   Stage 3 NA               NA               NA                      
##   Stage 4 "-1.546886"      "-0.608249"      "-1.077568"
as.matrix(designPlan)
##       stages alternative normalApproximation meanRatio thetaH0 stDev
##    1       1         0.2                   0         0       0     1
##    2       1         0.4                   0         0       0     1
##    3       1         0.6                   0         0       0     1
##    4       1         0.8                   0         0       0     1
##    5       1         1.0                   0         0       0     1
##    6       2         0.2                   0         0       0     1
##    7       2         0.4                   0         0       0     1
##    8       2         0.6                   0         0       0     1
##    9       2         0.8                   0         0       0     1
##    10      2         1.0                   0         0       0     1
##    11      3         0.2                   0         0       0     1
##    12      3         0.4                   0         0       0     1
##    13      3         0.6                   0         0       0     1
##    14      3         0.8                   0         0       0     1
##    15      3         1.0                   0         0       0     1
##    16      4         0.2                   0         0       0     1
##    17      4         0.4                   0         0       0     1
##    18      4         0.6                   0         0       0     1
##    19      4         0.8                   0         0       0     1
##    20      4         1.0                   0         0       0     1
##       groups allocationRatioPlanned informationRates maxNumberOfSubjects
##    1       2                      1             0.25           649.63926
##    2       2                      1             0.25           163.49107
##    3       2                      1             0.25            73.48452
##    4       2                      1             0.25            42.00708
##    5       2                      1             0.25            27.46496
##    6       2                      1             0.50           649.63926
##    7       2                      1             0.50           163.49107
##    8       2                      1             0.50            73.48452
##    9       2                      1             0.50            42.00708
##    10      2                      1             0.50            27.46496
##    11      2                      1             0.75           649.63926
##    12      2                      1             0.75           163.49107
##    13      2                      1             0.75            73.48452
##    14      2                      1             0.75            42.00708
##    15      2                      1             0.75            27.46496
##    16      2                      1             1.00           649.63926
##    17      2                      1             1.00           163.49107
##    18      2                      1             1.00            73.48452
##    19      2                      1             1.00            42.00708
##    20      2                      1             1.00            27.46496
##       maxNumberOfSubjects1 maxNumberOfSubjects2 numberOfSubjects
##    1             324.81963            324.81963       162.409815
##    2              81.74554             81.74554        40.872769
##    3              36.74226             36.74226        18.371130
##    4              21.00354             21.00354        10.501771
##    5              13.73248             13.73248         6.866239
##    6             324.81963            324.81963       324.819630
##    7              81.74554             81.74554        81.745537
##    8              36.74226             36.74226        36.742260
##    9              21.00354             21.00354        21.003541
##    10             13.73248             13.73248        13.732478
##    11            324.81963            324.81963       487.229445
##    12             81.74554             81.74554       122.618306
##    13             36.74226             36.74226        55.113391
##    14             21.00354             21.00354        31.505312
##    15             13.73248             13.73248        20.598717
##    16            324.81963            324.81963       649.639259
##    17             81.74554             81.74554       163.491074
##    18             36.74226             36.74226        73.484521
##    19             21.00354             21.00354        42.007082
##    20             13.73248             13.73248        27.464956
##       expectedNumberOfSubjectsH0 expectedNumberOfSubjectsH01
##    1                   643.17426                   602.51988
##    2                   161.86406                   151.63280
##    3                    72.75323                    68.15457
##    4                    41.58904                    38.96024
##    5                    27.19163                    25.47288
##    6                   643.17426                   602.51988
##    7                   161.86406                   151.63280
##    8                    72.75323                    68.15457
##    9                    41.58904                    38.96024
##    10                   27.19163                    25.47288
##    11                  643.17426                   602.51988
##    12                  161.86406                   151.63280
##    13                   72.75323                    68.15457
##    14                   41.58904                    38.96024
##    15                   27.19163                    25.47288
##    16                  643.17426                   602.51988
##    17                  161.86406                   151.63280
##    18                   72.75323                    68.15457
##    19                   41.58904                    38.96024
##    20                   27.19163                    25.47288
##       expectedNumberOfSubjectsH1 rejectPerStage earlyStop
##    1                   496.60668     0.03624538 0.6033704
##    2                   124.97822     0.03624538 0.6033704
##    3                    56.17411     0.03624538 0.6033704
##    4                    32.11166     0.03624538 0.6033704
##    5                    20.99516     0.03624538 0.6033704
##    6                   496.60668     0.26640074 0.6033704
##    7                   124.97822     0.26640074 0.6033704
##    8                    56.17411     0.26640074 0.6033704
##    9                    32.11166     0.26640074 0.6033704
##    10                   20.99516     0.26640074 0.6033704
##    11                  496.60668     0.30072424 0.6033704
##    12                  124.97822     0.30072424 0.6033704
##    13                   56.17411     0.30072424 0.6033704
##    14                   32.11166     0.30072424 0.6033704
##    15                   20.99516     0.30072424 0.6033704
##    16                  496.60668     0.19662964 0.6033704
##    17                  124.97822     0.19662964 0.6033704
##    18                   56.17411     0.19662964 0.6033704
##    19                   32.11166     0.19662964 0.6033704
##    20                   20.99516     0.19662964 0.6033704
##       criticalValuesEffectScale criticalValuesPValueScale
##    1                  0.4816424               0.001073781
##    2                  0.9600942               0.001073781
##    3                  1.4320657               0.001073781
##    4                  1.8940857               0.001073781
##    5                  2.3424559               0.001073781
##    6                  0.2581058               0.010012250
##    7                  0.5145018               0.010012250
##    8                  0.7674250               0.010012250
##    9                  1.0150154               0.010012250
##    10                 1.2552910               0.010012250
##    11                 0.1791908               0.023983344
##    12                 0.3571945               0.023983344
##    13                 0.5327872               0.023983344
##    14                 0.7046776               0.023983344
##    15                 0.8714898               0.023983344
##    16                 0.1383155               0.038976069
##    17                 0.2757147               0.038976069
##    18                 0.4112529               0.038976069
##    19                 0.5439333               0.038976069
##    20                 0.6726938               0.038976069
as.matrix(simulationResults)
##       stages pi1 maxNumberOfSubjects accrualTime accrualIntensity
##  [1,]      1 0.2                 100          12         8.333333
##  [2,]      1 0.3                 100          12         8.333333
##  [3,]      1 0.4                 100          12         8.333333
##  [4,]      1 0.5                 100          12         8.333333
##  [5,]      2 0.2                 100          12         8.333333
##  [6,]      2 0.3                 100          12         8.333333
##  [7,]      2 0.4                 100          12         8.333333
##  [8,]      2 0.5                 100          12         8.333333
##  [9,]      3 0.2                 100          12         8.333333
## [10,]      3 0.3                 100          12         8.333333
## [11,]      3 0.4                 100          12         8.333333
## [12,]      3 0.5                 100          12         8.333333
## [13,]      4 0.2                 100          12         8.333333
## [14,]      4 0.3                 100          12         8.333333
## [15,]      4 0.4                 100          12         8.333333
## [16,]      4 0.5                 100          12         8.333333
##       plannedEvents pi2  median1 median2 allocationRatioPlanned
##  [1,]            50 0.2 37.27540 37.2754                      1
##  [2,]           100 0.2 23.32030 37.2754                      1
##  [3,]           150 0.2 16.28299 37.2754                      1
##  [4,]           200 0.2 12.00000 37.2754                      1
##  [5,]            50 0.2 37.27540 37.2754                      1
##  [6,]           100 0.2 23.32030 37.2754                      1
##  [7,]           150 0.2 16.28299 37.2754                      1
##  [8,]           200 0.2 12.00000 37.2754                      1
##  [9,]            50 0.2 37.27540 37.2754                      1
## [10,]           100 0.2 23.32030 37.2754                      1
## [11,]           150 0.2 16.28299 37.2754                      1
## [12,]           200 0.2 12.00000 37.2754                      1
## [13,]            50 0.2 37.27540 37.2754                      1
## [14,]           100 0.2 23.32030 37.2754                      1
## [15,]           150 0.2 16.28299 37.2754                      1
## [16,]           200 0.2 12.00000 37.2754                      1
##       directionUpper dropoutRate1 dropoutRate2 dropoutTime eventTime
##  [1,]              1            0            0          12        12
##  [2,]              1            0            0          12        12
##  [3,]              1            0            0          12        12
##  [4,]              1            0            0          12        12
##  [5,]              1            0            0          12        12
##  [6,]              1            0            0          12        12
##  [7,]              1            0            0          12        12
##  [8,]              1            0            0          12        12
##  [9,]              1            0            0          12        12
## [10,]              1            0            0          12        12
## [11,]              1            0            0          12        12
## [12,]              1            0            0          12        12
## [13,]              1            0            0          12        12
## [14,]              1            0            0          12        12
## [15,]              1            0            0          12        12
## [16,]              1            0            0          12        12
##       thetaH0 allocation1 allocation2 conditionalPower
##  [1,]       1           1           1               NA
##  [2,]       1           1           1               NA
##  [3,]       1           1           1               NA
##  [4,]       1           1           1               NA
##  [5,]       1           1           1               NA
##  [6,]       1           1           1               NA
##  [7,]       1           1           1               NA
##  [8,]       1           1           1               NA
##  [9,]       1           1           1               NA
## [10,]       1           1           1               NA
## [11,]       1           1           1               NA
## [12,]       1           1           1               NA
## [13,]       1           1           1               NA
## [14,]       1           1           1               NA
## [15,]       1           1           1               NA
## [16,]       1           1           1               NA
##       maxNumberOfIterations kappa    lambda1   lambda2 hazardRatio
##  [1,]                  1000     1 0.01859530 0.0185953    1.000000
##  [2,]                  1000     1 0.02972291 0.0185953    1.598410
##  [3,]                  1000     1 0.04256880 0.0185953    2.289224
##  [4,]                  1000     1 0.05776227 0.0185953    3.106284
##  [5,]                  1000     1 0.01859530 0.0185953    1.000000
##  [6,]                  1000     1 0.02972291 0.0185953    1.598410
##  [7,]                  1000     1 0.04256880 0.0185953    2.289224
##  [8,]                  1000     1 0.05776227 0.0185953    3.106284
##  [9,]                  1000     1 0.01859530 0.0185953    1.000000
## [10,]                  1000     1 0.02972291 0.0185953    1.598410
## [11,]                  1000     1 0.04256880 0.0185953    2.289224
## [12,]                  1000     1 0.05776227 0.0185953    3.106284
## [13,]                  1000     1 0.01859530 0.0185953    1.000000
## [14,]                  1000     1 0.02972291 0.0185953    1.598410
## [15,]                  1000     1 0.04256880 0.0185953    2.289224
## [16,]                  1000     1 0.05776227 0.0185953    3.106284
##       iterations analysisTime studyDuration eventsPerStage
##  [1,]       1000     43.21694    0.08291135             50
##  [2,]       1000     35.35808    2.62353692             50
##  [3,]       1000     30.09956   12.30402608             50
##  [4,]       1000     26.28163   20.84068580             50
##  [5,]          0           NA    0.08291135             NA
##  [6,]          0           NA    2.62353692             NA
##  [7,]          0           NA   12.30402608             NA
##  [8,]          0           NA   20.84068580             NA
##  [9,]          0           NA    0.08291135             NA
## [10,]          0           NA    2.62353692             NA
## [11,]          0           NA   12.30402608             NA
## [12,]          0           NA   20.84068580             NA
## [13,]          0           NA    0.08291135             NA
## [14,]          0           NA    2.62353692             NA
## [15,]          0           NA   12.30402608             NA
## [16,]          0           NA   20.84068580             NA
##       expectedNumberOfEvents eventsNotAchieved numberOfSubjects
##  [1,]                   0.10             0.000              100
##  [2,]                   3.70             0.000              100
##  [3,]                  20.20             0.000              100
##  [4,]                  39.35             0.000              100
##  [5,]                   0.10             0.998               NA
##  [6,]                   3.70             0.926               NA
##  [7,]                  20.20             0.596               NA
##  [8,]                  39.35             0.213               NA
##  [9,]                   0.10             0.000               NA
## [10,]                   3.70             0.000               NA
## [11,]                  20.20             0.000               NA
## [12,]                  39.35             0.000               NA
## [13,]                   0.10             0.000               NA
## [14,]                   3.70             0.000               NA
## [15,]                  20.20             0.000               NA
## [16,]                  39.35             0.000               NA
##       expectedNumberOfSubjects rejectPerStage overallReject
##  [1,]                      0.2          0.002         0.002
##  [2,]                      7.4          0.074         0.074
##  [3,]                     40.4          0.404         0.404
##  [4,]                     78.7          0.787         0.787
##  [5,]                      0.2          0.000         0.002
##  [6,]                      7.4          0.000         0.074
##  [7,]                     40.4          0.000         0.404
##  [8,]                     78.7          0.000         0.787
##  [9,]                      0.2          0.000         0.002
## [10,]                      7.4          0.000         0.074
## [11,]                     40.4          0.000         0.404
## [12,]                     78.7          0.000         0.787
## [13,]                      0.2          0.000         0.002
## [14,]                      7.4          0.000         0.074
## [15,]                     40.4          0.000         0.404
## [16,]                     78.7          0.000         0.787
##       futilityPerStage futilityStop earlyStop  seed
##  [1,]                0            0     0.002 12345
##  [2,]                0            0     0.074 12345
##  [3,]                0            0     0.404 12345
##  [4,]                0            0     0.787 12345
##  [5,]                0            0     0.002 12345
##  [6,]                0            0     0.074 12345
##  [7,]                0            0     0.404 12345
##  [8,]                0            0     0.787 12345
##  [9,]                0            0     0.002 12345
## [10,]                0            0     0.074 12345
## [11,]                0            0     0.404 12345
## [12,]                0            0     0.787 12345
## [13,]               NA            0     0.002 12345
## [14,]               NA            0     0.074 12345
## [15,]               NA            0     0.404 12345
## [16,]               NA            0     0.787 12345
as.matrix(piecewiseSurvivalTime)
##      piecewiseSurvivalTime lambda1 lambda2 hazardRatio kappa
## [1,]                     0  0.0200   0.025         0.8     1
## [2,]                     6  0.0320   0.040         0.8     1
## [3,]                     9  0.0120   0.015         0.8     1
## [4,]                    15  0.0080   0.010         0.8     1
## [5,]                    21  0.0056   0.007         0.8     1
##      piecewiseSurvivalEnabled delayedResponseAllowed
## [1,]                        1                      0
## [2,]                        1                      0
## [3,]                        1                      0
## [4,]                        1                      0
## [5,]                        1                      0
as.matrix(accrualTime)
##      endOfAccrualIsUserDefined followUpTimeMustBeUserDefined
## [1,]                         0                             0
## [2,]                         0                             0
## [3,]                         0                             0
## [4,]                         0                             0
## [5,]                         0                             0
## [6,]                         0                             0
## [7,]                         0                             0
##      maxNumberOfSubjectsIsUserDefined
## [1,]                                1
## [2,]                                1
## [3,]                                1
## [4,]                                1
## [5,]                                1
## [6,]                                1
## [7,]                                1
##      maxNumberOfSubjectsCanBeCalculatedDirectly
## [1,]                                          1
## [2,]                                          1
## [3,]                                          1
## [4,]                                          1
## [5,]                                          1
## [6,]                                          1
## [7,]                                          1
##      absoluteAccrualIntensityEnabled accrualTime accrualIntensity
## [1,]                               1     0.00000               15
## [2,]                               1    12.00000               21
## [3,]                               1    13.00000               27
## [4,]                               1    14.00000               33
## [5,]                               1    15.00000               39
## [6,]                               1    16.00000               45
## [7,]                               1    40.44444               NA
##      maxNumberOfSubjects remainingTime piecewiseAccrualEnabled
## [1,]                1400      24.44444                       1
## [2,]                1400      24.44444                       1
## [3,]                1400      24.44444                       1
## [4,]                1400      24.44444                       1
## [5,]                1400      24.44444                       1
## [6,]                1400      24.44444                       1
## [7,]                1400      24.44444                       1

System: rpact 2.0.5, R version 3.6.1 (2019-07-05), platform: x86_64-w64-mingw32

To cite R in publications use:

R Core Team (2019). R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. URL https://www.R-project.org/.

To cite package ‘rpact’ in publications use:

Gernot Wassmer and Friedrich Pahlke (2019). rpact: Confirmatory Adaptive Clinical Trial Design and Analysis. R package version 2.0.5. https://CRAN.R-project.org/package=rpact

 

Creative Commons License
This work by Gernot Wassmer and Friedrich Pahlke is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.