
Derive spending bound for group sequential boundary
Source:R/gs_spending_bound.R
gs_spending_bound.RdComputes one bound at a time based on spending under given distributional
assumptions. While user specifies gs_spending_bound() for use with other
functions, it is not intended for use on its own.
Most important user specifications are made through a list provided to
functions using gs_spending_bound().
Function uses numerical integration and Newton-Raphson iteration to derive
an individual bound for a group sequential design that satisfies a
targeted boundary crossing probability. Algorithm is a simple extension of
that in Chapter 19 of Jennison and Turnbull (2000).
Arguments
- k
Analysis for which bound is to be computed.
- par
A list with the following items:
sf(class spending function).total_spend(total spend).param(any parameters needed by the spending functionsf()).timing(a vector containing values at which spending function is to be evaluated orNULLif information-based spending is used).max_info(whentimingisNULL, this can be input as positive number to be used withinfofor information fraction at each analysis).
- hgm1
Subdensity grid from
h1()(k=2) orhupdate()(k>2) for analysis k-1; if k=1, this is not used and may beNULL.- theta
Natural parameter used for lower bound only spending; represents average drift at each time of analysis at least up to analysis k; upper bound spending is always set under null hypothesis (theta = 0).
- info
Statistical information at all analyses, at least up to analysis k.
- efficacy
TRUE(default) for efficacy bound,FALSEotherwise.- test_bound
A logical vector of the same length as
infoshould indicate which analyses will have a bound.- 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
rwill not be changed by the user.- tol
Tolerance parameter for convergence (on Z-scale).
References
Jennison C and Turnbull BW (2000), Group Sequential Methods with Applications to Clinical Trials. Boca Raton: Chapman and Hall.
Author
Keaven Anderson keaven_anderson@merck.com
Examples
gs_power_ahr(
analysis_time = c(12, 24, 36),
event = c(30, 40, 50),
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)
)
#> $design
#> [1] "ahr"
#>
#> $enroll_rate
#> # A tibble: 3 × 3
#> stratum duration rate
#> <chr> <dbl> <dbl>
#> 1 All 2 3
#> 2 All 2 6
#> 3 All 10 9
#>
#> $fail_rate
#> # A tibble: 2 × 5
#> stratum duration fail_rate dropout_rate hr
#> <chr> <dbl> <dbl> <dbl> <dbl>
#> 1 All 3 0.0770 0.001 0.9
#> 2 All 100 0.0385 0.001 0.6
#>
#> $bound
#> analysis bound probability probability0 z ~hr at bound nominal p
#> 1 1 upper 0.007063221 0.0008667173 3.1324678 0.3186016 0.0008667173
#> 2 1 lower 0.000935078 0.0065831983 -2.4792365 2.4726439 0.9934168017
#> 3 2 upper 0.114573286 0.0092093035 2.3687212 0.5084965 0.0089248526
#> 4 2 lower 0.009123688 0.1128819221 -1.2137128 1.4141503 0.8875713018
#> 5 3 upper 0.323735375 0.0250000000 2.0108828 0.6100896 0.0221689193
#> 6 3 lower 0.025064387 0.3231894107 -0.4743371 1.1236277 0.6823702129
#>
#> $analysis
#> analysis time n event ahr theta info info0
#> 1 1 14.90817 108 30.00008 0.7865726 0.2400702 7.373433 7.50002
#> 2 2 24.00000 108 49.06966 0.7151566 0.3352538 11.999266 12.26741
#> 3 3 36.00000 108 66.23948 0.6833395 0.3807634 16.267921 16.55987
#> info_frac info_frac0
#> 1 0.4532499 0.4529033
#> 2 0.7376029 0.7407917
#> 3 1.0000000 1.0000000
#>