ess {baskexact}R Documentation

Expected Sample Size

Description

Computes the expected sample size of a two-stage basket trial.

Usage

ess(design, ...)

## S4 method for signature 'TwoStageBasket'
ess(
  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. If is.null(p1) then the type 1 error rate under the global null hypothesis is computed.

n

The sample size per basket.

n1

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

lambda

The posterior probability threshold. See details for more information.

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.

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.

Methods (by class)

Examples

design <- setupTwoStageBasket(k = 3, p0 = 0.2)
ess(design, n = 20, n1 = 10, lambda = 0.99, weight_fun = weights_fujikawa,
  interim_fun = interim_postpred)

[Package baskexact version 1.0.1 Index]