View source: R/operating_characteristics.R
| ecd | R Documentation |
Calculate the Expected Number of Correct Decisions for a Basket Trial Design
ecd(
design,
n,
p1,
lambda,
design_params = list(),
iter = 1000,
data = NULL,
...
)
design |
An object created with one of the |
n |
The sample sizes of the baskets. A vector must be used for varying sample sizes. |
p1 |
Probabilities used for the simulation. If |
lambda |
The posterior probability threshold. |
design_params |
A list of params that is specific to the class of
|
iter |
The number of iterations in the simulation. Is ignored if
|
data |
A data matrix with k column with the number of responses for each
basket. Has to be generated with |
... |
Further arguments. |
A numeric value.
# Example for a basket trial with Fujikawa's Design
design <- setup_fujikawa(k = 3, p0 = 0.2)
# Equal sample sizes
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)
# Unequal sample sizes
ecd(design = design, n = c(15, 20, 25), p1 = c(0.2, 0.5, 0.5),
lambda = 0.95, design_params = list(epsilon = 2, tau = 0),
iter = 1000)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.