ecd {baskexact}  R Documentation 
Expected number of correct decisions
Description
Computes the expected number of correct decisions of a basket trial.
Usage
ecd(design, ...)
## S4 method for signature 'OneStageBasket'
ecd(
design,
p1 = NULL,
n,
lambda,
weight_fun,
weight_params = list(),
globalweight_fun = NULL,
globalweight_params = list(),
...
)
## S4 method for signature 'TwoStageBasket'
ecd(
design,
p1 = NULL,
n,
n1,
lambda,
interim_fun,
interim_params = list(),
weight_fun,
weight_params = list(),
globalweight_fun = NULL,
globalweight_params = list(),
...
)
Arguments
design 
An object of class 
... 
Further arguments. 
p1 
Probabilities under the alternative hypothesis. If

n 
The sample size per basket. 
lambda 
The posterior probability threshold. See details for more information. 
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

n1 
The sample size per basket for the interim analysis in case of a twostage design. 
interim_fun 
Which type of interim analysis should be conducted in case of a twostage design. 
interim_params 
A list of tuning parameters specific to

Details
Computes the expected number of correction decisions, i.e. the expected number of actually active baskets that are declared active and actually inactive baskets that are declared inactive.
Value
A numeric value.
Methods (by class)

ecd(OneStageBasket)
: Expected number of correction decisions for a singlestage basket design. 
ecd(TwoStageBasket)
: Expected number of correction decisions for a twostage basket design.
Examples
design < setupOneStageBasket(k = 3, p0 = 0.2)
ecd(design = design, p1 = c(0.5, 0.2, 0.2), n = 20, lambda = 0.99,
weight_fun = weights_fujikawa)