View source: R/gs_design_wlr.R
gs_design_wlr | R Documentation |
Group sequential design using weighted log-rank test under non-proportional hazards
gs_design_wlr(
enroll_rate = define_enroll_rate(duration = c(2, 2, 10), rate = c(3, 6, 9)),
fail_rate = tibble(stratum = "All", duration = c(3, 100), fail_rate = log(2)/c(9, 18),
hr = c(0.9, 0.6), dropout_rate = rep(0.001, 2)),
weight = wlr_weight_fh,
approx = "asymptotic",
alpha = 0.025,
beta = 0.1,
ratio = 1,
info_frac = NULL,
info_scale = c("h0_h1_info", "h0_info", "h1_info"),
analysis_time = 36,
binding = FALSE,
upper = gs_spending_bound,
upar = list(sf = gsDesign::sfLDOF, total_spend = alpha),
lower = gs_spending_bound,
lpar = list(sf = gsDesign::sfLDOF, total_spend = beta),
test_upper = TRUE,
test_lower = TRUE,
h1_spending = TRUE,
r = 18,
tol = 1e-06,
interval = c(0.01, 1000)
)
enroll_rate |
Enrollment rates. |
fail_rate |
Failure and dropout rates. |
weight |
Weight of weighted log rank test:
|
approx |
Approximate estimation method for Z statistics.
|
alpha |
One-sided Type I error. |
beta |
Type II error. |
ratio |
Experimental:Control randomization ratio (not yet implemented). |
info_frac |
Targeted information fraction at each analysis. |
info_scale |
Information scale for calculation. Options are:
|
analysis_time |
Minimum time of analysis. |
binding |
Indicator of whether futility bound is binding;
default of |
upper |
Function to compute upper bound. |
upar |
Parameters passed to |
lower |
Function to compute lower bound. |
lpar |
Parameters passed to |
test_upper |
Indicator of which analyses should include an upper
(efficacy) bound; single value of |
test_lower |
Indicator of which analyses should include an lower bound;
single value of |
h1_spending |
Indicator that lower bound to be set by spending
under alternate hypothesis (input |
r |
Integer value controlling grid for numerical integration as in
Jennison and Turnbull (2000); default is 18, range is 1 to 80.
Larger values provide larger number of grid points and greater accuracy.
Normally, |
tol |
Tolerance parameter for boundary convergence (on Z-scale). |
interval |
An interval that is presumed to include the time at which expected event count is equal to targeted event. |
A list with input parameters, enrollment rate, analysis, and bound.
The contents of this section are shown in PDF user manual only.
library(dplyr)
library(mvtnorm)
library(gsDesign)
library(gsDesign2)
# set enrollment rates
enroll_rate <- define_enroll_rate(duration = 12, rate = 1)
# set failure rates
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
)
# Example 1 ----
# Information fraction driven design
gs_design_wlr(
enroll_rate = enroll_rate,
fail_rate = fail_rate,
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),
analysis_time = 36,
info_frac = c(0.6, 1)
)
# Example 2 ----
# Calendar time driven design
gs_design_wlr(
enroll_rate = enroll_rate,
fail_rate = fail_rate,
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),
analysis_time = c(24, 36),
info_frac = NULL
)
# Example 3 ----
# Both calendar time and information fraction driven design
gs_design_wlr(
enroll_rate = enroll_rate,
fail_rate = fail_rate,
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),
analysis_time = c(24, 36),
info_frac = c(0.6, 1)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.