MyNixOS website logo
Description

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) <doi:10.1080/19466315.2024.2402275>, Schmitt and Baumann (2025) <doi:10.1080/19466315.2025.2486231>, Fujikawa et al. (2020) <doi:10.1002/bimj.201800404>, Berry et al. (2020) <doi:10.1177/1740774513497539>, and Neuenschwander et al. (2016) <doi:10.1002/pst.1730>. 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")
devtools::install_github("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
Metadata

Version

2.1.0

License

Unknown

Platforms (78)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    uefi
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-uefi
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-linux
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-uefi
  • x86_64-windows