get_results.jsdglobal {basksim} | R Documentation |
Get Results for Simulation of a Basket Trial with the Power Prior Design Based on Global JSD Weights
Description
Get Results for Simulation of a Basket Trial with the Power Prior Design Based on Global JSD Weights
Usage
## S3 method for class 'jsdglobal'
get_results(
design,
n,
p1 = NULL,
lambda,
eps_pair,
tau = 0,
eps_all,
logbase = 2,
iter = 1000,
data = NULL,
...
)
Arguments
design |
An object of class |
n |
The sample size per basket. |
p1 |
Probabilities used for the simulation. If |
lambda |
The posterior probability threshold. |
eps_pair |
Tuning parameter that determines the amount of borrowing based on pairwise similarity. |
tau |
Tuning parameter that determines how similar the baskets have to be that information is shared. |
eps_all |
Tuning parameter that determines the amount of borrowing based on overall heterogeneity. |
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 |
... |
Further arguments. |
Value
A matrix of results with iter
rows. A 0 means, that the
null hypothesis that the response probability exceeds p0
was not
rejected, a 1 means, that the null hypothesis was rejected.
Examples
design <- setup_jsdglobal(k = 3, p0 = 0.2)
get_results(design = design, n = 20, p1 = c(0.2, 0.5, 0.5), lambda = 0.95,
eps_pair = 2, eps_all = 2, iter = 100)