weights_cpp {baskexact}R Documentation

Weights Based on the Calibrated Power Prior

Description

Weights Based on the Calibrated Power Prior

Usage

weights_cpp(design, ...)

## S4 method for signature 'OneStageBasket'
weights_cpp(
  design,
  n,
  a = 1,
  b = 1,
  prune = FALSE,
  lambda,
  globalweight_fun = NULL,
  globalweight_params = list(),
  ...
)

## S4 method for signature 'TwoStageBasket'
weights_cpp(design, n, n1, a = 1, b = 1, ...)

Arguments

design

An object of class Basket created by setupOneStageBasket or setupTwoStageBasket.

...

Further arguments.

n

The sample size per basket.

a

first tuning parameter

b

second tuning parameter

prune

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.

lambda

The posterior probability threshold. See details for more information.

globalweight_fun

Which function should be used to calculate the global weights.

globalweight_params

A list of tuning parameters specific to globalweight_fun.

n1

The sample size per basket for the interim analysis in case of a two-stage design.

Details

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.

Value

A matrix including the weights of all possible pairwise outcomes.

Methods (by class)

References

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.

Examples

design <- setupOneStageBasket(k = 3, p0 = 0.2)
toer(design, n = 15, lambda = 0.99, weight_fun = weights_cpp)

[Package baskexact version 1.0.1 Index]