Weights Based on the Calibrated Power Prior
weights_cpp(design, ...)# S4 method for OneStageBasket
weights_cpp(
design,
n,
a = 1,
b = 1,
prune = FALSE,
lambda,
globalweight_fun = NULL,
globalweight_params = list(),
...
)
# S4 method for TwoStageBasket
weights_cpp(design, n, n1, a = 1, b = 1, ...)
A matrix including the weights of all possible pairwise outcomes.
An object of class Basket created by
setupOneStageBasket or setupTwoStageBasket.
Further arguments.
The sample size per basket.
first tuning parameter
second tuning parameter
Whether baskets with a number of responses below the
critical pooled value should be pruned before the final analysis.
If this is TRUE then lambda is also required and
if globalweight_fun is not NULL then
globalweight_fun and globalweight_params are also used.
The posterior probability threshold. See details for more information.
Which function should be used to calculate the global weights.
A list of tuning parameters specific to
globalweight_fun.
The sample size per basket for the interim analysis in case of a two-stage design.
weights_cpp(OneStageBasket): Calibrated power prior weights for a single-stage
basket design.
weights_cpp(TwoStageBasket): Calibrated power prior weights for a two-stage
basket design.
weights_cpp calculates the weights based on an approach
by Pan & Yuan (2017). The weight for two baskets i and j is found by at
first calculating \(S_{KS;i,j}\) as the Kolmogorov-Smirnov statistic,
which is equal to the difference in response rates for binary variables.
\(S_{KS;i,j}\) is then transformed to \(S_{i,j} = n^{1/4}S_{KS;i,j}\).
Then the weight is found as \(1 / (1 + exp(a + b * log(S_{i,j})))\), where
a and b are tuning parameters.
The function is generally not called by the user but passed to another
function such as toer and pow to specificy
how the weights are calculated.
Baumann, L., Sauer, L., & Kieser, M. (2024). A basket trial design based on power priors. arXiv:2309.06988.
Pan, H., Yuan, Y., & Xia, J. (2017). A calibrated power prior approach to borrow information from historical data with application to biosimilar clinical trials. Journal of the Royal Statistical Society Series C: Applied Statistics, 66(5), 979-996.
design <- setupOneStageBasket(k = 3, p0 = 0.2)
toer(design, n = 15, lambda = 0.99, weight_fun = weights_cpp)
Run the code above in your browser using DataLab