gs_b | R Documentation |
gs_b()
is the simplest version of a function to be used with the upper
and lower
arguments in gs_power_npe()
and gs_design_npe()
or the
upper_bound
and lower_bound
arguments in gs_prob_combo()
and
pmvnorm_combo()
.
It simply returns the vector of Z-values in the input vector par
or,
if k
is specified, par[k]
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 gs_spending_bound()
.
gs_b(par = NULL, k = NULL, ...)
par |
For |
k |
Is |
... |
Further arguments passed to or from other methods. |
Returns the vector input par
if k
is NULL
, otherwise, par[k]
.
The contents of this section are shown in PDF user manual only.
# Simple: enter a vector of length 3 for bound
gs_b(par = 4:2)
# 2nd element of par
gs_b(par = 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.