MyNixOS website logo
Description

Wrapper Package for Several Basket Trial R Packages.

A simple interface to switch between two methods for calculating basket trial characteristics, numerical integration ("exact") and Monte Carlo simulation ("simulated") for the basket trial design by Fujikawa et al. 2020 <doi:10.1002/bimj.201800404>. The exact implementation is from the 'baskexact' package, see Baumann (2024) <doi:10.1016/j.softx.2024.101793>. The simulated implementation is from the 'basksim' package, which was developed for Baumann et al. (2024) <doi:10.1080/19466315.2024.2402275>. The package's syntax is compatible with the 'basksim' syntax and easily extendable.

baskwrap

Codecov testcoverage R-CMD-check

The baskwrap package supplies a unified wrapper to several basket trial packages (basksim and baskexact) using a unified syntax.

Installation

You can install the development version of baskwrap from GitHub with:

# install.packages("pak")
pak::pak("LukasDSauer/baskwrap")

Example

The baskwrap package provides a simple interface to switch between two methods for calculating basket trial characteristics, numerical integration (“exact”) and Monte Carlo simulation (“simulated”).

library(baskwrap)
# INPUT PARAMETERS
n <- 20
p1 <- c(0.2, 0.5, 0.5)
lambda <- 0.95
epsilon <- 2
tau <- 0.5
design <- setup_fujikawa_x(k = 3, p0 = 0.2, backend = "exact")
# DETAILS USING EXACT BACKEND
get_details(design = design, n = n, p1 = p1, lambda = lambda,
            epsilon = epsilon, tau = tau)
#> $Rejection_Probabilities
#> [1] 0.1656753 0.9623016 0.9623016
#> 
#> $FWER
#> [1] 0.1656753
#> 
#> $EWP
#> [1] 0.9983541
#> 
#> $Mean
#> [1] 0.2358052 0.4958199 0.4958199
#> 
#> $MSE
#> [1] 0.009524536 0.009835315 0.009835315
#> 
#> $Lower_CL
#> numeric(0)
#> 
#> $Upper_CL
#> numeric(0)
#> 
#> $ECD
#> [1] 2.758928
#> 
#> $p0
#> [1] 0.2
#> 
#> $p1
#> [1] 0.2 0.5 0.5
#> 
#> $backend
#> [1] "exact"
# DETAILS USING MC BACKEND
get_details(design = set_backend(design, "sim"),
            n = n, p1 = p1, lambda = lambda,
            epsilon = epsilon, tau = tau)
#> $Rejection_Probabilities
#> [1] 0.174 0.961 0.948
#> 
#> $FWER
#> [1] 0.174
#> 
#> $EWP
#> [1] 0.999
#> 
#> $Mean
#> [1] 0.2367023 0.4891821 0.4880540
#> 
#> $MSE
#> [1] 0.009438693 0.009745407 0.009909880
#> 
#> $Lower_CL
#> [1] 0.09531401 0.33277549 0.33140031
#> 
#> $Upper_CL
#> [1] 0.3917317 0.6456339 0.6448407
#> 
#> $ECD
#> [1] 2.735
#> 
#> $Rejection_Probabilities_SE
#> [1] 0.011988494 0.006122009 0.007021111
#> 
#> $FWER_SE
#> [1] 0.01198849
#> 
#> $EWP_SE
#> [1] 0.0009994999
#> 
#> $ECD_SE
#> [1] 0.01445628
#> 
#> $p0
#> [1] 0.2
#> 
#> $p1
#> [1] 0.2 0.5 0.5
#> 
#> $backend
#> [1] "sim"
Metadata

Version

1.0.3

License

Unknown

Platforms (80)

    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
  • arc-linux
  • 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
  • sh4-linux
  • 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