adjust_lambda {baskexact} | R Documentation |
Adjust Lambda
Description
Finds the value for lambda
such that the family wise error
rate is protected at level alpha
.
Usage
adjust_lambda(design, ...)
## S4 method for signature '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 signature '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,
...
)
Arguments
design |
An object of class |
... |
Further arguments. |
alpha |
The one-sided signifance level. |
p1 |
Probabilities under the alternative hypothesis. If
|
n |
The sample size per basket. |
weight_fun |
Which function should be used to calculate the pairwise weights. |
weight_params |
A list of tuning parameters specific to
|
globalweight_fun |
Which function should be used to calculate the global weights. |
globalweight_params |
A list of tuning parameters specific to
|
prec_digits |
Number of decimal places that are considered when adjusting lambda. |
n1 |
The sample size per basket for the interim analysis in case of a two-stage design. |
interim_fun |
Which type of interim analysis should be conducted in case of a two-stage design. |
interim_params |
A list of tuning parameters specific to
|
Details
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
.
Value
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
.
Methods (by class)
-
adjust_lambda(OneStageBasket)
: Adjust lambda for a single-stage design. -
adjust_lambda(TwoStageBasket)
: Adjust lambda for a two-stage design.
Examples
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)