MyNixOS website logo
Description

Optimal Monotone Conditional Error Functions.

Design and analysis of confirmatory adaptive clinical trials using the optimal conditional error framework according to Brannath and Bauer (2004) <doi:10.1111/j.0006-341X.2004.00221.x>. An extension to the optimal conditional error function using interim estimates as described in Brannath and Dreher (2024) <doi:10.48550/arXiv.2402.00814> and functions to ensure that the resulting conditional error function is non-increasing are also available.

optconerrf

The goal of optconerrf is to enable the use of adaptive two-stage clinical trial designs with the optimal conditional error function approach proposed by Brannath & Bauer (2004). The optimal conditional error function minimises the expected second-stage sample size/information under the assumption that the true effect size is known. As an extension to the original methodology, optconerrf allows the effect size used to plan the second stage to depend on the interim data.

Installation

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

# install.packages("devtools")
devtools::install_github("morten-dreher/optconerrf")

Installing from CRAN can be done via:

install.packages("optconerrf")

Example

A design object with the following properties:

  • overall type I error rate 0.025 (alpha = 0.025)
  • early efficacy boundary 0.0001 (alpha1 = 0.0001, p-value scale)
  • binding futility boundary 0.5 (alpha0 = 0.5, p-value scale)
  • conditional power 0.9 (conditionalPower = 0.9)
  • assumed treatment effect of 0.25 (delta1 = 0.25)
  • no use of interim estimate (i.e., always using delta1 to plan the secon d stage, useInterimEstimate = FALSE)
  • first-stage information 100 (firstStageInformation = 100)
  • fixed likelihood ratio distribution (likelihoodRatioDistribution = "fixed") with effect 0.25 (deltaLR = 0.25) (i.e., minimising the expected second-stage information under the assumption that the true effect size is 0.25)

can be generated by the code below.

library(optconerrf)
trialDesign <- 
  getDesignOptimalConditionalErrorFunction(
    alpha = 0.025,
    alpha1 = 0.0001,
    alpha0 = 0.5,
    conditionalPower = 0.9,
    delta1 = 0.25,
    useInterimEstimate = FALSE,
    firstStageInformation = 100,
    likelihoodRatioDistribution = "fixed",
    deltaLR = 0.25
  )

The design object can then be passed to other central package functions, such as getExpectedSecondStageInformation():

getExpectedSecondStageInformation(
  trialDesign,
  likelihoodRatioDistribution = "fixed",
  deltaLR = 0)
#> [1] 99.84901

The above code calculates the expected second-stage information of the design for a scenario under the null hypothesis (deltaLR = 0).

optconerrf also implements plot() and print() generics:

plot(trialDesign)
print(trialDesign)
#> Optimal Conditional Error Function Design: 
#>  
#> General design parameters: 
#>   Overall significance level: 0.025 
#>   First-stage efficacy boundary (p-value scale): 1e-04 
#>   Binding first-stage futility boundary (p-value scale): 0.5 
#> 
#> Conditional power specification: 
#>   Target conditional power: 0.9 
#>   Alternative: 0.25 
#>   First-stage non-centrality parameter: 2.5 
#>   First-stage information: 100 
#> 
#> Likelihood ratio specification: 
#>   Fixed parameter(s) in likelihood ratio:  0.25 
#>   Parameter weights:  1 
#> 
#> Level constant: 
#>   Constant: 7.079328 
#>   Searched on interval: [0, 10]
Metadata

Version

1.0.1

License

Unknown

Platforms (76)

    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-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
  • 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