MyNixOS website logo
Description

Clinical Trial Simulation.

Provides some basic routines for simulating a clinical trial. The primary intent is to provide some tools to generate trial simulations for trials with time to event outcomes. Piecewise exponential failure rates and piecewise constant enrollment rates are the underlying mechanism used to simulate a broad range of scenarios such as those presented in Lin et al. (2020) <doi:10.1080/19466315.2019.1697738>. However, the basic generation of data is done using pipes to allow maximum flexibility for users to meet different needs.

simtrial

R-CMD-check Codecov test coverage CRAN status CRAN Downloads

simtrial is a fast and extensible clinical trial simulation framework for time-to-event endpoints.

Installation

The easiest way to get simtrial is to install from CRAN:

install.packages("simtrial")

Alternatively, to use a new feature or get a bug fix, you can install the development version of simtrial from GitHub:

# install.packages("remotes")
remotes::install_github("Merck/simtrial")

Overview

simtrial is intended to be a general purpose tool for simulating fixed, group sequential or adaptive clinical trials. It allows stratified populations and flexible parameters for generating enrollment, event times, dropout times. It takes care of bookkeeping to enable easily going from data generation to creating analysis datasets for evaluation of standard or innovative designs and testing procedures. For a single endpoint, it will easily generate trials with multiple arms (e.g., a single or multiple experimental arms versus a common control) and multiple study populations (e.g., overall population and biomarker positive). While tools are built into the package for logrank and weighted logrank tests, arbitrary testing and estimation procedures are easily applied. In addition to weighted logrank tests, we support combinations of weighted logrank tests (e.g., the MaxCombo test). The package used piecewise constant enrollment, failure and dropout rates as a simple model able to approximate arbitrary distributions easily. This model also enables simulating non-proportional hazards assumptions that are transparent for users to explain to non-statistical collaborators.

simtrial is designed with a core philosophy of basing most computations on efficient table transformations and to have a package that is easy to qualify for use in regulated environments. It utilizes the blazingly fast data.table for tabular data processing, enhanced by C++ implementations to ensure optimal performance. However, it does not require the user to be a data.table or C++ user.

Initial areas of focus are:

  • Generating time-to-event data for stratified trials using piecewise constant enrollment and piecewise exponential failure rates. Both proportional and non-proportional hazards are supported. Under proportional hazards, the assumptions are along the lines of those used by Lachin and Foulkes as implemented in gsDesign for deriving group sequential designs.
  • Setting up data cutoffs for (interim and final) analyses.
  • Support for weighted logrank tests with arbitrary weighting schemes, specifically supporting the Fleming-Harrington set of tests, including the logrank test.

Future developments

Expectations for future development include:

  • Provide a test suite to document that the package is fit for use in a regulatory environment.
  • Further examples.
Metadata

Version

0.4.1

License

Unknown

Platforms (77)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • 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-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-windows