pow {baskexact}R Documentation

Power

Description

Computes the exact power for a basket trial.

Usage

pow(
  design,
  theta1,
  n,
  lambda,
  epsilon,
  tau,
  logbase = 2,
  prune = FALSE,
  results = c("ewp", "group"),
  ...
)

## S4 method for signature 'OneStageBasket'
pow(
  design,
  theta1,
  n,
  lambda,
  epsilon,
  tau,
  logbase = 2,
  prune = FALSE,
  results = c("ewp", "group"),
  ...
)

Arguments

design

An object of class Basket created by setupBasket.

theta1

Probabilities under the alternative hypothesis. If length(theta1) == 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.

epsilon

A tuning parameter that determines the amount of borrowing. See details for more information.

tau

A tuning parameter that determines how similar the baskets have to be that borrowing occurs. See details for more information.

logbase

A tuning parameter that determines which logarithm base is used to compute the Jensen-Shannon divergence. See details for more information.

prune

Whether baskets with a number of responses below the critical pooled value should be pruned before the final analysis.

results

Whether only the experimentwise power (option ewp) or also the rejection probabilities per group (option group) should be returned.

...

Further arguments.

Details

pow computes the exact experimentwise power and the exact rejection probabilities per group. The experimentwise power is the probability to reject at least one null hypothesis for a basket with theta1 > theta0. The rejection probabilities correspond to the type 1 error rate for baskets with theta1 = theta 0 and to the power for baskets with theta1 > theta 0.

If prune = TRUE then the baskets with an observed number of baskets smaller than the pooled critical value are not borrowed from. The pooled critical value is the smallest integer c for which all null hypotheses can be rejected if the number of responses is exactly c for all baskets.

This method is implemented for the class OneStageBasket.

Value

If results = "ewp" then the experimentwise power is returned as a numeric value. If results = "group" then a list with the rejection probabilities per group and the experimentwise power is returned. For baskets with theta1 = theta0 the rejection probabilities corresponds to the type 1 error rate, for baskets with theta1 > theta0 the rejection probabilities corresponds to the power.

Methods (by class)

Examples

design <- setupOneStageBasket(k = 3, theta0 = 0.2)
pow(design, theta1 = c(0.2, 0.5, 0.5), n = 15, lambda = 0.99, epsilon = 2,
  tau = 0)

[Package baskexact version 0.1.0 Index]