Computes the exact power for a basket trial.
pow(design, ...)# S4 method for OneStageBasket
pow(
design,
p1,
n,
lambda,
weight_fun,
weight_params = list(),
globalweight_fun = NULL,
globalweight_params = list(),
results = c("ewp", "group"),
...
)
# S4 method for TwoStageBasket
pow(
design,
p1,
n,
n1,
lambda,
interim_fun,
interim_params = list(),
weight_fun,
weight_params = list(),
globalweight_fun = NULL,
globalweight_params = list(),
results = c("ewp", "group"),
...
)
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 p1 = p0 the rejection probabilities
corresponds to the type 1 error rate, for baskets with p1 > p0 the
rejection probabilities corresponds to the power.
An object of class Basket created by
setupOneStageBasket or setupTwoStageBasket.
Further arguments.
Probabilities under the alternative hypothesis. If
length(p1) == 1, then this is a common probability for all
baskets.
The sample size per basket.
The posterior probability threshold. See details for more information.
Which function should be used to calculate the pairwise weights.
A list of tuning parameters specific to
weight_fun.
Which function should be used to calculate the global weights.
A list of tuning parameters specific to
globalweight_fun.
Whether only the experimentwise power (option ewp)
or also the rejection probabilities per group (option group) should
be returned.
The sample size per basket for the interim analysis in case of a two-stage design.
Which type of interim analysis should be conducted in case of a two-stage design.
A list of tuning parameters specific to
interim_fun.
pow(OneStageBasket): Power for a single-stage basket design.
pow(TwoStageBasket): Power for a two-stage basket design.
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
p1 > p0. The rejection probabilities correspond to the type 1 error
rate for baskets with p1 = p0 and to the power for baskets with
p1 > p0.
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.
design <- setupOneStageBasket(k = 3, p0 = 0.2)
pow(design, p1 = c(0.2, 0.5, 0.5), n = 15, lambda = 0.99,
weight_fun = weights_fujikawa, weight_params = list(epsilon = 2, tau = 0))
Run the code above in your browser using DataLab