basket_test {baskexact}R Documentation

Test for the Results of a Basket Trial

Description

basket_test evaluates the results of a basket trial and calculates the posterior distributions with and without borrowing.

Usage

basket_test(design, ...)

## S4 method for signature 'OneStageBasket'
basket_test(
  design,
  n,
  r,
  lambda,
  weight_fun,
  weight_params = list(),
  globalweight_fun = NULL,
  globalweight_params = list(),
  details = TRUE,
  ...
)

Arguments

design

An object of class Basket created by setupOneStageBasket or setupTwoStageBasket.

...

Further arguments.

n

The sample size per basket.

r

The vector of observed responses.

lambda

The posterior probability threshold. See details for more information.

weight_fun

Which function should be used to calculate the pairwise weights.

weight_params

A list of tuning parameters specific to weight_fun.

globalweight_fun

Which function should be used to calculate the global weights.

globalweight_params

A list of tuning parameters specific to globalweight_fun.

details

Whether a detailed list of results or only the vector of posterior probabilities is returned.

Value

If details = TRUE: A list, including matrices of the weights that are used for borrowing, posterior distribution parameters for all baskets without and with borrowing, as well as the posterior probabilities for all baskets without and with borrowing. If details = FALSE: The posterior probabilities for all baskets with borrowing.

Methods (by class)

Examples

design <- setupOneStageBasket(k = 3, shape1 = 1, shape2 = 1, p0 = 0.2)
basket_test(design = design, n = 24, r = c(5, 9, 10), lambda = 0.99,
  weight_fun = weights_fujikawa)

[Package baskexact version 1.0.1 Index]