gs_design_ahr {gsDesign2} | R Documentation |
Group sequential design using average hazard ratio under non-proportional hazards
Description
Group sequential design using average hazard ratio under non-proportional hazards
Usage
gs_design_ahr(
enroll_rate = define_enroll_rate(duration = c(2, 2, 10), rate = c(3, 6, 9)),
fail_rate = define_fail_rate(duration = c(3, 100), fail_rate = log(2)/c(9, 18), hr =
c(0.9, 0.6), dropout_rate = 0.001),
alpha = 0.025,
beta = 0.1,
info_frac = NULL,
analysis_time = 36,
ratio = 1,
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("h0_h1_info", "h0_info", "h1_info"),
r = 18,
tol = 1e-06,
interval = c(0.01, 1000)
)
Arguments
enroll_rate |
Enrollment rates. |
fail_rate |
Failure and dropout rates. |
alpha |
One-sided Type I error. |
beta |
Type II error. |
info_frac |
Targeted information fraction at each analysis. |
analysis_time |
Minimum time of analysis. |
ratio |
Experimental:Control randomization ratio (not yet implemented). |
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 |
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 |
test_lower |
Indicator of which analyses should include an lower bound;
single value of |
info_scale |
Information scale for calculation. Options are:
|
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. |
Details
To be added.
Value
A list with input parameters, enrollment rate, analysis, and bound.
Specification
The contents of this section are shown in PDF user manual only.
Examples
library(gsDesign)
library(gsDesign2)
library(dplyr)
# Example 1 ----
# call with defaults
gs_design_ahr()
# Example 2 ----
# Single analysis
gs_design_ahr(analysis_time = 40)
# Example 3 ----
# Multiple analysis_time
gs_design_ahr(analysis_time = c(12, 24, 36))
# Example 4 ----
# Specified information fraction
gs_design_ahr(info_frac = c(.25, .75, 1), analysis_time = 36)
# Example 5 ----
# multiple analysis times & info_frac
# driven by times
gs_design_ahr(info_frac = c(.25, .75, 1), analysis_time = c(12, 25, 36))
# driven by info_frac
gs_design_ahr(info_frac = c(1 / 3, .8, 1), analysis_time = c(12, 25, 36))
# Example 6 ----
# 2-sided symmetric design with O'Brien-Fleming spending
gs_design_ahr(
analysis_time = 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(
analysis_time = 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
)
# Example 7 ----
gs_design_ahr(
alpha = 0.0125,
analysis_time = c(12, 24, 36),
upper = gs_spending_bound,
upar = list(sf = gsDesign::sfLDOF, total_spend = 0.0125, param = NULL, timing = NULL),
lower = gs_b,
lpar = rep(-Inf, 3)
)
gs_design_ahr(
alpha = 0.0125,
analysis_time = c(12, 24, 36),
upper = gs_b,
upar = gsDesign::gsDesign(
k = 3, test.type = 1, n.I = c(.25, .75, 1),
sfu = sfLDOF, sfupar = NULL, alpha = 0.0125
)$upper$bound,
lower = gs_b,
lpar = rep(-Inf, 3)
)