Finds the value for lambda
such that the family wise error
rate is protected at level alpha
.
adjust_lambda(design, ...)# S4 method for OneStageBasket
adjust_lambda(
design,
alpha = 0.025,
p1 = NULL,
n,
weight_fun,
weight_params = list(),
globalweight_fun = NULL,
globalweight_params = list(),
prec_digits,
...
)
# S4 method for TwoStageBasket
adjust_lambda(
design,
alpha = 0.025,
p1 = NULL,
n,
n1,
interim_fun,
interim_params = list(),
weight_fun,
weight_params = list(),
globalweight_fun = NULL,
globalweight_params = list(),
prec_digits,
...
)
The greatest value with prec_digits
decimal places for
lambda
which controls the family wise error rate at level
alpha
(one-sided) and the exact family wise error rate for this
value of lambda
.
An object of class Basket
created by
setupOneStageBasket
or setupTwoStageBasket
.
Further arguments.
The one-sided signifance level.
Probabilities under the alternative hypothesis. If
length(p1) == 1
, then this is a common probability for all
baskets. If is.null(p1)
then the type 1 error rate under the
global null hypothesis is computed.
The sample size per basket.
Which function should be used to calculate the pairwise weights.
A list of tuning parameters specific to
weight_fun
.
Which function should be used to calculate the global weights.
A list of tuning parameters specific to
globalweight_fun
.
Number of decimal places that are considered when adjusting lambda.
The sample size per basket for the interim analysis in case of a two-stage design.
Which type of interim analysis should be conducted in case of a two-stage design.
A list of tuning parameters specific to
interim_fun
.
adjust_lambda(OneStageBasket)
: Adjust lambda for a single-stage design.
adjust_lambda(TwoStageBasket)
: Adjust lambda for a two-stage design.
adjust_alpha
finds the greatest value with
prec_digits
for lambda
which controls the family wise error
rate at level alpha
(one-sided). A combination of the uniroot
function followed by a grid search is used to finde the correct value
for lambda
.
design <- setupOneStageBasket(k = 3, shape1 = 1, shape2 = 1, p0 = 0.2)
adjust_lambda(design = design, alpha = 0.025, n = 15,
weight_fun = weights_fujikawa, prec_digits = 4)
Run the code above in your browser using DataLab