| toer {baskexact} | R Documentation | 
Type 1 Error Rate
Description
Computes the exact family wise type 1 error rate of a basket trial .
Usage
toer(design, ...)
## S4 method for signature 'OneStageBasket'
toer(
  design,
  p1 = NULL,
  n,
  lambda,
  weight_fun,
  weight_params = list(),
  globalweight_fun = NULL,
  globalweight_params = list(),
  results = c("fwer", "group"),
  ...
)
## S4 method for signature 'TwoStageBasket'
toer(
  design,
  p1 = NULL,
  n,
  n1,
  lambda,
  interim_fun,
  interim_params = list(),
  weight_fun,
  weight_params = list(),
  globalweight_fun = NULL,
  globalweight_params = list(),
  results = c("fwer", "group"),
  ...
)
Arguments
| design | An object of class  | 
| ... | Further arguments. | 
| p1 | Probabilities under the alternative hypothesis. If
 | 
| 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
 | 
| globalweight_fun | Which function should be used to calculate the global weights. | 
| globalweight_params | A list of tuning parameters specific to
 | 
| results | Whether only the family wise error rate (option  | 
| 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
 | 
Details
toer computes the exact family wise type 1 error rate and the
exact rejection probabilities per group. The family wise type 1 error rate
is the probability to reject at least one null hypothesis for a basket with
p1 = p0. If all p1 > p0 then the family wise type 1 error
rate under the global null hypothesis is computed. The rejection
probabilities correspond to the type 1 error rate for baskets with p1 =
p0 and to the power for baskets with p1 > p0.
Value
If results = "fwer" then the family wise type 1 error rate is
returned as a numeric value. If results = "group" then a list with
the rejection probabilities per group and the family wise type 1 error rate
is returned. If all p1 > p0 then the family wise type 1 error rate
is calculated under the global null hypothesis. 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.
Methods (by class)
-  toer(OneStageBasket): Type 1 error rate for a single-stage basket design.
-  toer(TwoStageBasket): Type 1 error rate for two-stage basket design.
Examples
design <- setupOneStageBasket(k = 3, p0 = 0.2)
toer(design, n = 15, lambda = 0.99, weight_fun = weights_fujikawa)