| toer.fujikawa_x | R Documentation |
This wrapper functions returns the type-1 error rate (TOER) for Fujikawa et al.'s basket trial design. The TOER is calculated using backends from two different R packages:
If design$backend == "sim", the TOER is calculated using
basksim::toer.
If design$backend == "exact", the TOER are calculated using
baskexact::toer.
## S3 method for class 'fujikawa_x'
toer(
design,
n,
p1 = NULL,
lambda,
epsilon = epsilon,
tau = tau,
logbase = logbase,
design_params = list(epsilon = epsilon, tau = tau, logbase = logbase),
iter = 1000,
data = NULL,
weight_fun = weights_jsd,
weight_params = design_params,
globalweight_fun = NULL,
globalweight_params = list(),
results = c("fwer", "group"),
...
)
design |
An object of class |
n |
The sample size per basket. |
p1 |
Probabilities used for the simulation. If |
lambda |
The posterior probability threshold. |
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. |
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 |
weight_fun |
Which functions should be used to calculated the pairwise
weights? Default is |
weight_params |
A list of tuning parameters specific to |
globalweight_fun |
Which functions should be used to calculated the global weights? Currently, this is only supported for the exact backend. |
globalweight_params |
A list of tuning parameters specific to
|
results |
Whether only the family wise error rate (option |
... |
Further arguments. |
A numeric value.
design <- setup_fujikawa_x(k = 3, p0 = 0.2)
toer(design = design, n = 20, p1 = c(0.2, 0.5, 0.5), lambda = 0.95,
design_params = list(epsilon = 2, tau = 0), iter = 100)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.