| get_details.fujikawa | R Documentation |
Get Details of a Basket Trial Simulation with Fujikawa's Design
## S3 method for class 'fujikawa'
get_details(
design,
n,
p1 = NULL,
lambda,
level = 0.95,
epsilon,
tau,
logbase = 2,
iter = 1000,
data = NULL,
use_future = FALSE,
weight_fun = NULL,
weight_params = list(epsilon = epsilon, tau = tau, logbase = logbase),
...
)
design |
An object of class |
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. |
level |
Level of the credibility intervals. |
epsilon |
Tuning parameter that determines the amount of borrowing.
See |
tau |
Tuning parameter that determines how similar the baskets
have to be that information is shared. See |
logbase |
Tuning parameter. The base of the logarithm that is used to calculate the Jensen-Shannon divergence. |
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 |
use_future |
A logical, should |
weight_fun |
A function of the form |
weight_params |
A named list of input parameters (additional to |
... |
Further arguments. |
A list containing the rejection probabilities, posterior means, mean squared errors and mean limits of HDI intervals for all baskets as well as the family-wise error rate and the experiment-wise power.
design <- setup_fujikawa(k = 3, p0 = 0.2)
# Equal sample sizes
get_details(design = design, n = 20, p1 = c(0.2, 0.5, 0.5),
lambda = 0.95, epsilon = 2, tau = 0, iter = 100)
# Unequal sample sizes
get_details(design = design, n = c(15, 20, 25), p1 = c(0.2, 0.5, 0.5),
lambda = 0.95, epsilon = 2, tau = 0, iter = 100)
# A custom weight function can be defined, e.g.
weight_noshare <- function(design, n, epsilon, tau, logbase){
n_sum <- n + 1
return(diag(n_sum))
}
get_details(design = design, n = 20, p1 = c(0.2, 0.5, 0.5), lambda = 0.95,
epsilon = 2, tau = 0, iter = 1000, weight_fun = weight_noshare)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.