Free Access Week - Data Engineering + BI
Data Engineering and BI courses are free this week!
Free Access Week - Jun 2-8

baskexact (version 1.0.1)

ess: Expected Sample Size

Description

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

Usage

ess(design, ...)

# S4 method for 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)

  • ess(TwoStageBasket): Expected sample size for two-stage basket design.

Examples

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

Run the code above in your browser using DataLab