BOB design is a Bayesian optimal design proposed for biosimilar trials with co-primary endpoints.
This repository contains R codes used to implement numerical studies in the corresponding paper.
Firstly, some important setting parameters and their meanings are explained in this document, as follows:
-
maxnsample
:$n_J$ -
Tmax
:$J$ -
nsample
:$n_j$ -
tau2
:$\tau^2$ -
rho
:$\rho$ -
sn
: number of replicated trials in this simulation study -
pR(pT)
:$p_R (p_T)$ -
overallmuR(overallmuT)
:$\mu_R (\mu_T)$
This folder contains R codes used to implement three fixed-sample designs considered in the paper.
Frequentist fixed-sample designs include two univariate designs such as FE and FS and a bivariate design FES. Among them, FE adopts a two-sample t-test approach for the scaled average bioequivalence test to evaluate the biosimilarity of the efficacy endpoint, FS applies the frequentist two one-sided tests (TOST) procedure for both sides to test the safety endpoints, and FES combines the FE and FS designs to test both efficacy and safety endpoints.
This folder contains R codes used to implement four Bayesian adaptive designs considered in the paper. The procedure of Bayesian designs requires two main steps: (1) design calibration and (2) design implementation.
R codes in this folder help us to calibrate the design and return the optimal design parameters (
-
calibration_bae.R: R codes used to calibrate the design BAE, and output the optimal design parameters.
-
calibration_bas.R: R codes used to calibrate the design BAS, and output the optimal design parameters.
-
calibration_bobs.R: R codes used to calibrate the design BOBs, and output the optimal design parameters.
-
BOBavg
This folder contains 3 files used to implement the whole calibration procedure of the design BOBavg with the following settings:
- search_1.R:
$\mu_T=\pm 0.32$ ,$p_T \sim unif(0.3,0.7)$ - search_2.R:
$\mu_T=0, p_T=0$ (i.e., power of the design) - search_3.R:
$\mu_T \sim unif(-0.32,0.32)$ ,$p_T=0.5\pm 0.2$
and the file output.R used to output the optimal design parameters.
- search_1.R:
For example, for the proposed BOBs design, simply run the corresponding R script like
Rscript calibration_bobs.R
the optimal design parameters will be output as follows:
#Optimal parameters for BOBs:
Given the resulted optimal design parameters, simulation can be performed to obtain the operating characteristics such as the power (or the type I error rate) and the expected sample size.
For example, for the proposed BOBs design,
Rscript simu_bob.R
#The power (or type I error rate) of the design BOB:
#Expected Sample Size(EN):
- Chi X, Yu Z, Lin R. BOB: Bayesian optimal design for biosimilar trials with co-primary endpoints. Statistics in Medicine. 2022;1-16. doi: 10.1002/sim.9571