View source: R/gs_design_ahr.R
gs_design_ahr | R Documentation |
Group sequential design using average hazard ratio under non-proportional hazards
gs_design_ahr( 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)), ratio = 1, alpha = 0.025, beta = 0.1, IF = NULL, analysisTimes = 36, binding = FALSE, upper = gs_b, upar = gsDesign::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), h1_spending = TRUE, test_upper = TRUE, test_lower = TRUE, info_scale = c(0, 1, 2), r = 18, tol = 1e-06 )
enrollRates |
enrollment rates |
failRates |
failure and dropout rates |
ratio |
Experimental:Control randomization ratio (not yet implemented) |
alpha |
One-sided Type I error |
beta |
Type II error |
IF |
Targeted information fraction at each analysis |
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 |
lower |
Function to compute lower bound |
lpar |
Parameter passed to |
h1_spending |
Indicator that lower bound to be set by spending under alternate hypothesis (input |
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 |
r |
Integer, at least 2; default of 18 recommended by Jennison and Turnbull |
tol |
Tolerance parameter for boundary convergence (on Z-scale) |
Need to be added
a tibble
with columns Analysis, Bound, Z, Probability, theta, Time, AHR, Events
The contents of this section are shown in PDF user manual only.
library(gsDesign) library(gsDesign2) library(dplyr) # call with defaults gs_design_ahr() # Single analysis gs_design_ahr(analysisTimes = 40) # Multiple analysisTimes gs_design_ahr(analysisTimes = c(12, 24, 36)) # Specified information fraction gs_design_ahr(IF = c(.25, .75, 1), analysisTimes = 36) # multiple analysis times & IF # driven by times gs_design_ahr(IF = c(.25, .75, 1), analysisTimes = c(12, 25, 36)) # driven by IF gs_design_ahr(IF = c(1/3, .8, 1), analysisTimes = c(12, 25, 36)) # 2-sided symmetric design with O'Brien-Fleming spending gs_design_ahr( analysisTimes = c(12, 24, 36), binding = TRUE, upper = gs_spending_bound, upar = list(sf = gsDesign::sfLDOF, total_spend = 0.025, param = NULL, timing = NULL), lower = gs_spending_bound, lpar = list(sf = gsDesign::sfLDOF, total_spend = 0.025, param = NULL, timing = NULL), h1_spending = FALSE) # 2-sided asymmetric design with O'Brien-Fleming upper spending # Pocock lower spending under H1 (NPH) gs_design_ahr( analysisTimes = c(12, 24, 36), binding = TRUE, upper = gs_spending_bound, upar = list(sf = gsDesign::sfLDOF, total_spend = 0.025, param = NULL, timing = NULL), lower = gs_spending_bound, lpar = list(sf = gsDesign::sfLDPocock, total_spend = 0.1, param = NULL, timing = NULL), h1_spending = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.