Group sequential design power using MaxCombo test under non-proportional hazards
Source:R/gs_power_combo.R
gs_power_combo.Rd
Group sequential design power using MaxCombo test under non-proportional hazards
Usage
gs_power_combo(
enroll_rate = define_enroll_rate(duration = 12, rate = 500/12),
fail_rate = define_fail_rate(duration = c(4, 100), fail_rate = log(2)/15, hr = c(1,
0.6), dropout_rate = 0.001),
fh_test = rbind(data.frame(rho = 0, gamma = 0, tau = -1, test = 1, analysis = 1:3,
analysis_time = c(12, 24, 36)), data.frame(rho = c(0, 0.5), gamma = 0.5, tau = -1,
test = 2:3, analysis = 3, analysis_time = 36)),
ratio = 1,
binding = FALSE,
upper = gs_b,
upar = c(3, 2, 1),
lower = gs_b,
lpar = c(-1, 0, 1),
algorithm = mvtnorm::GenzBretz(maxpts = 1e+05, abseps = 1e-05),
...
)
Arguments
- enroll_rate
Enrollment rates.
- fail_rate
Failure and dropout rates.
- fh_test
A data frame to summarize the test in each analysis. See examples for its data structure.
- ratio
Experimental:Control randomization ratio (not yet implemented).
- binding
Indicator of whether futility bound is binding; default of
FALSE
is recommended.- upper
Function to compute upper bound.
- upar
Parameters passed to
upper
.- lower
Function to compute lower bound.
- lpar
Parameters passed to
lower
.- algorithm
an object of class
GenzBretz
,Miwa
orTVPACK
specifying both the algorithm to be used as well as the associated hyper parameters.- ...
Additional parameters passed to mvtnorm::pmvnorm.
Examples
library(dplyr)
library(mvtnorm)
library(gsDesign)
library(gsDesign2)
enroll_rate <- define_enroll_rate(
duration = 12,
rate = 500 / 12
)
fail_rate <- define_fail_rate(
duration = c(4, 100),
fail_rate = log(2) / 15, # median survival 15 month
hr = c(1, .6),
dropout_rate = 0.001
)
fh_test <- rbind(
data.frame(rho = 0, gamma = 0, tau = -1, test = 1, analysis = 1:3, analysis_time = c(12, 24, 36)),
data.frame(rho = c(0, 0.5), gamma = 0.5, tau = -1, test = 2:3, analysis = 3, analysis_time = 36)
)
# Example 1 ----
# Minimal Information Fraction derived bound
# \donttest{
gs_power_combo(
enroll_rate = enroll_rate,
fail_rate = fail_rate,
fh_test = fh_test,
upper = gs_spending_combo,
upar = list(sf = gsDesign::sfLDOF, total_spend = 0.025),
lower = gs_spending_combo,
lpar = list(sf = gsDesign::sfLDOF, total_spend = 0.2)
)
#> $enroll_rate
#> # A tibble: 1 × 3
#> stratum duration rate
#> <chr> <dbl> <dbl>
#> 1 All 12 41.7
#>
#> $fail_rate
#> # A tibble: 2 × 5
#> stratum duration fail_rate dropout_rate hr
#> <chr> <dbl> <dbl> <dbl> <dbl>
#> 1 All 4 0.0462 0.001 1
#> 2 All 100 0.0462 0.001 0.6
#>
#> $bound
#> analysis bound probability probability0 z nominal p
#> 1 1 upper 6.329275e-08 3.299865e-10 6.175397 3.299865e-10
#> 2 1 lower 3.269613e-04 0.000000e+00 -2.516527 9.940741e-01
#> 3 2 upper 4.260145e-01 2.565830e-03 2.798651 2.565830e-03
#> 4 2 lower 8.468664e-02 0.000000e+00 1.237721 1.079098e-01
#> 5 3 upper 9.015980e-01 2.500822e-02 2.097499 1.797473e-02
#> 6 3 lower 2.000038e-01 0.000000e+00 2.958921 1.543591e-03
#>
#> $analysis
#> analysis time n event event_frac ahr
#> 1 1 12 500.0001 107.3943 0.3241690 0.8418858
#> 2 2 24 500.0001 246.2834 0.7434051 0.7164215
#> 3 3 36 500.0001 331.2910 1.0000000 0.6831740
#>
#> attr(,"class")
#> [1] "non_binding" "combo" "gs_design" "list"
# }