GitHub - lbau7/basksim: Compare basket-trial designs based on simulation (original) (raw)
basksim
Overview
basksim
calculates the operating characteristics of different basket trial designs based on simulation.
Installation
Install the development veresion 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:
get_details( design = design, n = 20, p1 = c(0.2, 0.5, 0.5), lambda = 0.95, epsilon = 1.5, tau = 0, iter = 5000 )