Simulation-Based Calculation of Basket Trial Operating Characteristics

Provides a unified syntax for the simulation-based comparison of different single-stage basket trial designs with a binary endpoint and equal sample sizes in all baskets. Methods include the designs by Baumann et al. (2025) , Schmitt and Baumann (2025) , Fujikawa et al. (2020) , Berry et al. (2020) , and Neuenschwander et al. (2016) . For the latter two designs, the functions are mostly wrappers for functions provided by the package 'bhmbasket'.


basksim

R-CMD-check codecov CRANstatus

Overview

basksim calculates the operating characteristics of different basket trial designs based on simulation.

Installation

Install the development version with:

# install.packages("devtools")
pak::pak("lbau7/basksim")

Usage

With basksim you can calculate the operating characteristics such as rejection probabilities and mean squared error of single-stage basket trials with different designs.

At first, you have to create a design-object using a setup-function. For example to create a design-object for Fujikawa’s design (Fujikawa et al., 2020):

library(basksim)
design <- setup_fujikawa(k = 3, shape1 = 1, shape2 = 1, p0 = 0.2)

k is the number of baskets, shape1 and shape2 are the shape parameters of the Beta-prior of the response probabilities of each baskets and p0 is the response probability that defines the null hypothesis.

Use get_details to estimate several important operating characteristics:

set.seed(123)
get_details(
  design = design,
  n = c(15, 20, 25),
  p1 = c(0.2, 0.5, 0.5),
  lambda = 0.95,
  epsilon = 1.5,
  tau = 0,
  iter = 5000
)

# $Rejection_Probabilities
# [1] 0.4226 0.9824 0.9874
# 
# $FWER
# [1] 0.4226
# 
# $EWP
# [1] 0.999
# 
# $Mean
# [1] 0.2992626 0.4823250 0.4836304
# 
# $MSE
# [1] 0.020532553 0.007330251 0.006862607
# 
# $Lower_CL
# [1] 0.1517281 0.3407342 0.3440962
# 
# $Upper_CL
# [1] 0.4574680 0.6241900 0.6234426
# 
# $ECD
# [1] 2.5472
# 
# $Rejection_Probabilities_SE
# [1] 0.006985832 0.001859583 0.001577418
# 
# $FWER_SE
# [1] 0.006985832
# 
# $EWP_SE
# [1] 0.0004469899
# 
# $ECD_SE
# [1] 0.007147353

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("basksim")

2.2.0 by Lukas Baumann, 5 months ago


https://github.com/lbau7/basksim


Report a bug at https://github.com/lbau7/basksim/issues


Browse source code at https://github.com/cran/basksim


Authors: Lukas Baumann [aut, cre] (ORCID: , Lukas D Sauer [aut] , Sabrina Schmitt [aut]


Documentation:   PDF Manual  


GPL (>= 3) license


Imports arrangements, bhmbasket, doFuture, extraDistr, foreach, HDInterval, progressr, purrr, stats

Suggests covr, testthat, ggplot2


Imported by baskwrap.

Suggested by baskoptr.


See at CRAN