| gs_design_rd | R Documentation |
Group sequential design using average hazard ratio under non-proportional hazards
gs_design_rd(
p_c = tibble(Stratum = "All", Rate = 0.2),
p_e = tibble(Stratum = "All", Rate = 0.15),
IF = 1:3/3,
rd0 = 0,
alpha = 0.025,
beta = 0.1,
ratio = 1,
stratum_prev = NULL,
weight = c("un-stratified", "ss", "invar"),
upper = gs_b,
lower = gs_b,
upar = gsDesign(k = 3, test.type = 1, sfu = sfLDOF, sfupar = NULL)$upper$bound,
lpar = c(qnorm(0.1), rep(-Inf, 2)),
test_upper = TRUE,
test_lower = TRUE,
info_scale = c(0, 1, 2),
binding = FALSE,
r = 18,
tol = 1e-06,
h1_spending = FALSE
)
p_c |
rate at the control group |
p_e |
rate at the experimental group |
IF |
statistical information fraction |
rd0 |
treatment effect under super-superiority designs, the default is 0 |
alpha |
One-sided Type I error |
beta |
Type II error |
ratio |
Experimental:Control randomization ratio (not yet implemented) |
stratum_prev |
randomization ratio of different stratum.
If it is un-stratified design then |
weight |
the weighting scheme for stratified population |
upper |
Function to compute upper bound |
lower |
Function to compute lower bound |
upar |
Parameter passed to |
lpar |
Parameter passed to |
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 |
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_scale |
the information scale for calculation |
binding |
indicator of whether futility bound is binding; default of FALSE is recommended |
r |
Integer, at least 2; default of 18 recommended by Jennison and Turnbull |
tol |
Tolerance parameter for boundary convergence (on Z-scale) |
h1_spending |
Indicator that lower bound to be set by spending under alternate hypothesis (input |
Need to be added
a tibble with columns Analysis, Bound, Z, Probability, theta, Time, AHR, Events
library(tibble)
library(gsDesign)
# ----------------- #
# example 1 #
#------------------ #
# un-stratified group sequential design
gs_design_rd(
p_c = tibble(Stratum = "All", Rate = .2),
p_e = tibble(Stratum = "All", Rate = .15),
IF = c(0.7, 1),
rd0 = 0,
alpha = .025,
beta = .1,
ratio = 1,
stratum_prev = NULL,
weight = "un-stratified",
upper = gs_b,
lower = gs_b,
upar = gsDesign(k = 3, test.type = 1, sfu = sfLDOF, sfupar = NULL)$upper$bound,
lpar = c(qnorm(.1), rep(-Inf, 2))
)
# ----------------- #
# example 2 #
# ----------------- #
# stratified group sequential design
gs_design_rd(
p_c = tibble(Stratum = c("biomarker positive", "biomarker negative"), Rate = c(.2, .25)),
p_e = tibble(Stratum = c("biomarker positive", "biomarker negative"), Rate = c(.15,.22)),
IF = c(0.7, 1),
rd0 = 0,
alpha = .025,
beta = .1,
ratio = 1,
stratum_prev = tibble(Stratum = c("biomarker positive", "biomarker negative"), prevalence = c(.4, .6)),
weight = "ss",
upper = gs_spending_bound,lower = gs_b,
upar = list(sf = gsDesign::sfLDOF, total_spend = 0.025, param = NULL, timing = NULL),
lpar = rep(-Inf, 2)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.