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
.
First, load the rpact package
## [1] '3.2.1'
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))
designConditionalDunnett <- getDesignConditionalDunnett(secondStageConditioning = TRUE)
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 (44, 68, 112, 136) not according to specified
## information rates (0.25, 0.5, 0.75, 1) in group sequential design. Test
## procedure might not control Type I error rate
designPlan <- getSampleSizeMeans(design)
simulationResults <- getSimulationSurvival(design,
maxNumberOfSubjects = 100, plannedEvents = c(50, 100, 150, 200), seed = 12345)
## Warning: Presumably due to drop-outs, required number of events were not
## achieved for at least one situation. Increase the maximum number of subjects
## (100) to avoid this situation
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)
## [1] "kMax" "alpha" "stages"
## [4] "informationRates" "userAlphaSpending" "criticalValues"
## [7] "stageLevels" "alphaSpent" "bindingFutility"
## [10] "tolerance" "typeOfDesign" "beta"
## [13] "deltaWT" "deltaPT1" "deltaPT0"
## [16] "futilityBounds" "gammaA" "gammaB"
## [19] "optimizationCriterion" "sided" "betaSpent"
## [22] "typeBetaSpending" "userBetaSpending" "power"
## [25] "twoSidedPower" "constantBoundsHP"
## [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"
## [1] "nFixed" "shift" "inflationFactor"
## [4] "stages" "information" "power"
## [7] "rejectionProbabilities" "futilityProbabilities" "averageSampleNumber1"
## [10] "averageSampleNumber01" "averageSampleNumber0"
## [1] "nMax" "theta" "averageSampleNumber"
## [4] "calculatedPower" "overallEarlyStop" "earlyStop"
## [7] "overallReject" "rejectPerStage" "overallFutility"
## [10] "futilityPerStage"
## [1] "designs" "variedParameters"
## [1] "stages" "groups" "subsets"
## [4] "sampleSizes" "means" "stDevs"
## [7] "overallSampleSizes" "overallMeans" "overallStDevs"
## [1] "stages" "overallTestStatistics" "overallPValues"
## [4] "overallMeans1" "overallMeans2" "overallStDevs1"
## [7] "overallStDevs2" "overallSampleSizes1" "overallSampleSizes2"
## [10] "testStatistics" "pValues" "effectSizes"
## [13] "thetaH0" "direction" "normalApproximation"
## [16] "equalVariances"
## [1] ".design"
## [2] ".dataInput"
## [3] ".stageResults"
## [4] ".conditionalPowerResults"
## [5] "normalApproximation"
## [6] "directionUpper"
## [7] "thetaH0"
## [8] "pi1"
## [9] "pi2"
## [10] "nPlanned"
## [11] "allocationRatioPlanned"
## [12] "thetaH1"
## [13] "assumedStDev"
## [14] "equalVariances"
## [15] "testActions"
## [16] "conditionalRejectionProbabilities"
## [17] "conditionalPower"
## [18] "repeatedConfidenceIntervalLowerBounds"
## [19] "repeatedConfidenceIntervalUpperBounds"
## [20] "repeatedPValues"
## [21] "finalStage"
## [22] "finalPValues"
## [23] "finalConfidenceIntervalLowerBounds"
## [24] "finalConfidenceIntervalUpperBounds"
## [25] "medianUnbiasedEstimates"
## [26] "maxInformation"
## [27] "informationEpsilon"
## [1] "meanRatio" "thetaH0"
## [3] "normalApproximation" "alternative"
## [5] "stDev" "groups"
## [7] "allocationRatioPlanned" "optimumAllocationRatio"
## [9] "directionUpper" "effect"
## [11] "overallReject" "rejectPerStage"
## [13] "futilityStop" "futilityPerStage"
## [15] "earlyStop" "expectedNumberOfSubjects"
## [17] "nFixed" "nFixed1"
## [19] "nFixed2" "informationRates"
## [21] "maxNumberOfSubjects" "maxNumberOfSubjects1"
## [23] "maxNumberOfSubjects2" "numberOfSubjects"
## [25] "numberOfSubjects1" "numberOfSubjects2"
## [27] "expectedNumberOfSubjectsH0" "expectedNumberOfSubjectsH01"
## [29] "expectedNumberOfSubjectsH1" "criticalValuesEffectScale"
## [31] "criticalValuesEffectScaleLower" "criticalValuesEffectScaleUpper"
## [33] "criticalValuesPValueScale" "futilityBoundsEffectScale"
## [35] "futilityBoundsEffectScaleLower" "futilityBoundsEffectScaleUpper"
## [37] "futilityBoundsPValueScale"
## [1] ".design" ".data"
## [3] ".rawData" ".piecewiseSurvivalTime"
## [5] ".accrualTime" "maxNumberOfIterations"
## [7] "seed" "allocationRatioPlanned"
## [9] "conditionalPower" "iterations"
## [11] "futilityPerStage" "futilityStop"
## [13] "directionUpper" "plannedEvents"
## [15] "minNumberOfEventsPerStage" "maxNumberOfEventsPerStage"
## [17] "thetaH1" "calcEventsFunction"
## [19] "expectedNumberOfEvents" "pi1"
## [21] "pi2" "median1"
## [23] "median2" "maxNumberOfSubjects"
## [25] "accrualTime" "accrualIntensity"
## [27] "dropoutRate1" "dropoutRate2"
## [29] "dropoutTime" "eventTime"
## [31] "thetaH0" "allocation1"
## [33] "allocation2" "kappa"
## [35] "piecewiseSurvivalTime" "lambda1"
## [37] "lambda2" "earlyStop"
## [39] "hazardRatio" "analysisTime"
## [41] "studyDuration" "eventsNotAchieved"
## [43] "numberOfSubjects" "numberOfSubjects1"
## [45] "numberOfSubjects2" "eventsPerStage"
## [47] "expectedNumberOfSubjects" "rejectPerStage"
## [49] "overallReject" "conditionalPowerAchieved"
## [1] "piecewiseSurvivalTime" "lambda1"
## [3] "lambda2" "hazardRatio"
## [5] "pi1" "pi2"
## [7] "median1" "median2"
## [9] "eventTime" "kappa"
## [11] "piecewiseSurvivalEnabled" "delayedResponseAllowed"
## [13] "delayedResponseEnabled"
## [1] "endOfAccrualIsUserDefined"
## [2] "followUpTimeMustBeUserDefined"
## [3] "maxNumberOfSubjectsIsUserDefined"
## [4] "maxNumberOfSubjectsCanBeCalculatedDirectly"
## [5] "absoluteAccrualIntensityEnabled"
## [6] "accrualTime"
## [7] "accrualIntensity"
## [8] "accrualIntensityRelative"
## [9] "maxNumberOfSubjects"
## [10] "remainingTime"
## [11] "piecewiseAccrualEnabled"
## Design parameters and output of group sequential design:
##
## User defined parameters:
## Type of design : Wang & Tsiatis Delta class
## Maximum number of stages : 4
## Stages : 1, 2, 3, 4
## Information rates : 0.250, 0.500, 0.750, 1.000
## Significance level : 0.0500
## Delta for Wang & Tsiatis Delta class : 0.1
##
## Derived from user defined parameters: not available
##
## Default parameters:
## Type II error rate : 0.2000
## Two-sided power : FALSE
## Test : one-sided
## Tolerance : 0.00000001
##
## Output:
## Cumulative alpha spending : 0.001074, 0.010527, 0.028206, 0.050000
## Critical values : 3.069, 2.326, 1.978, 1.763
## Stage levels (one-sided) : 0.001074, 0.010012, 0.023983, 0.038976
## Design parameters and output of Fisher's combination test design:
##
## User defined parameters:
## Maximum number of stages : 4
## Stages : 1, 2, 3, 4
## Information rates : 0.200, 0.500, 0.800, 1.000
## Alpha_0 : 0.4000, 0.4000, 0.4000
##
## Derived from user defined parameters: not available
##
## Default parameters:
## Method : equalAlpha
## Significance level : 0.0250
## Binding futility : TRUE
## Test : one-sided
## Tolerance : 0.00000000000001
##
## Output:
## Cumulative alpha spending : 0.01367, 0.02055, 0.02372, 0.02500
## Critical values : 0.01366638, 0.00089215, 0.00009643, 0.00002151
## Stage levels (one-sided) : 0.01367, 0.01367, 0.01367, 0.01367
## Scale : 1.225, 1.225, 1
## Non stochastic curtailment : FALSE
## Group sequential design characteristics:
## Number of subjects fixed : 6.2
## Shift : 6.4822
## Inflation factor : 1.0485
## Informations : 1.621, 3.241, 4.862, 6.482
## Power : 0.03625, 0.30265, 0.60337, 0.80000
## Rejection probabilities under H1 : 0.03625, 0.26640, 0.30072, 0.19663
## Futility probabilities under H1 : 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
## Power and average sample size (ASN):
##
## User defined parameters:
## Effect : 1
##
## Default parameters:
## N_max : 100.0
##
## Output:
## Average sample sizes (ASN) : 25.669
## Power : 1.0000
## Early stop : 1.0000
## Early stop [1] : 0.973256728
## Early stop [2] : 0.026742247
## Early stop [3] : 0.000001025
## Early stop [4] : NA
## Overall reject : 1.0000
## Reject per stage [1] : 0.973256727
## Reject per stage [2] : 0.026742246
## Reject per stage [3] : 0.000001024
## Reject per stage [4] : 0.000000000
## Overall futility : 0.0000
## Futility stop per stage [1] : 0.0000
## Futility stop per stage [2] : 0.0000
## Futility stop per stage [3] : 0.0000
##
## Legend:
## [k]: values at stage k
## Trial design set with 3 designs
##
## Design parameters and output of group sequential design:
##
## User defined parameters:
## Type of design : Wang & Tsiatis Delta class
## Maximum number of stages : 4
## Stages : 1, 2, 3, 4
## Information rates : 0.250, 0.500, 0.750, 1.000
## Significance level : 0.0500
## Delta for Wang & Tsiatis Delta class : 0.1
##
## Derived from user defined parameters: not available
##
## Default parameters:
## Type II error rate : 0.2000
## Two-sided power : FALSE
## Test : one-sided
## Tolerance : 0.00000001
##
## Output:
## Cumulative alpha spending : 0.001074, 0.010527, 0.028206, 0.050000
## Critical values : 3.069, 2.326, 1.978, 1.763
## Stage levels (one-sided) : 0.001074, 0.010012, 0.023983, 0.038976
##
## Design parameters and output of group sequential design:
##
## User defined parameters:
## Type of design : Wang & Tsiatis Delta class
## Significance level : 0.0500
## Delta for Wang & Tsiatis Delta class : 0.3
##
## Derived from user defined parameters:
## Maximum number of stages : 4
## Stages : 1, 2, 3, 4
##
## Default parameters:
## Information rates : 0.250, 0.500, 0.750, 1.000
## Type II error rate : 0.2000
## Two-sided power : FALSE
## Test : one-sided
## Tolerance : 0.00000001
##
## Output:
## Cumulative alpha spending : 0.006916, 0.020169, 0.035108, 0.050000
## Critical values : 2.462, 2.143, 1.976, 1.866
## Stage levels (one-sided) : 0.006916, 0.016059, 0.024076, 0.031052
##
## Design parameters and output of group sequential design:
##
## User defined parameters:
## Type of design : Wang & Tsiatis Delta class
## Significance level : 0.0500
## Delta for Wang & Tsiatis Delta class : 0.4
##
## Derived from user defined parameters:
## Maximum number of stages : 4
## Stages : 1, 2, 3, 4
##
## Default parameters:
## Information rates : 0.250, 0.500, 0.750, 1.000
## Type II error rate : 0.2000
## Two-sided power : FALSE
## Test : one-sided
## Tolerance : 0.00000001
##
## Output:
## Cumulative alpha spending : 0.01250, 0.02626, 0.03879, 0.05000
## Critical values : 2.241, 2.091, 2.008, 1.951
## Stage levels (one-sided) : 0.01250, 0.01826, 0.02232, 0.02552
## 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:
## Cumulative sample sizes : 22, 22, 33, 35, 55, 57, 66, 70
## Cumulative means : 1.000, 1.400, 1.033, 1.437, 1.020, 2.040, 1.017, 2.126
## Cumulative standard deviations : 1.000, 1.000, 1.381, 1.425, 1.639, 1.823, 1.579, 1.739
## 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
## Cumulative means (1) : 1.000, 1.033, 1.020, 1.017
## Cumulative means (2) : 1.400, 1.437, 2.040, 2.126
## Cumulative standard deviations (1) : 1.000, 1.381, 1.639, 1.579
## Cumulative standard deviations (2) : 1.000, 1.425, 1.823, 1.739
## Cumulative sample sizes (1) : 22, 33, 55, 66
## Cumulative sample sizes (2) : 22, 35, 57, 70
## Stage-wise test statistics : -1.327, -0.488, -3.317, -2.817
## Stage-wise p-values : 0.9041, 0.6849, 0.9991, 0.9950
## Cumulative effect sizes : -0.4000, -0.4038, -1.0204, -1.1090
##
## Legend:
## (i): values of treatment arm i
## Analysis results (means of 2 groups, group sequential design):
##
## Design parameters:
## 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
## Local one-sided significance levels : 0.001074, 0.010012, 0.023983, 0.038976
## Significance level : 0.0500
## Test : one-sided
##
## User defined parameters: not available
##
## Default parameters:
## Normal approximation : FALSE
## Direction upper : TRUE
## Theta H0 : 0
## Equal variances : TRUE
##
## Stage results:
## Cumulative effect sizes : -0.4000, -0.4038, -1.0204, -1.1090
## Cumulative (pooled) standard deviations : 1.000, 1.404, 1.735, 1.663
## Stage-wise test statistics : -1.327, -0.488, -3.317, -2.817
## Stage-wise 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
##
## Analysis results:
## Assumed standard deviation : 1.663
## Actions : continue, continue, continue, accept
## Conditional rejection probability : 0.0028101, 0.0001227, 0.0000000, NA
## Conditional power : NA, NA, NA, NA
## Repeated confidence intervals (lower) : -1.386, -1.216, -1.676, -1.616
## Repeated confidence intervals (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
## Design plan parameters and output for means:
##
## Design parameters:
## 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
## Local one-sided significance levels : 0.001074, 0.010012, 0.023983, 0.038976
## Significance level : 0.0500
## Type II error rate : 0.2000
## Test : one-sided
##
## User defined parameters: not available
##
## Default parameters:
## Mean ratio : FALSE
## Theta H0 : 0
## Normal approximation : FALSE
## Alternatives : 0.2, 0.4, 0.6, 0.8, 1
## Standard deviation : 1
## Treatment groups : 2
## Planned allocation ratio : 1
##
## Sample size and output:
## Reject per stage [1] : 0.03625
## Reject per stage [2] : 0.26640
## Reject per stage [3] : 0.30072
## Reject per stage [4] : 0.19663
## Early stop : 0.6034
## Maximum number of subjects : 649.6, 163.5, 73.5, 42.0, 27.5
## Maximum number of subjects (1) : 324.8, 81.7, 36.7, 21.0, 13.7
## Maximum number of subjects (2) : 324.8, 81.7, 36.7, 21.0, 13.7
## Number of subjects [1] : 162.4, 40.9, 18.4, 10.5, 6.9
## Number of subjects [2] : 324.8, 81.7, 36.7, 21.0, 13.7
## Number of subjects [3] : 487.2, 122.6, 55.1, 31.5, 20.6
## Number of subjects [4] : 649.6, 163.5, 73.5, 42.0, 27.5
## Expected number of subjects under H0 : 643.2, 161.9, 72.8, 41.6, 27.2
## Expected number of subjects under H0/H1 : 602.5, 151.6, 68.2, 39.0, 25.5
## Expected number of subjects under H1 : 496.6, 125.0, 56.2, 32.1, 21.0
## Critical values (treatment effect scale) [1] : 0.490, 1.029, 1.697, 2.678, 4.519
## Critical values (treatment effect scale) [2] : 0.259, 0.525, 0.804, 1.108, 1.452
## Critical values (treatment effect scale) [3] : 0.180, 0.361, 0.545, 0.735, 0.933
## Critical values (treatment effect scale) [4] : 0.139, 0.277, 0.417, 0.558, 0.701
##
## Legend:
## (i): values of treatment arm i
## [k]: values at stage k
## Simulation of survival data (group sequential design):
##
## Design parameters:
## 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
## Local one-sided significance levels : 0.001074, 0.010012, 0.023983, 0.038976
## Significance level : 0.0500
## Test : one-sided
##
## User defined parameters:
## Seed : 12345
## Planned cumulative events : 50, 100, 150, 200
## Maximum number of subjects : 100
##
## Default parameters:
## Maximum number of iterations : 1000
## Planned allocation ratio : 1
## Conditional power : NA
## Direction upper : TRUE
## Assumed treatment rate : 0.200, 0.300, 0.400, 0.500
## Assumed control rate : 0.200
## Accrual time : 12
## Drop-out rate (1) : 0.000
## Drop-out rate (2) : 0.000
## Drop-out time : 12
## Event time : 12
## Theta H0 : 1
## Allocation 1 : 1
## Allocation 2 : 1
## kappa : 1
##
## Results:
## median(1) : 37.3, 23.3, 16.3, 12.0
## median(2) : 37.3
## Accrual intensity : 8.3
## lambda(1) : 0.0186, 0.0297, 0.0426, 0.0578
## lambda(2) : 0.0186
## Hazard ratio : 1.000, 1.598, 2.289, 3.106
## Analysis times [1] : 43.22, 35.36, 30.10, 26.28
## Analysis times [2] : NA, NA, NA, NA
## Analysis times [3] : NA, NA, NA, NA
## Analysis times [4] : NA, NA, NA, NA
## Expected study duration : 0.083, 2.624, 12.304, 20.841
## Events not achieved [1] : 0.000, 0.000, 0.000, 0.000
## Events not achieved [2] : 0.998, 0.926, 0.596, 0.213
## Events not achieved [3] : 0.000, 0.000, 0.000, 0.000
## Events not achieved [4] : 0.000, 0.000, 0.000, 0.000
## Number of subjects [1] : 100.0, 100.0, 100.0, 100.0
## Number of subjects [2] : NA, NA, NA, NA
## Number of subjects [3] : NA, NA, NA, NA
## Number of subjects [4] : NA, NA, NA, NA
## Iterations [1] : 1000, 1000, 1000, 1000
## Iterations [2] : 0, 0, 0, 0
## Iterations [3] : 0, 0, 0, 0
## Iterations [4] : 0, 0, 0, 0
## Overall reject : 0.0020, 0.0740, 0.4040, 0.7870
## Reject per stage [1] : 0.0020, 0.0740, 0.4040, 0.7870
## Reject per stage [2] : 0.0000, 0.0000, 0.0000, 0.0000
## Reject per stage [3] : 0.0000, 0.0000, 0.0000, 0.0000
## Reject per stage [4] : 0.0000, 0.0000, 0.0000, 0.0000
## Overall futility stop : 0.0000, 0.0000, 0.0000, 0.0000
## Futility stop per stage [1] : 0.0000, 0.0000, 0.0000, 0.0000
## Futility stop per stage [2] : 0.0000, 0.0000, 0.0000, 0.0000
## Futility stop per stage [3] : 0.0000, 0.0000, 0.0000, 0.0000
## Early stop : 0.0020, 0.0740, 0.4040, 0.7870
## Expected number of subjects : 0.2, 7.4, 40.4, 78.7
## Expected number of events : 50.0, 50.0, 50.0, 50.0
## Cumulative number of events [1] : 50.0, 50.0, 50.0, 50.0
## Cumulative number of events [2] : 50.0, 50.0, 50.0, 50.0
## Cumulative number of events [3] : 50.0, 50.0, 50.0, 50.0
## Cumulative number of events [4] : 50.0, 50.0, 50.0, 50.0
##
## Legend:
## (i): values of treatment arm i
## [k]: values at stage k
## 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, 6, 9, 15, 21
## 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
## 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 time : 0.00, 12.00, 13.00, 14.00, 15.00, 16.00, 40.44
## Accrual intensity : 15, 21, 27, 33, 39, 45
## Maximum number of subjects : 1400
##
## 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
## Remaining time : 24.44
## Sequential analysis with a maximum of 4 looks (group sequential design)
##
## Wang & Tsiatis Delta class design (deltaWT = 0.1), one-sided overall
## significance level 5%, power 80%, undefined endpoint.
##
## 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
## Overall power 0.0362 0.3026 0.6034 0.8000
## Sequential analysis with a maximum of 4 looks (Fisher's combination test design)
##
## Fisher's combination test design, binding futility, one-sided overall
## significance level 2.5%, undefined endpoint.
##
## Stage 1 2 3 4
## Information rate 20% 50% 80% 100%
## Efficacy boundary (p product scale) 0.01366638 0.00089215 0.00009643 0.00002151
## Futility boundary (separate p-value scale) 0.400 0.400 0.400
## Cumulative alpha spent 0.0137 0.0206 0.0237 0.0250
## Sequential analysis with a maximum of 4 looks (group sequential design)
##
## Wang & Tsiatis Delta class design (deltaWT = 0.1), one-sided overall
## significance level 5%, power 80%, undefined endpoint.
##
## 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
## Overall power 0.0362 0.3026 0.6034 0.8000
## Technical developer summary of the power and average sample size (ASN) object ("PowerAndAverageSampleNumberResult"):
##
## [d] N_max : 100.0
## [u] Effect : 1
## [g] Average sample sizes (ASN) : 25.669
## [g] Power : 1.0000
## [g] Early stop : 1.0000
## [g] Early stop [1] : 0.973256728
## [g] Early stop [2] : 0.026742247
## [g] Early stop [3] : 0.000001025
## [g] Early stop [4] : NA
## [g] Overall reject : 1.0000
## [g] Reject per stage [1] : 0.973256727
## [g] Reject per stage [2] : 0.026742246
## [g] Reject per stage [3] : 0.000001024
## [g] Reject per stage [4] : 0.000000000
## [g] Overall futility : 0.0000
## [g] Futility stop per stage [1] : 0.0000
## [g] Futility stop per stage [2] : 0.0000
## [g] Futility stop per stage [3] : 0.0000
##
## Legend:
## u: user defined
## >: derived value
## d: default value
## g: generated/calculated value
## .: not applicable or hidden
##
## Power and average sample size (ASN) table:
## Stage Early stop Reject per stage Futility stop per stage
## [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
## [[1]]
## Sequential analysis with a maximum of 4 looks (group sequential design)
##
## Wang & Tsiatis Delta class design (deltaWT = 0.1), one-sided overall
## significance level 5%, power 80%, undefined endpoint.
##
## 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
## Overall power 0.0362 0.3026 0.6034 0.8000
##
## [[2]]
## Sequential analysis with a maximum of 4 looks (group sequential design)
##
## Wang & Tsiatis Delta class design (deltaWT = 0.3), one-sided overall
## significance level 5%, power 80%, undefined endpoint.
##
## Stage 1 2 3 4
## Information rate 25% 50% 75% 100%
## Efficacy boundary (z-value scale) 2.462 2.143 1.976 1.866
## Cumulative alpha spent 0.0069 0.0202 0.0351 0.0500
## Overall power 0.1238 0.3990 0.6401 0.8000
##
## [[3]]
## Sequential analysis with a maximum of 4 looks (group sequential design)
##
## Wang & Tsiatis Delta class design (deltaWT = 0.4), one-sided overall
## significance level 5%, power 80%, undefined endpoint.
##
## Stage 1 2 3 4
## Information rate 25% 50% 75% 100%
## Efficacy boundary (z-value scale) 2.241 2.091 2.008 1.951
## Cumulative alpha spent 0.0125 0.0263 0.0388 0.0500
## Overall power 0.1823 0.4455 0.6576 0.8000
## Dataset of means
##
## The dataset contains the sample sizes, means, and standard deviations of
## one treatment and one control group.
## The total number of looks is four; stage-wise and cumulative data are included.
##
## Stage 1 1 2 2 3 3 4 4
## Group 1 2 1 2 1 2 1 2
## Stage-wise sample size 22 22 11 13 22 22 11 13
## Cumulative sample size 22 22 33 35 55 57 66 70
## Stage-wise mean 1.000 1.400 1.100 1.500 1.000 3.000 1.000 2.500
## Cumulative mean 1.000 1.400 1.033 1.437 1.020 2.040 1.017 2.126
## Stage-wise standard deviation 1.000 1.000 2.000 2.000 2.000 2.000 1.300 1.300
## Cumulative standard deviation 1.000 1.000 1.381 1.425 1.639 1.823 1.579 1.739
## Technical developer summary of the stage results of means object ("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] Cumulative means (1) : 1.000, 1.033, 1.020, 1.017
## [g] Cumulative means (2) : 1.400, 1.437, 2.040, 2.126
## [g] Cumulative standard deviations (1) : 1.000, 1.381, 1.639, 1.579
## [g] Cumulative standard deviations (2) : 1.000, 1.425, 1.823, 1.739
## [g] Cumulative sample sizes (1) : 22, 33, 55, 66
## [g] Cumulative sample sizes (2) : 22, 35, 57, 70
## [g] Stage-wise test statistics : -1.327, -0.488, -3.317, -2.817
## [g] Stage-wise p-values : 0.9041, 0.6849, 0.9991, 0.9950
## [g] Cumulative 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
## [.] %stage% : 4
## [.] Fixed weights : 1.000, 1.000, 1.000, 1.000
## [.] Fixed weights : 0.500, 0.500, 0.500, 0.500
## [.] Combination test statistics : -1.305, -1.263, -2.826, -3.734
## [.] Combination test statistics : 0.9041, 0.6192, 0.6186, 0.6155
## [?] Cumulative means :
## [?] Cumulative (pooled) standard deviations : 1.000, 1.404, 1.735, 1.663
## [?] Cumulative sample sizes :
##
## Legend:
## u: user defined
## >: derived value
## d: default value
## g: generated/calculated value
## .: not applicable or hidden
##
## Stage results of means table:
## Stage Overall test statistic Overall p-value Cumulative mean (1)
## [1,] 1 -1.326650 0.9041035 1.000000
## [2,] 2 -1.185099 0.8798860 1.033333
## [3,] 3 -3.111238 0.9988132 1.020000
## [4,] 4 -3.886959 0.9999205 1.016667
## Cumulative mean (2) Cumulative standard deviation (1)
## [1,] 1.400000 1.000000
## [2,] 1.437143 1.381500
## [3,] 2.040351 1.639151
## [4,] 2.125714 1.578664
## Cumulative standard deviation (2) Cumulative sample size (1)
## [1,] 1.000000 22
## [2,] 1.425418 33
## [3,] 1.822857 55
## [4,] 1.738706 66
## Cumulative sample size (2) Stage-wise test statistic p-value
## [1,] 22 -1.326650 0.9041035
## [2,] 35 -0.488194 0.6848785
## [3,] 57 -3.316625 0.9990567
## [4,] 70 -2.816504 0.9949743
## Overall effect size
## [1,] -0.4000000
## [2,] -0.4038095
## [3,] -1.0203509
## [4,] -1.1090476
## Analysis results for a continuous endpoint
##
## Sequential analysis with 4 looks (group sequential design).
## The results were calculated using a two-sample t-test (one-sided),
## equal variances option.
## H0: mu(1) - mu(2) = 0 against H1: mu(1) - mu(2) > 0.
##
## Stage 1 2 3 4
## Fixed weight 0.25 0.5 0.75 1
## Efficacy boundary (z-value scale) 3.069 2.326 1.978 1.763
## Cumulative alpha spent 0.0011 0.0105 0.0282 0.0500
## Stage level 0.0011 0.0100 0.0240 0.0390
## Cumulative effect size -0.400 -0.404 -1.020 -1.109
## Cumulative (pooled) standard deviation 1.000 1.404 1.735 1.663
## Overall test statistic -1.327 -1.185 -3.111 -3.887
## Overall p-value 0.9041 0.8799 0.9988 0.9999
## Test action continue continue continue accept
## Conditional rejection probability 0.0028 0.0001 0
## 90% repeated confidence interval [-1.386; 0.586 ] [-1.216; 0.408 ] [-1.676; -0.364] [-1.616; -0.602]
## Repeated p-value >0.5 >0.5 >0.5 >0.5
## Final p-value 0.9999
## Final confidence interval [-1.547; -0.608]
## Median unbiased estimate -1.078
## Sample size calculation for a continuous endpoint
##
## Sequential analysis with a maximum of 4 looks (group sequential design), overall
## significance level 5% (one-sided).
## The sample size was calculated for a two-sample t-test, H0: mu(1) - mu(2) = 0,
## H1: effect as specified, standard deviation = 1, 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
## Overall power 0.0362 0.3026 0.6034 0.8000
## Expected number of subjects, alt. = 0.2 496.6
## Expected number of subjects, alt. = 0.4 125.0
## Expected number of subjects, alt. = 0.6 56.2
## Expected number of subjects, alt. = 0.8 32.1
## Expected number of subjects, alt. = 1 21.0
## Number of subjects, alt. = 0.2 162.4 324.8 487.2 649.6
## Number of subjects, alt. = 0.4 40.9 81.7 122.6 163.5
## Number of subjects, alt. = 0.6 18.4 36.7 55.1 73.5
## Number of subjects, alt. = 0.8 10.5 21.0 31.5 42.0
## Number of subjects, alt. = 1 6.9 13.7 20.6 27.5
## Cumulative alpha spent 0.0011 0.0105 0.0282 0.0500
## One-sided local significance level 0.0011 0.0100 0.0240 0.0390
## Efficacy boundary (t), alt. = 0.2 0.490 0.259 0.180 0.139
## Efficacy boundary (t), alt. = 0.4 1.029 0.525 0.361 0.277
## Efficacy boundary (t), alt. = 0.6 1.697 0.804 0.545 0.417
## Efficacy boundary (t), alt. = 0.8 2.678 1.108 0.735 0.558
## Efficacy boundary (t), alt. = 1 4.519 1.452 0.933 0.701
## 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): treatment effect scale
## Simulation of a survival endpoint
##
## Sequential analysis with a maximum of 4 looks (group sequential design), overall
## significance level 5% (one-sided).
## The results were simulated for a two-sample logrank test,
## H0: hazard ratio = 1, power directed towards larger values,
## H1: treatment pi(1) as specified, control pi(2) = 0.2,
## planned cumulative events = c(50, 100, 150, 200), maximum number of subjects = 100,
## event time = 12, accrual time = 12, accrual intensity = 8.3, simulation runs = 1000,
## seed = 12345.
##
## Stage 1 2 3 4
## Fixed weight 0.25 0.5 0.75 1
## Efficacy boundary (z-value scale) 3.069 2.326 1.978 1.763
## Overall power, pi(1) = 0.2 0.0020 0.0020 0.0020 0.0020
## Overall power, pi(1) = 0.3 0.0740 0.0740 0.0740 0.0740
## Overall power, pi(1) = 0.4 0.4040 0.4040 0.4040 0.4040
## Overall power, pi(1) = 0.5 0.7870 0.7870 0.7870 0.7870
## Expected number of subjects, pi(1) = 0.2 0.2
## Expected number of subjects, pi(1) = 0.3 7.4
## Expected number of subjects, pi(1) = 0.4 40.4
## Expected number of subjects, pi(1) = 0.5 78.7
## Number of subjects, pi(1) = 0.2 100.0
## Number of subjects, pi(1) = 0.3 100.0
## Number of subjects, pi(1) = 0.4 100.0
## Number of subjects, pi(1) = 0.5 100.0
## Expected number of events, pi(1) = 0.2 50.0
## Expected number of events, pi(1) = 0.3 50.0
## Expected number of events, pi(1) = 0.4 50.0
## Expected number of events, pi(1) = 0.5 50.0
## Cumulative number of events, pi(1) = 0.2 50.0 50.0 50.0 50.0
## Cumulative number of events, pi(1) = 0.3 50.0 50.0 50.0 50.0
## Cumulative number of events, pi(1) = 0.4 50.0 50.0 50.0 50.0
## Cumulative number of events, pi(1) = 0.5 50.0 50.0 50.0 50.0
## Analysis time, pi(1) = 0.2 43.2
## Analysis time, pi(1) = 0.3 35.4
## Analysis time, pi(1) = 0.4 30.1
## Analysis time, pi(1) = 0.5 26.3
## Expected study duration, pi(1) = 0.2 <0.1
## Expected study duration, pi(1) = 0.3 2.6
## Expected study duration, pi(1) = 0.4 12.3
## Expected study duration, pi(1) = 0.5 20.8
## Conditional power (achieved), pi(1) = 0.2
## Conditional power (achieved), pi(1) = 0.3
## Conditional power (achieved), pi(1) = 0.4
## Conditional power (achieved), pi(1) = 0.5
## Exit probability for efficacy, pi(1) = 0.2 0.0020 0 0 0
## Exit probability for efficacy, pi(1) = 0.3 0.0740 0 0 0
## Exit probability for efficacy, pi(1) = 0.4 0.4040 0 0 0
## Exit probability for efficacy, pi(1) = 0.5 0.7870 0 0 0
## Technical developer summary of the piecewise survival time object ("PiecewiseSurvivalTime"):
##
## [u] Piecewise survival times : 0, 6, 9, 15, 21
## [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
## [.] Assumed treatment rate : NA
## [.] Assumed control rate : NA
## [.] median(1) : NA
## [.] median(2) : NA
## [.] Event time : NA
## [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:
## Piecewise survival times lambda(1) lambda(2)
## [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
## Technical developer summary of the accrual time object ("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
## [u] Accrual time : 0.00, 12.00, 13.00, 14.00, 15.00, 16.00, 40.44
## [u] Accrua