Group sequential design using MaxCombo test under non-proportional hazards
Source:R/gs_design_combo.R
gs_design_combo.Rd
Group sequential design using MaxCombo test under non-proportional hazards
Usage
gs_design_combo(
enrollRates = tibble(Stratum = "All", duration = 12, rate = 500/12),
failRates = tibble(Stratum = "All", duration = c(4, 100), failRate = log(2)/15, hr =
c(1, 0.6), dropoutRate = 0.001),
fh_test = rbind(data.frame(rho = 0, gamma = 0, tau = -1, test = 1, Analysis = 1:3,
analysisTimes = c(12, 24, 36)), data.frame(rho = c(0, 0.5), gamma = 0.5, tau = -1,
test = 2:3, Analysis = 3, analysisTimes = 36)),
ratio = 1,
alpha = 0.025,
beta = 0.2,
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),
n_upper_bound = 1000,
...
)
Arguments
- enrollRates
enrollment rates
- failRates
failure and dropout rates
- fh_test
a data frame to summarize the test in each analysis. Refer examples for its data structure.
- ratio
Experimental:Control randomization ratio (not yet implemented)
- alpha
One-sided Type I error
- beta
Type II error
- binding
indicator of whether futility bound is binding; default of FALSE is recommended
- upper
Function to compute upper bound
- upar
Parameter passed to
upper()
- lower
Function to compute lower bound
- lpar
Parameter 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.- n_upper_bound
a numeric value of upper limit of sample size
- ...
additional parameters transfer to
mvtnorm::pmvnorm
Examples
# The example is slow to run
library(dplyr)
library(mvtnorm)
library(gsDesign)
library(tibble)
enrollRates <- tibble(
Stratum = "All",
duration = 12,
rate = 500/12)
failRates <- tibble(
Stratum = "All",
duration = c(4, 100),
failRate = log(2) / 15, # median survival 15 month
hr = c(1, .6),
dropoutRate = 0.001)
fh_test <- rbind(
data.frame(rho = 0, gamma = 0, tau = -1,
test = 1, Analysis = 1:3, analysisTimes = c(12, 24, 36)),
data.frame(rho = c(0, 0.5), gamma = 0.5, tau = -1,
test = 2:3, Analysis = 3, analysisTimes = 36))
x <- gsSurv(
k = 3 ,
test.type = 4 ,
alpha = 0.025 ,
beta = 0.2 ,
astar = 0 ,
timing = 1,
sfu = sfLDOF ,
sfupar = 0,
sfl = sfLDOF ,
sflpar = 0,
lambdaC = 0.1,
hr = 0.6,
hr0 = 1,
eta = 0.01,
gamma = 10,
R = 12,
S = NULL,
T = 36,
minfup = 24,
ratio = 1)
# -------------------------#
# example 1 #
# ------------------------ #
if (FALSE) {
# User defined boundary
gs_design_combo(
enrollRates,
failRates,
fh_test,
alpha = 0.025, beta = 0.2,
ratio = 1,
binding = FALSE,
upar = x$upper$bound,
lpar = x$lower$bound)
}
# -------------------------#
# example 2 #
# ------------------------ #
# Boundary derived by spending function
gs_design_combo(
enrollRates,
failRates,
fh_test,
alpha = 0.025,
beta = 0.2,
ratio = 1,
binding = FALSE,
upper = gs_spending_combo,
upar = list(sf = gsDesign::sfLDOF, total_spend = 0.025), # alpha spending
lower = gs_spending_combo,
lpar = list(sf = gsDesign::sfLDOF, total_spend = 0.2), # beta spending
)
#> The AHR reported in the `analysis` table is under the log-rank test.
#> $enrollRates
#> # A tibble: 1 × 3
#> Stratum duration rate
#> <chr> <dbl> <dbl>
#> 1 All 12 25.1
#>
#> $failRates
#> # A tibble: 2 × 5
#> Stratum duration failRate hr dropoutRate
#> <chr> <dbl> <dbl> <dbl> <dbl>
#> 1 All 4 0.0462 1 0.001
#> 2 All 100 0.0462 0.6 0.001
#>
#> $bounds
#> Analysis Bound Probability Probability0 Z Nominal p
#> 1 1 Upper 2.088476e-08 3.299865e-10 6.1753973 3.299865e-10
#> 2 1 Lower 3.269581e-04 0.000000e+00 -2.7160104 9.966963e-01
#> 3 2 Upper 2.203836e-01 2.565830e-03 2.7986508 2.565830e-03
#> 4 2 Lower 8.468455e-02 0.000000e+00 0.6533392 2.567688e-01
#> 5 3 Upper 7.999980e-01 2.492783e-02 2.0975425 1.797279e-02
#> 6 3 Lower 2.000048e-01 0.000000e+00 2.0975425 1.797279e-02
#>
#> $analysis
#> Analysis Time N Events EF AHR
#> 1 1 12 301.3099 64.71791 0.3241690 0.8418858
#> 2 2 24 301.3099 148.41524 0.7434051 0.7164215
#> 3 3 36 301.3099 199.64248 1.0000000 0.6831740
#>
#> attr(,"class")
#> [1] "combo" "gs_design" "list"