rpact: Confirmatory Adaptive Clinical Trial Design and Analysis

Summary

This R Markdown document provides a technical view on the different alternatives to define accrual time and accrual intensity with rpact.

Load the rpact package

library(rpact)
## 
## Attache Paket: 'rpact'
## Das folgende Objekt ist maskiert 'package:knitr':
## 
##     kable
packageVersion("rpact") # version should be version 2.0.5 or later
## [1] '3.1.1'

1 Case 1

End of accrual, absolute accrual intensity and maxNumberOfSubjects are given, followUpTime shall be calculated.

1.1 Example: vector based definition

accrualTime <- getAccrualTime(accrualTime = c(0, 6, 30), 
    accrualIntensity = c(22, 33), maxNumberOfSubjects = 924) 
accrualTime
## Accrual time and intensity:
##    0 -  < 6: 22
##    6 - <=30: 33
## 
## Formula:
##   maxNumberOfSubjects = 924 = 6 * 22 + 24 * 33
## 
## Case (#1):
##   End of accrual, absolute accrual intensity and 'maxNumberOfSubjects' are given,  'followUpTime'** shall be calculated.
##   Example: getAccrualTime(accrualTime = c(0, 6, 30), accrualIntensity = c(22, 33), maxNumberOfSubjects = 924)
## 
##   (*) Can be calculated directly.
##   (**) Cannot be calculated directly but with 'getSampleSizeSurvival()' or 'getPowerSurvival()'.
## 
## Details:
## 
## User defined parameters:
##   Accrual time                                 : 0, 6, 30 
##   Accrual intensity                            : 22, 33 
##   Maximum number of subjects                   : 924 
## 
## Default parameters: not available
## 
## Generated parameters:
##   End of accrual is user defined               : TRUE 
##   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

1.2 Example: list based definition

accrualTime <- getAccrualTime(list(
    "0 - <6" = 22,
    "6 - <= 30" = 33), 
    maxNumberOfSubjects = 924) 
accrualTime
## Accrual time and intensity:
##    0 -  < 6: 22
##    6 - <=30: 33
## 
## Formula:
##   maxNumberOfSubjects = 924 = 6 * 22 + 24 * 33
## 
## Case (#1):
##   End of accrual, absolute accrual intensity and 'maxNumberOfSubjects' are given,  'followUpTime'** shall be calculated.
##   Example: getAccrualTime(accrualTime = c(0, 6, 30), accrualIntensity = c(22, 33), maxNumberOfSubjects = 924)
## 
##   (*) Can be calculated directly.
##   (**) Cannot be calculated directly but with 'getSampleSizeSurvival()' or 'getPowerSurvival()'.
## 
## Details:
## 
## User defined parameters:
##   Accrual time                                 : 0, 6, 30 
##   Accrual intensity                            : 22, 33 
##   Maximum number of subjects                   : 924 
## 
## Default parameters: not available
## 
## Generated parameters:
##   End of accrual is user defined               : TRUE 
##   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

1.3 Example: how to use accrual time object

getSampleSizeSurvival(accrualTime = accrualTime, pi1 = 0.23, pi2 = 0.3)
## Design plan parameters and output for survival data:
## 
## Design parameters:
##   Critical values                              : 1.96 
##   Significance level                           : 0.0250 
##   Type II error rate                           : 0.2000 
##   Test                                         : one-sided 
## 
## User defined parameters:
##   Assumed treatment rate                       : 0.230 
##   Assumed control rate                         : 0.300 
##   Maximum number of subjects                   : 924 
##   Accrual time                                 : 6, 30 
##   Accrual intensity                            : 22, 33 
## 
## Default parameters:
##   Theta H0                                     : 1 
##   Type of computation                          : Schoenfeld 
##   Planned allocation ratio                     : 1 
##   Event time                                   : 12 
##   kappa                                        : 1 
##   Drop-out rate (1)                            : 0.000 
##   Drop-out rate (2)                            : 0.000 
##   Drop-out time                                : 12 
## 
## Sample size and output:
##   Direction upper                              : FALSE 
##   median(1)                                    : 31.8 
##   median(2)                                    : 23.3 
##   lambda(1)                                    : 0.0218 
##   lambda(2)                                    : 0.0297 
##   Hazard ratio                                 : 0.733 
##   Number of events                             : 324.8 
##   Total accrual time                           : 30.00 
##   Follow up time                               : 3.66 
##   Number of events fixed                       : 324.8 
##   Number of subjects fixed                     : 924.0 
##   Number of subjects fixed (1)                 : 462.0 
##   Number of subjects fixed (2)                 : 462.0 
##   Analysis times                               : 33.66 
##   Study duration                               : 33.66 
##   Critical values (treatment effect scale)     : 0.805 
## 
## Legend:
##   (i): values of treatment arm i

2 Case 2

End of accrual, relative accrual intensity and maxNumberOfSubjects are given, absolute accrual intensity and followUpTime shall be calculated.

2.1 Example: vector based definition

accrualTime <- getAccrualTime(accrualTime = c(0, 6, 30), 
    accrualIntensity = c(0.22, 0.33), maxNumberOfSubjects = 1000) 
accrualTime
## Accrual time and intensity:
##    0 -  < 6: 23.80952
##    6 - <=30: 35.71429
## 
## Formula:
##   maxNumberOfSubjects = 1000 = 6 * 23.8095 + 24 * 35.7143
## 
## Case (#2):
##   End of accrual, relative accrual intensity and 'maxNumberOfSubjects' are given, absolute accrual intensity* and 'followUpTime'** shall be calculated.
##   Example: getAccrualTime(accrualTime = c(0, 6, 30), accrualIntensity = c(0.22, 0.33), maxNumberOfSubjects = 1000)
## 
##   (*) Can be calculated directly.
##   (**) Cannot be calculated directly but with 'getSampleSizeSurvival()' or 'getPowerSurvival()'.
## 
## Details:
## 
## User defined parameters:
##   Accrual time                                 : 0, 6, 30 
##   Accrual intensity (relative)                 : 0.22, 0.33 
##   Maximum number of subjects                   : 1000 
## 
## Default parameters: not available
## 
## Generated parameters:
##   End of accrual is user defined               : TRUE 
##   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        : FALSE 
##   Accrual intensity                            : 23.8, 35.7 
##   Remaining time                               : 24.00

2.2 Example: list based definition

accrualTime <- getAccrualTime(list(
    "0 - <6" = 0.22,
    "6 - <= 30" = 0.33), 
    maxNumberOfSubjects = 1000) 
accrualTime
## Accrual time and intensity:
##    0 -  < 6: 23.80952
##    6 - <=30: 35.71429
## 
## Formula:
##   maxNumberOfSubjects = 1000 = 6 * 23.8095 + 24 * 35.7143
## 
## Case (#2):
##   End of accrual, relative accrual intensity and 'maxNumberOfSubjects' are given, absolute accrual intensity* and 'followUpTime'** shall be calculated.
##   Example: getAccrualTime(accrualTime = c(0, 6, 30), accrualIntensity = c(0.22, 0.33), maxNumberOfSubjects = 1000)
## 
##   (*) Can be calculated directly.
##   (**) Cannot be calculated directly but with 'getSampleSizeSurvival()' or 'getPowerSurvival()'.
## 
## Details:
## 
## User defined parameters:
##   Accrual time                                 : 0, 6, 30 
##   Accrual intensity (relative)                 : 0.22, 0.33 
##   Maximum number of subjects                   : 1000 
## 
## Default parameters: not available
## 
## Generated parameters:
##   End of accrual is user defined               : TRUE 
##   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        : FALSE 
##   Accrual intensity                            : 23.8, 35.7 
##   Remaining time                               : 24.00

2.3 Example: how to use accrual time object

getSampleSizeSurvival(accrualTime = accrualTime, pi1 = 0.23, pi2 = 0.3)
## Design plan parameters and output for survival data:
## 
## Design parameters:
##   Critical values                              : 1.96 
##   Significance level                           : 0.0250 
##   Type II error rate                           : 0.2000 
##   Test                                         : one-sided 
## 
## User defined parameters:
##   Assumed treatment rate                       : 0.230 
##   Assumed control rate                         : 0.300 
##   Maximum number of subjects                   : 1000 
##   Accrual time                                 : 6, 30 
## 
## Default parameters:
##   Theta H0                                     : 1 
##   Type of computation                          : Schoenfeld 
##   Planned allocation ratio                     : 1 
##   Event time                                   : 12 
##   kappa                                        : 1 
##   Drop-out rate (1)                            : 0.000 
##   Drop-out rate (2)                            : 0.000 
##   Drop-out time                                : 12 
## 
## Sample size and output:
##   Direction upper                              : FALSE 
##   median(1)                                    : 31.8 
##   median(2)                                    : 23.3 
##   lambda(1)                                    : 0.0218 
##   lambda(2)                                    : 0.0297 
##   Hazard ratio                                 : 0.733 
##   Number of events                             : 324.8 
##   Total accrual time                           : 30.00 
##   Accrual intensity                            : 23.8, 35.7 
##   Follow up time                               : 2.07 
##   Number of events fixed                       : 324.8 
##   Number of subjects fixed                     : 1000.0 
##   Number of subjects fixed (1)                 : 500.0 
##   Number of subjects fixed (2)                 : 500.0 
##   Analysis times                               : 32.07 
##   Study duration                               : 32.07 
##   Critical values (treatment effect scale)     : 0.805 
## 
## Legend:
##   (i): values of treatment arm i

3 Case 3

End of accrual and absolute accrual intensity are given, maxNumberOfSubjects and followUpTime shall be calculated.

3.1 Example: vector based definition

accrualTime <- getAccrualTime(accrualTime = c(0, 6, 30), accrualIntensity = c(22, 33)) 

3.2 Example: list based definition

accrualTime <- getAccrualTime(list(
    "0 - <6" = 22,
    "6 - <= 30" = 33)) 
accrualTime
## Accrual time and intensity:
##    0 -  < 6 : 22
##    6 - <=30 : 33
##   30 - <=[?]: NA
## 
## Formula:
##   maxNumberOfSubjects = 924 = 6 * 22 + 24 * 33
## 
## Case (#3):
##   End of accrual and absolute accrual intensity are given, 'maxNumberOfSubjects'* and 'followUpTime'** shall be calculated.
##   Example: getAccrualTime(accrualTime = c(0, 6, 30), accrualIntensity = c(22, 33))
## 
##   (*) Can be calculated directly.
##   (**) Cannot be calculated directly but with 'getSampleSizeSurvival()' or 'getPowerSurvival()'.
## 
## Details:
## 
## User defined parameters:
##   Accrual time                                 : 0, 6, 30 
##   Accrual intensity                            : 22, 33 
## 
## Default parameters: not available
## 
## Generated parameters:
##   End of accrual is user defined               : TRUE 
##   Follow-up time must be user defined          : FALSE 
##   Max number of subjects is user defined       : FALSE 
##   Max number of subjects can be calculated directly : TRUE 
##   Absolute accrual intensity is enabled        : TRUE 
##   Maximum number of subjects                   : 924.0 
##   Remaining time                               : 24.00

3.3 Example: how to use accrual time object

getSampleSizeSurvival(accrualTime = accrualTime, pi1 = 0.23, pi2 = 0.3)
## Design plan parameters and output for survival data:
## 
## Design parameters:
##   Critical values                              : 1.96 
##   Significance level                           : 0.0250 
##   Type II error rate                           : 0.2000 
##   Test                                         : one-sided 
## 
## User defined parameters:
##   Assumed treatment rate                       : 0.230 
##   Assumed control rate                         : 0.300 
##   Accrual time                                 : 6, 30 
##   Accrual intensity                            : 22, 33 
## 
## Default parameters:
##   Theta H0                                     : 1 
##   Type of computation                          : Schoenfeld 
##   Planned allocation ratio                     : 1 
##   Event time                                   : 12 
##   kappa                                        : 1 
##   Drop-out rate (1)                            : 0.000 
##   Drop-out rate (2)                            : 0.000 
##   Drop-out time                                : 12 
## 
## Sample size and output:
##   Direction upper                              : FALSE 
##   median(1)                                    : 31.8 
##   median(2)                                    : 23.3 
##   lambda(1)                                    : 0.0218 
##   lambda(2)                                    : 0.0297 
##   Hazard ratio                                 : 0.733 
##   Maximum number of subjects                   : 924.0 
##   Number of events                             : 324.8 
##   Total accrual time                           : 30.00 
##   Follow up time                               : 3.66 
##   Number of events fixed                       : 324.8 
##   Number of subjects fixed                     : 924.0 
##   Number of subjects fixed (1)                 : 462.0 
##   Number of subjects fixed (2)                 : 462.0 
##   Analysis times                               : 33.66 
##   Study duration                               : 33.66 
##   Critical values (treatment effect scale)     : 0.805 
## 
## Legend:
##   (i): values of treatment arm i

4 Case 4

End of accrual, relative accrual intensity and followUpTime are given, absolute accrual intensity and maxNumberOfSubjects shall be calculated.

4.1 Example: vector based definition

accrualTime <- getAccrualTime(accrualTime = c(0, 6, 30), accrualIntensity = c(0.22, 0.33)) 
accrualTime
## Accrual time and intensity:
##    0 -  < 6 : 0.22
##    6 - <=30 : 0.33
##   30 - <=[?]: NA
## 
## Formula:
##   maxNumberOfSubjects = 6 * 0.22 * c  + 24 * 0.33 * c , where 'c' is a constant factor
## 
## Case (#4):
##   End of accrual, relative accrual intensity and 'followUpTime' are given, absolute accrual intensity** and 'maxNumberOfSubjects'** shall be calculated.
##   Example: getAccrualTime(accrualTime = c(0, 6, 30), accrualIntensity = c(0.22, 0.33))
## 
##   (*) Can be calculated directly.
##   (**) Cannot be calculated directly but with 'getSampleSizeSurvival()' or 'getPowerSurvival()'.
## 
## Details:
## 
## User defined parameters:
##   Accrual time                                 : 0, 6, 30 
##   Accrual intensity                            : 0.22, 0.33 
## 
## Default parameters: not available
## 
## Generated parameters:
##   End of accrual is user defined               : TRUE 
##   Follow-up time must be user defined          : FALSE 
##   Max number of subjects is user defined       : FALSE 
##   Max number of subjects can be calculated directly : FALSE 
##   Absolute accrual intensity is enabled        : FALSE

4.2 Example: list based definition

accrualTime <- getAccrualTime(list(
    "0 - <6" = 0.22,
    "6 - <= 30" = 0.33)) 
accrualTime
## Accrual time and intensity:
##    0 -  < 6 : 0.22
##    6 - <=30 : 0.33
##   30 - <=[?]: NA
## 
## Formula:
##   maxNumberOfSubjects = 6 * 0.22 * c  + 24 * 0.33 * c , where 'c' is a constant factor
## 
## Case (#4):
##   End of accrual, relative accrual intensity and 'followUpTime' are given, absolute accrual intensity** and 'maxNumberOfSubjects'** shall be calculated.
##   Example: getAccrualTime(accrualTime = c(0, 6, 30), accrualIntensity = c(0.22, 0.33))
## 
##   (*) Can be calculated directly.
##   (**) Cannot be calculated directly but with 'getSampleSizeSurvival()' or 'getPowerSurvival()'.
## 
## Details:
## 
## User defined parameters:
##   Accrual time                                 : 0, 6, 30 
##   Accrual intensity                            : 0.22, 0.33 
## 
## Default parameters: not available
## 
## Generated parameters:
##   End of accrual is user defined               : TRUE 
##   Follow-up time must be user defined          : FALSE 
##   Max number of subjects is user defined       : FALSE 
##   Max number of subjects can be calculated directly : FALSE 
##   Absolute accrual intensity is enabled        : FALSE

4.3 Example: how to use accrual time object

getSampleSizeSurvival(accrualTime = accrualTime, pi1 = 0.23, pi2 = 0.3, followUpTime = 6)
## Design plan parameters and output for survival data:
## 
## Design parameters:
##   Critical values                              : 1.96 
##   Significance level                           : 0.0250 
##   Type II error rate                           : 0.2000 
##   Test                                         : one-sided 
## 
## User defined parameters:
##   Assumed treatment rate                       : 0.230 
##   Assumed control rate                         : 0.300 
##   Accrual time                                 : 6, 30 
## 
## Default parameters:
##   Theta H0                                     : 1 
##   Type of computation                          : Schoenfeld 
##   Planned allocation ratio                     : 1 
##   Event time                                   : 12 
##   kappa                                        : 1 
##   Follow up time                               : 6.00 
##   Drop-out rate (1)                            : 0.000 
##   Drop-out rate (2)                            : 0.000 
##   Drop-out time                                : 12 
## 
## Sample size and output:
##   Direction upper                              : FALSE 
##   median(1)                                    : 31.8 
##   median(2)                                    : 23.3 
##   lambda(1)                                    : 0.0218 
##   lambda(2)                                    : 0.0297 
##   Hazard ratio                                 : 0.733 
##   Number of events                             : 324.8 
##   Total accrual time                           : 30.00 
##   Accrual intensity                            : 139.1, 27.8 
##   Number of events fixed                       : 324.8 
##   Number of subjects fixed                     : 834.7 
##   Number of subjects fixed (1)                 : 417.4 
##   Number of subjects fixed (2)                 : 417.4 
##   Analysis times                               : 36.00 
##   Study duration                               : 36.00 
##   Critical values (treatment effect scale)     : 0.805 
## 
## Legend:
##   (i): values of treatment arm i

5 Case 5

maxNumberOfSubjects and absolute accrual intensity are given, end of accrual and followUpTime shall be calculated

5.1 Example: vector based definition

accrualTime <- getAccrualTime(accrualTime = c(0, 6), 
    accrualIntensity = c(22, 33), maxNumberOfSubjects = 1000) 
accrualTime
## Accrual time and intensity:
##    0.00000 -  < 6.00000: 22
##    6.00000 - <=32.30303: 33
## 
## Formula:
##   maxNumberOfSubjects = 1000 = 6 * 22 + 26.303 * 33
## 
## 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, 6.00, 32.30 
##   Accrual intensity                            : 22, 33 
##   Maximum number of subjects                   : 1000 
## 
## 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                               : 26.30

5.2 Example: list based definition

accrualTime <- getAccrualTime(list(
    "0 - <6" = 22,
    "6" = 33), 
    maxNumberOfSubjects = 1000) 
accrualTime
## Accrual time and intensity:
##    0.00000 -  < 6.00000: 22
##    6.00000 - <=32.30303: 33
## 
## Formula:
##   maxNumberOfSubjects = 1000 = 6 * 22 + 26.303 * 33
## 
## 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, 6.00, 32.30 
##   Accrual intensity                            : 22, 33 
##   Maximum number of subjects                   : 1000 
## 
## 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                               : 26.30

5.3 Example: how to use accrual time object

getSampleSizeSurvival(accrualTime = accrualTime, pi1 = 0.23, pi2 = 0.3)
## Design plan parameters and output for survival data:
## 
## Design parameters:
##   Critical values                              : 1.96 
##   Significance level                           : 0.0250 
##   Type II error rate                           : 0.2000 
##   Test                                         : one-sided 
## 
## User defined parameters:
##   Assumed treatment rate                       : 0.230 
##   Assumed control rate                         : 0.300 
##   Maximum number of subjects                   : 1000 
##   Accrual time                                 : 6.00, 32.30 
##   Accrual intensity                            : 22, 33 
## 
## Default parameters:
##   Theta H0                                     : 1 
##   Type of computation                          : Schoenfeld 
##   Planned allocation ratio                     : 1 
##   Event time                                   : 12 
##   kappa                                        : 1 
##   Drop-out rate (1)                            : 0.000 
##   Drop-out rate (2)                            : 0.000 
##   Drop-out time                                : 12 
## 
## Sample size and output:
##   Direction upper                              : FALSE 
##   median(1)                                    : 31.8 
##   median(2)                                    : 23.3 
##   lambda(1)                                    : 0.0218 
##   lambda(2)                                    : 0.0297 
##   Hazard ratio                                 : 0.733 
##   Number of events                             : 324.8 
##   Total accrual time                           : 32.30 
##   Follow up time                               : 1.08 
##   Number of events fixed                       : 324.8 
##   Number of subjects fixed                     : 1000.0 
##   Number of subjects fixed (1)                 : 500.0 
##   Number of subjects fixed (2)                 : 500.0 
##   Analysis times                               : 33.38 
##   Study duration                               : 33.38 
##   Critical values (treatment effect scale)     : 0.805 
## 
## Legend:
##   (i): values of treatment arm i

6 Case 6 (not possible)

maxNumberOfSubjects and relative accrual intensity are given, absolute accrual intensity[x], end of accrual and followUpTime shall be calculated

6.1 Example: vector based definition

accrualTime <- getAccrualTime(accrualTime = c(0, 6), 
    accrualIntensity = c(0.22, 0.33), maxNumberOfSubjects = 1000) 
## Warning: The specified accrual time and intensity cannot be supplemented
## automatically with the missing information; therefore further calculations are
## not possible
accrualTime
## Accrual time and intensity:
##   0 - <=6: 0.22
## 
## Formula:
##   maxNumberOfSubjects = 1000 = 6 * 0.22 * c  + (x - 6) * 0.33 * c , where 'x' is the unknown last accrual time and 'c' a constant factor
## 
## Case (#6):
##   'maxNumberOfSubjects' and relative accrual intensity are given, absolute accrual intensity[x], end of accrual* and 'followUpTime'** shall be calculated
##   Example: getAccrualTime(accrualTime = c(0, 6), accrualIntensity = c(0.22, 0.33), maxNumberOfSubjects = 1000)
## 
##   [x] Cannot be calculated.
##   (*) Can be calculated directly.
##   (**) Cannot be calculated directly but with 'getSampleSizeSurvival()' or 'getPowerSurvival()'.
## 
## Details:
## 
## User defined parameters:
##   Accrual time                                 : 0, 6 
##   Accrual intensity                            : 0.22, 0.33 
##   Maximum number of subjects                   : 1000 
## 
## 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        : FALSE

6.2 Example: list based definition

accrualTime <- getAccrualTime(list(
    "0 - <6" = 0.22,
    "6" = 0.33), 
    maxNumberOfSubjects = 1000) 
## Warning: The specified accrual time and intensity cannot be supplemented
## automatically with the missing information; therefore further calculations are
## not possible
accrualTime
## Accrual time and intensity:
##   0 - <=6: 0.22
## 
## Formula:
##   maxNumberOfSubjects = 1000 = 6 * 0.22 * c  + (x - 6) * 0.33 * c , where 'x' is the unknown last accrual time and 'c' a constant factor
## 
## Case (#6):
##   'maxNumberOfSubjects' and relative accrual intensity are given, absolute accrual intensity[x], end of accrual* and 'followUpTime'** shall be calculated
##   Example: getAccrualTime(accrualTime = c(0, 6), accrualIntensity = c(0.22, 0.33), maxNumberOfSubjects = 1000)
## 
##   [x] Cannot be calculated.
##   (*) Can be calculated directly.
##   (**) Cannot be calculated directly but with 'getSampleSizeSurvival()' or 'getPowerSurvival()'.
## 
## Details:
## 
## User defined parameters:
##   Accrual time                                 : 0, 6 
##   Accrual intensity                            : 0.22, 0.33 
##   Maximum number of subjects                   : 1000 
## 
## 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        : FALSE

6.3 Example: how to use accrual time object

Case 6 is not allowed and therefore an error will be shown:

tryCatch({  
    getSampleSizeSurvival(accrualTime = accrualTime, pi1 = 0.23, pi2 = 0.3)
}, error = function(e) {
    print(e$message)
})
## [1] "Illegal argument: the calulation of 'followUpTime' for given 'maxNumberOfSubjects' and relative accrual intensities (< 1) can only be done if end of accrual is defined"

7 Case 7

followUpTime and absolute accrual intensity are given,
end of accrual and maxNumberOfSubjects shall be calculated

7.1 Example: vector based definition

accrualTime <- getAccrualTime(accrualTime = c(0, 6), accrualIntensity = c(22, 33)) 
accrualTime
## Accrual time and intensity:
##   0 - <=6 : 22
##   6 - <=[?]: 33
## 
## Formula:
##   maxNumberOfSubjects = 6 * 22 + (x - 6) * 33, where 'x' is the unknown last accrual time
## 
## Case (#7):
##   'followUpTime' and absolute accrual intensity are given, end of accrual** and 'maxNumberOfSubjects'** shall be calculated
##   Example: getAccrualTime(accrualTime = c(0, 6), accrualIntensity = c(22, 33))
## 
##   (*) Can be calculated directly.
##   (**) Cannot be calculated directly but with 'getSampleSizeSurvival()' or 'getPowerSurvival()'.
## 
## Details:
## 
## User defined parameters:
##   Accrual time                                 : 0, 6 
##   Accrual intensity                            : 22, 33 
## 
## Default parameters: not available
## 
## Generated parameters:
##   End of accrual is user defined               : FALSE 
##   Follow-up time must be user defined          : TRUE 
##   Max number of subjects is user defined       : FALSE 
##   Max number of subjects can be calculated directly : FALSE 
##   Absolute accrual intensity is enabled        : TRUE

7.2 Example: list based definition

accrualTime <- getAccrualTime(list(
    "0 - <6" = 22,
    "6" = 33)) 
accrualTime
## Accrual time and intensity:
##   0 - <=6 : 22
##   6 - <=[?]: 33
## 
## Formula:
##   maxNumberOfSubjects = 6 * 22 + (x - 6) * 33, where 'x' is the unknown last accrual time
## 
## Case (#7):
##   'followUpTime' and absolute accrual intensity are given, end of accrual** and 'maxNumberOfSubjects'** shall be calculated
##   Example: getAccrualTime(accrualTime = c(0, 6), accrualIntensity = c(22, 33))
## 
##   (*) Can be calculated directly.
##   (**) Cannot be calculated directly but with 'getSampleSizeSurvival()' or 'getPowerSurvival()'.
## 
## Details:
## 
## User defined parameters:
##   Accrual time                                 : 0, 6 
##   Accrual intensity                            : 22, 33 
## 
## Default parameters: not available
## 
## Generated parameters:
##   End of accrual is user defined               : FALSE 
##   Follow-up time must be user defined          : TRUE 
##   Max number of subjects is user defined       : FALSE 
##   Max number of subjects can be calculated directly : FALSE 
##   Absolute accrual intensity is enabled        : TRUE

7.3 Example: how to use accrual time object

getSampleSizeSurvival(accrualTime = accrualTime, 
    pi1 = 0.4, pi2 = 0.2, followUpTime = 6)
## Design plan parameters and output for survival data:
## 
## Design parameters:
##   Critical values                              : 1.96 
##   Significance level                           : 0.0250 
##   Type II error rate                           : 0.2000 
##   Test                                         : one-sided 
## 
## User defined parameters:
##   Assumed treatment rate                       : 0.400 
##   Accrual intensity                            : 22, 33 
##   Follow up time                               : 6.00 
## 
## Default parameters:
##   Theta H0                                     : 1 
##   Type of computation                          : Schoenfeld 
##   Assumed control rate                         : 0.200 
##   Planned allocation ratio                     : 1 
##   Event time                                   : 12 
##   kappa                                        : 1 
##   Drop-out rate (1)                            : 0.000 
##   Drop-out rate (2)                            : 0.000 
##   Drop-out time                                : 12 
## 
## Sample size and output:
##   Direction upper                              : TRUE 
##   median(1)                                    : 16.3 
##   median(2)                                    : 37.3 
##   lambda(1)                                    : 0.0426 
##   lambda(2)                                    : 0.0186 
##   Hazard ratio                                 : 2.289 
##   Maximum number of subjects                   : 186.1 
##   Number of events                             : 45.8 
##   Accrual time                                 : 6.00, 7.64 
##   Total accrual time                           : 7.64 
##   Number of events fixed                       : 45.8 
##   Number of subjects fixed                     : 186.1 
##   Number of subjects fixed (1)                 : 93.0 
##   Number of subjects fixed (2)                 : 93.0 
##   Analysis times                               : 13.64 
##   Study duration                               : 13.64 
##   Critical values (treatment effect scale)     : 1.785 
## 
## Legend:
##   (i): values of treatment arm i

8 Case 8 (not possible)

followUpTime and relative accrual intensity are given,
absolute accrual intensity[x], end of accrual and maxNumberOfSubjects shall be calculated

8.1 Example: vector based definition

accrualTime <- getAccrualTime(accrualTime = c(0, 6), accrualIntensity = c(0.22, 0.33)) 
## Warning: The specified accrual time and intensity cannot be supplemented
## automatically with the missing information; therefore further calculations are
## not possible
accrualTime
## Accrual time and intensity:
##   0 - <=6 : 0.22
##   6 - <=[?]: 0.33
## 
## Formula:
##   maxNumberOfSubjects = 6 * 0.22 * c  + (x - 6) * 0.33 * c , where 'x' is the unknown last accrual time and 'c' a constant factor
## 
## Case (#8):
##   'followUpTime' and relative accrual intensity are given, absolute accrual intensity[x], end of accrual and 'maxNumberOfSubjects' shall be calculated
##   Example: getAccrualTime(accrualTime = c(0, 6), accrualIntensity = c(0.22, 0.33))
## 
##   [x] Cannot be calculated.
##   (*) Can be calculated directly.
##   (**) Cannot be calculated directly but with 'getSampleSizeSurvival()' or 'getPowerSurvival()'.
## 
## Details:
## 
## User defined parameters:
##   Accrual time                                 : 0, 6 
##   Accrual intensity                            : 0.22, 0.33 
## 
## Default parameters: not available
## 
## Generated parameters:
##   End of accrual is user defined               : FALSE 
##   Follow-up time must be user defined          : TRUE 
##   Max number of subjects is user defined       : FALSE 
##   Max number of subjects can be calculated directly : FALSE 
##   Absolute accrual intensity is enabled        : FALSE

8.2 Example: list based definition

accrualTime <- getAccrualTime(list(
    "0 - <6" = 0.22,
    "6" = 0.33)) 
## Warning: The specified accrual time and intensity cannot be supplemented
## automatically with the missing information; therefore further calculations are
## not possible
accrualTime
## Accrual time and intensity:
##   0 - <=6 : 0.22
##   6 - <=[?]: 0.33
## 
## Formula:
##   maxNumberOfSubjects = 6 * 0.22 * c  + (x - 6) * 0.33 * c , where 'x' is the unknown last accrual time and 'c' a constant factor
## 
## Case (#8):
##   'followUpTime' and relative accrual intensity are given, absolute accrual intensity[x], end of accrual and 'maxNumberOfSubjects' shall be calculated
##   Example: getAccrualTime(accrualTime = c(0, 6), accrualIntensity = c(0.22, 0.33))
## 
##   [x] Cannot be calculated.
##   (*) Can be calculated directly.
##   (**) Cannot be calculated directly but with 'getSampleSizeSurvival()' or 'getPowerSurvival()'.
## 
## Details:
## 
## User defined parameters:
##   Accrual time                                 : 0, 6 
##   Accrual intensity                            : 0.22, 0.33 
## 
## Default parameters: not available
## 
## Generated parameters:
##   End of accrual is user defined               : FALSE 
##   Follow-up time must be user defined          : TRUE 
##   Max number of subjects is user defined       : FALSE 
##   Max number of subjects can be calculated directly : FALSE 
##   Absolute accrual intensity is enabled        : FALSE

8.3 Example: how to use accrual time object

Case 8 is not allowed and therefore an error will be shown:

tryCatch({  
    getSampleSizeSurvival(accrualTime = accrualTime, pi1 = 0.23, pi2 = 0.3, followUpTime = 6)
}, error = function(e) {
    print(e$message)
})
## [1] "Illegal argument: the calulation of 'maxNumberOfSubjects' for given 'followUpTime' and relative accrual intensities (< 1) can only be done if end of accrual is defined"

9 How to show accrual time details

You can use a sample size or power object as argument for function getAccrualTime:

sampleSize <- getSampleSizeSurvival(accrualTime = c(0, 6), accrualIntensity = c(22, 53), 
    lambda2 = 0.05, hazardRatio = 0.8, followUpTime = 6)
sampleSize
## Design plan parameters and output for survival data:
## 
## Design parameters:
##   Critical values                              : 1.96 
##   Significance level                           : 0.0250 
##   Type II error rate                           : 0.2000 
##   Test                                         : one-sided 
## 
## User defined parameters:
##   lambda(2)                                    : 0.050 
##   Hazard ratio                                 : 0.800 
##   Accrual intensity                            : 22, 53 
##   Follow up time                               : 6.00 
## 
## Default parameters:
##   Theta H0                                     : 1 
##   Type of computation                          : Schoenfeld 
##   Planned allocation ratio                     : 1 
##   kappa                                        : 1 
##   Piecewise survival times                     : 0.00 
##   Drop-out rate (1)                            : 0.000 
##   Drop-out rate (2)                            : 0.000 
##   Drop-out time                                : 12 
## 
## Sample size and output:
##   Direction upper                              : FALSE 
##   median(1)                                    : 17.3 
##   median(2)                                    : 13.9 
##   lambda(1)                                    : 0.040 
##   Maximum number of subjects                   : 1205.9 
##   Number of events                             : 630.5 
##   Accrual time                                 : 6.00, 26.26 
##   Total accrual time                           : 26.26 
##   Number of events fixed                       : 630.5 
##   Number of subjects fixed                     : 1205.9 
##   Number of subjects fixed (1)                 : 602.9 
##   Number of subjects fixed (2)                 : 602.9 
##   Analysis times                               : 32.26 
##   Study duration                               : 32.26 
##   Critical values (treatment effect scale)     : 0.855 
## 
## Legend:
##   (i): values of treatment arm i
accrualTime <- getAccrualTime(sampleSize)
accrualTime
## Accrual time and intensity:
##   0 - <=6 : 22
##   6 - <=[?]: 53
## 
## Formula:
##   maxNumberOfSubjects = 6 * 22 + (x - 6) * 53, where 'x' is the unknown last accrual time
## 
## Case (#7):
##   'followUpTime' and absolute accrual intensity are given, end of accrual** and 'maxNumberOfSubjects'** shall be calculated
##   Example: getAccrualTime(accrualTime = c(0, 6), accrualIntensity = c(22, 33))
## 
##   (*) Can be calculated directly.
##   (**) Cannot be calculated directly but with 'getSampleSizeSurvival()' or 'getPowerSurvival()'.
## 
## Details:
## 
## User defined parameters:
##   Accrual time                                 : 0, 6 
##   Accrual intensity                            : 22, 53 
## 
## Default parameters: not available
## 
## Generated parameters:
##   End of accrual is user defined               : FALSE 
##   Follow-up time must be user defined          : TRUE 
##   Max number of subjects is user defined       : FALSE 
##   Max number of subjects can be calculated directly : FALSE 
##   Absolute accrual intensity is enabled        : TRUE

System: rpact 3.1.1, R version 4.1.0 (2021-05-18), platform: x86_64-w64-mingw32

To cite R in publications use:

R Core Team (2021). 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 (2021). rpact: Confirmatory Adaptive Clinical Trial Design and Analysis. R package version 3.1.1. https://www.rpact.org


PDF file

 

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