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 = "logrank",
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 defined by |
fail_rate |
Failure and dropout rates defined by |
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. |
info_frac |
Targeted information fraction for analyses. See details. |
info_scale |
Information scale for calculation. Options are:
|
analysis_time |
Targeted calendar timing of analyses. See details. |
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, which can be set up similarly as |
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); normally not changed by the user. |
interval |
An interval presumed to include the times at which
expected event count is equal to targeted event.
Normally, this can be ignored by the user as it is set to |
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 = list(method = "mb", param = list(tau = Inf, w_max = 2)),
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 = list(method = "mb", param = list(tau = Inf, w_max = 2)),
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 = list(method = "mb", param = list(tau = Inf, w_max = 2)),
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.