
Calculate the Expected Number of Correct Decisions for a Basket Trial Design
ecd(
design,
n,
p1,
lambda,
design_params = list(),
iter = 1000,
data = NULL,
...
)
A numeric value.
An object created with one of the setup
functions.
The sample size per basket.
Probabilities used for the simulation. If NULL
then all probabilities are set to p0.
The posterior probability threshold.
A list of params that is specific to the class of
design
.
The number of iterations in the simulation. Is ignored if
data
is specified.
A data matrix with k column with the number of responses for each
basket. Has to be generated with get_data
. If data
is used,
then iter
is ignored.
Further arguments.
# Example for a basket trial with Fujikawa's Design
design <- setup_fujikawa(k = 3, p0 = 0.2)
ecd(design = design, n = 20, p1 = c(0.2, 0.5, 0.5), lambda = 0.95,
design_params = list(epsilon = 2, tau = 0), iter = 1000)
Run the code above in your browser using DataLab