ess {baskexact}  R Documentation 
Expected Sample Size
Description
Computes the expected sample size of a twostage basket trial.
Usage
ess(design, ...)
## S4 method for signature 'TwoStageBasket'
ess(
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. 
n1 
The sample size per basket for the interim analysis in case of a twostage design. 
lambda 
The posterior probability threshold. See details for more information. 
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

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

Methods (by class)

ess(TwoStageBasket)
: Expected sample size for twostage basket design.
Examples
design < setupTwoStageBasket(k = 3, p0 = 0.2)
ess(design, n = 20, n1 = 10, lambda = 0.99, weight_fun = weights_fujikawa,
interim_fun = interim_postpred)