gs_b: gs_b: Default boundary generation

Description Usage Arguments Value Examples

View source: R/gs_b.r

Description

gs_b() is the simplest version of a function to be used with the upper and lower arguments in gs_prob(), gs_power_nph and gs_design_nph(); it simply returns the vector input in the input vector Z or, if k is specified par[k]j is returned. Note that if bounds need to change with changing information at analyses, gs_b() should not be used. For instance, for spending function bounds use

Usage

1
gs_b(par = NULL, info = NULL, k = NULL, ...)

Arguments

par

For gs_b(), this is just Z-values for the boundaries; can include infinite values

info

Information at analyses; not used in this function; present as it is a standard parameter for other boundary computation routines

k

is NULL (default), return par, else return par[k]

...

further arguments passed to or from other methods

Value

returns the vector input par if k is NULL, otherwise, par[k]

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# Simple: enter a vector of length 3 for bound
gs_b(par = 4:2)

# 2nd element of par
gs_b(4:2, k = 2)

# Generate an efficacy bound using a spending function
# Use Lan-DeMets spending approximation of O'Brien-Fleming bound
# as 50%, 75% and 100% of final spending
# Information fraction
IF <- c(.5, .75, 1)
gs_b(par = gsDesign::gsDesign(alpha = .025, k= length(IF), test.type = 1, sfu = gsDesign::sfLDOF, timing = IF)$upper$bound)

keaven/gsdmvn documentation built on May 30, 2021, 9:49 a.m.