Group sequential design using weighted log-rank test under non-proportional hazards
Source:R/gs_design_wlr.R
gs_design_wlr.Rd
Group sequential design using weighted log-rank test under non-proportional hazards
Usage
gs_design_wlr(
enrollRates = tibble(Stratum = "All", duration = c(2, 2, 10), rate = c(3, 6, 9)),
failRates = tibble(Stratum = "All", duration = c(3, 100), failRate = log(2)/c(9, 18),
hr = c(0.9, 0.6), dropoutRate = rep(0.001, 2)),
weight = wlr_weight_fh,
approx = "asymptotic",
alpha = 0.025,
beta = 0.1,
ratio = 1,
IF = NULL,
info_scale = c(0, 1, 2),
analysisTimes = 36,
binding = FALSE,
upper = gs_b,
upar = gsDesign(k = 3, test.type = 1, n.I = c(0.25, 0.75, 1), sfu = sfLDOF, sfupar =
NULL)$upper$bound,
lower = gs_b,
lpar = c(qnorm(0.1), -Inf, -Inf),
test_upper = TRUE,
test_lower = TRUE,
h1_spending = TRUE,
r = 18,
tol = 1e-06
)
Arguments
- enrollRates
enrollment rates
- failRates
failure and dropout rates
- weight
weight of weighted log rank test
"1"
=unweighted,"n"
=Gehan-Breslow,"sqrtN"
=Tarone-Ware,"FH_p[a]_q[b]"
= Fleming-Harrington with p=a and q=b
- approx
approximate estimation method for Z statistics
"event driven"
= only work under proportional hazard model with log rank test"asymptotic"
- alpha
One-sided Type I error
- beta
Type II error
- ratio
Experimental:Control randomization ratio (not yet implemented)
- IF
Targeted information fraction at each analysis
- info_scale
the information scale for calculation
- analysisTimes
Minimum time of analysis
- 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()
- test_upper
indicator of which analyses should include an upper (efficacy) bound; single value of TRUE (default) indicates all analyses; otherwise, a logical vector of the same length as
info
should indicate which analyses will have an efficacy bound- test_lower
indicator of which analyses should include an lower bound; single value of TRUE (default) indicates all analyses; single value FALSE indicated no lower bound; otherwise, a logical vector of the same length as
info
should indicate which analyses will have a lower bound- h1_spending
Indicator that lower bound to be set by spending under alternate hypothesis (input
failRates
) if spending is used for lower bound- r
Integer, at least 2; default of 18 recommended by Jennison and Turnbull
- tol
Tolerance parameter for boundary convergence (on Z-scale)
Examples
library(dplyr)
library(mvtnorm)
library(gsDesign)
library(tibble)
library(gsDesign2)
# set enrollment rates
enrollRates <- tibble(Stratum = "All", duration = 12, rate = 500/12)
# set failure rates
failRates <- tibble(
Stratum = "All",
duration = c(4, 100),
failRate = log(2) / 15, # median survival 15 month
hr = c(1, .6),
dropoutRate = 0.001)
# -------------------------#
# example 1 #
# ------------------------ #
# Boundary is fixed
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)
gs_design_wlr(
enrollRates = enrollRates,
failRates = failRates,
ratio = 1,
alpha = 0.025, beta = 0.2,
weight = function(x, arm0, arm1){wlr_weight_fh(x, arm0, arm1, rho = 0, gamma = 0.5)},
upper = gs_b,
upar = x$upper$bound,
lower = gs_b,
lpar = x$lower$bound,
analysisTimes = c(12, 24, 36))
#> $enrollRates
#> # A tibble: 1 × 3
#> Stratum duration rate
#> <chr> <dbl> <dbl>
#> 1 All 12 30.6
#>
#> $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
#> # A tibble: 6 × 7
#> Analysis Bound Probability Probability0 Z `~HR at bound` `Nominal p`
#> <int> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 1 Upper 0.00366 0.000108 3.71 0.434 0.000104
#> 2 1 Lower 0.105 0.407 -0.236 1.05 0.593
#> 3 2 Upper 0.504 0.00589 2.51 0.688 0.00601
#> 4 2 Lower 0.158 0.894 1.17 0.840 0.121
#> 5 3 Upper 0.800 0.0195 1.99 0.775 0.0231
#> 6 3 Lower 0.200 0.981 1.99 0.775 0.0231
#>
#> $analysis
#> # A tibble: 3 × 9
#> Analysis Time N Events AHR theta info info0 IF
#> <int> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 1 12 368. 78.9 0.781 0.626 2.65 2.66 0.133
#> 2 2 24 368. 181. 0.666 0.765 11.3 11.6 0.565
#> 3 3 36 368. 244. 0.639 0.732 20.0 20.9 1
#>
#> attr(,"class")
#> [1] "wlr" "gs_design" "list"
# -------------------------#
# example 2 #
# ------------------------ #
# Boundary derived by spending function
gs_design_wlr(
enrollRates = enrollRates,
failRates = failRates,
ratio = 1,
alpha = 0.025, beta = 0.2,
weight = function(x, arm0, arm1){wlr_weight_fh(x, arm0, arm1, rho = 0, gamma = 0.5)},
upper = gs_spending_bound,
upar = list(sf = gsDesign::sfLDOF, total_spend = 0.025),
lower = gs_spending_bound,
lpar = list(sf = gsDesign::sfLDOF, total_spend = 0.2),
analysisTimes = c(12, 24, 36))
#> $enrollRates
#> # A tibble: 1 × 3
#> Stratum duration rate
#> <chr> <dbl> <dbl>
#> 1 All 12 24.0
#>
#> $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
#> # A tibble: 6 × 7
#> Analysis Bound Probability Probability0 Z `~HR at bound` `Nominal p`
#> <int> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 1 Upper 0.0000000732 3.65e-10 6.18 0.208 3.30e-10
#> 2 1 Lower 0.000441 7.68e- 3 -2.43 1.85 9.92e- 1
#> 3 2 Upper 0.301 2.57e- 3 2.80 0.625 2.57e- 3
#> 4 2 Lower 0.0882 8.23e- 1 0.925 0.856 1.77e- 1
#> 5 3 Upper 0.800 2.22e- 2 1.97 0.751 2.42e- 2
#> 6 3 Lower 0.200 9.78e- 1 1.97 0.751 2.42e- 2
#>
#> $analysis
#> # A tibble: 3 × 9
#> Analysis Time N Events AHR theta info info0 IF
#> <int> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 1 12 288. 61.9 0.781 0.626 2.08 2.09 0.133
#> 2 2 24 288. 142. 0.666 0.765 8.86 9.07 0.565
#> 3 3 36 288. 191. 0.639 0.732 15.7 16.4 1
#>
#> attr(,"class")
#> [1] "wlr" "gs_design" "list"