ecd {baskexact}R Documentation

Expected number of correct decisions

Description

Computes the expected number of correct decisions of a basket trial.

Usage

ecd(design, ...)

## S4 method for signature 'OneStageBasket'
ecd(
  design,
  p1 = NULL,
  n,
  lambda,
  weight_fun,
  weight_params = list(),
  globalweight_fun = NULL,
  globalweight_params = list(),
  ...
)

## S4 method for signature 'TwoStageBasket'
ecd(
  design,
  p1 = NULL,
  n,
  n1,
  lambda,
  interim_fun,
  interim_params = list(),
  weight_fun,
  weight_params = list(),
  globalweight_fun = NULL,
  globalweight_params = list(),
  ...
)

Arguments

design

An object of class Basket created by setupOneStageBasket or setupTwoStageBasket.

...

Further arguments.

p1

Probabilities under the alternative hypothesis. If length(p1) == 1, then this is a common probability for all baskets.

n

The sample size per basket.

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.

n1

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

interim_fun

Which type of interim analysis should be conducted in case of a two-stage design.

interim_params

A list of tuning parameters specific to interim_fun.

Details

Computes the expected number of correction decisions, i.e. the expected number of actually active baskets that are declared active and actually inactive baskets that are declared inactive.

Value

A numeric value.

Methods (by class)

Examples

design <- setupOneStageBasket(k = 3, p0 = 0.2)
ecd(design = design, p1 = c(0.5, 0.2, 0.2), n = 20, lambda = 0.99,
weight_fun = weights_fujikawa)

[Package baskexact version 1.0.1 Index]