Free examples and use-cases:   rpact vignettes
rpact: Confirmatory Adaptive Clinical Trial Design and Analysis

Summary

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

Load the rpact package

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

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
)
kable(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.00, 6.00, 30.00
  • Accrual intensity: 22.0, 33.0
  • Maximum number of subjects: 924

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
)
kable(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.00, 6.00, 30.00
  • Accrual intensity: 22.0, 33.0
  • Maximum number of subjects: 924

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

kable(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.00, 30.00
  • Accrual intensity: 22.0, 33.0

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.00

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
  • Number of subjects fixed (1): 462
  • Number of subjects fixed (2): 462
  • 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
)
kable(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.00, 6.00, 30.00
  • Accrual intensity (relative): 0.22, 0.33
  • Maximum number of subjects: 1000

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
)
kable(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.00, 6.00, 30.00
  • Accrual intensity (relative): 0.22, 0.33
  • Maximum number of subjects: 1000

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

kable(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, 30.00

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.00

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
  • Number of subjects fixed (1): 500
  • Number of subjects fixed (2): 500
  • 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
))
kable(accrualTime)

Accrual time and intensity

  • 0 - < 6: 22
  • 6 - <=30: 33

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.00, 6.00, 30.00
  • Accrual intensity: 22.0, 33.0

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
  • Remaining time: 24.00

3.3 Example: how to use accrual time object

kable(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.00, 30.00
  • Accrual intensity: 22.0, 33.0

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.00

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
  • Number of events: 324.8
  • Total accrual time: 30.00
  • Follow up time: 3.66
  • Number of events fixed: 324.8