MyNixOS website logo
Description

Bayesian Two-Stage Design with Window-Cohort and Controlled Roll-on for Time-to-Event Estimand.

Calibrates Bayesian two-stage designs for single-arm phase II trials with time-to-event endpoints using a window-cohort with controlled roll-on. Interim monitoring is anchored to a locked interim cohort and a pre-specified follow-up requirement, so analysis timing remains predictable while preserving follow-up maturity. The package searches feasible interim rules, optimizes final sample size and decision thresholds, evaluates operating characteristics by Monte Carlo simulation, and supports exponential, Weibull, log-normal, log-logistic, and user-defined baseline survival models. Related published foundations include Simon (1989) <doi:10.1016/0197-2456(89)90015-9> and Cotterill and Whitehead (2015) <doi:10.1002/sim.6426>.

WCRBayesDesign

Bayesian Two-Stage Adaptive Design for Single-Arm Survival Trials

Overview

WCRBayesDesign provides simulation and optimization tools for Bayesian two-stage adaptive single-arm trials with time-to-event endpoints. All statistical calculations are carried out in a transformed-time space induced by a reference survival function $S_0$, while key results are reported on the original time scale for clinical interpretability.

Installation

# Install from source
install.packages("WCRBayesDesign_1.0.0.tar.gz", repos = NULL, type = "source")

Quick Start

library(WCRBayesDesign)

# Step 1 - Search feasible interim-analysis parameters
res_pIA <- find_Nw_pIA(
  tau = 24, theta_L = 0.62, theta_alt = 0.80,
  alpha_target = 0.05, beta_target = 0.20,
  rate = 5/12, X_grid = c(1, 2, 3),
  S0_dist = "weibull",
  S0_par = list(k = 1.2, lambda = 0.08)
)

# Step 2 - Optimise the two-stage design
opt <- two_stage_optimize_design(
  NwX_pIA_results = res_pIA,
  rate = 5/12, tau = 24,
  theta_L = 0.62, theta_alt = 0.80,
  alpha_target = 0.05, beta_target = 0.20,
  nsim = 2000,
  S0_dist = "weibull",
  S0_par = list(k = 1.2, lambda = 0.08),
  optimize = "ESS", ncores = 4
)

# Step 3 - Evaluate operating characteristics
oc <- oc_two_stage(
  N = 50, Nw = 30, X = 2,
  pIA = 0.5, pF = 0.05,
  rate = 5/12, tau = 24,
  theta_L = 0.62, theta_alt = 0.80,
  a0 = 0.01, b0 = 0.01, nsim = 5000,
  S0_dist = "weibull",
  S0_par = list(k = 1.2, lambda = 0.08)
)

Exported Functions

FunctionPurpose
find_Nw_pIA()Search for feasible interim-analysis parameters
two_stage_optimize_design()Optimise sample size and decision thresholds
oc_two_stage()Evaluate operating characteristics via simulation
run_two_stage_trial()Simulate a single two-stage trial
conduct()Perform Bayesian interim or final analysis
S0_weibull()Weibull reference survival function
S0_inverse()Inverse baseline survival function
delta_from_theta_goal()Convert survival-probability target to delta
stats_transformed()Compute transformed sufficient statistics

Supported Baseline Distributions

  • Exponential (S0_dist = "exp")
  • Weibull (S0_dist = "weibull")
  • Log-normal (S0_dist = "lognormal")
  • Log-logistic (S0_dist = "loglogistic")
  • User-supplied (S0_dist = "custom")

License

GPL-3

Authors

Metadata

Version

1.0.1

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