Skip to contents

The function determines (approximately) the boundaries of a multi-arm multi-stage study with ordinal or binary endpoints for a given boundary shape and finds the required number of subjects.

Usage

ordinal.mams(
  prob = c(0.35, 0.4, 0.25),
  or = 2,
  or0 = 1.2,
  K = 4,
  J = 2,
  alpha = 0.05,
  power = 0.9,
  r = 1:2,
  r0 = 1:2,
  ushape = "obf",
  lshape = "fixed",
  ufix = NULL,
  lfix = 0,
  nstart = 1,
  nstop = NULL,
  sample.size = TRUE,
  Q = 20,
  parallel = TRUE,
  print = TRUE
)

Arguments

prob

Vector of expected probabilities of falling into each category under control conditions. The elements must sum up to one (default=c(0.35, 0.4, 0.25)).

or

Interesting treatment effect on the scale of odds ratios (default=2).

or0

Uninteresting treatment effect on the scale of odds ratios (default=1.2).

K

Number of experimental treatments (default=4).

J

Number of stages (default=2).

alpha

One-sided familywise error rate (default=0.05).

power

Desired power (default=0.9).

r

Vector of allocation ratios (default=1:2).

r0

Vector ratio on control (default=1:2).

ushape

Shape of upper boundary. Either a function specifying the shape or one of "pocock", "obf" (the default), "triangular" and "fixed".

lshape

Shape of lower boundary. Either a function specifying the shape or one of "pocock", "obf", "triangular" and "fixed" (the default).

ufix

Fixed upper boundary (default=NULL). Only used if shape="fixed".

lfix

Fixed lower boundary (default=0). Only used if shape="fixed".

nstart

Starting point for finding the sample size (default=1).

nstop

Stopping point for finding the sample size (default=NULL).

sample.size

Logical if sample size should be found as well (default=TRUE).

Q

Number of quadrature points per dimension in the outer integral (default=20).

parallel

if TRUE (default), allows parallelisation of the computation via a user-defined strategy specified by means of the function future::plan(). If not set differently, the default strategy is sequential, which corresponds to a computation without parallelisation.

print

if TRUE (default), indicate at which stage the computation is.

Value

An object of the class MAMS containing the following components:

prob

Vector of expected probabilities of falling into each category under control conditions. The elements must sum up to one (default=c(0.35, 0.4, 0.25)).

or

Interesting treatment effect on the scale of odds ratios (default=2).

or0

Uninteresting treatment effect on the scale of odds ratios (default=1.2).

K

Number of experimental treatments (default=4).

J

Number of stages (default=2).

alpha

One-sided familywise error rate (default=0.05).

power

Desired power (default=0.9).

r

Vector of allocation ratios (default=1:2).

r0

Vector ratio on control (default=1:2).

ushape

Shape of upper boundary. Either a function specifying the shape or one of "pocock", "obf" (the default), "triangular" and "fixed".

lshape

Shape of lower boundary. Either a function specifying the shape or one of "pocock", "obf", "triangular" and "fixed" (the default).

ufix

Fixed upper boundary (default=NULL). Only used if shape="fixed".

lfix

Fixed lower boundary (default=0). Only used if shape="fixed".

nstart

Starting point for finding the sample size (default=1).

nstop

Stopping point for finding the sample size (default=NULL).

sample.size

Logical if sample size should be found as well (default=TRUE).

N

Number of quadrature points per dimension in the outer integral (default=20).

parallel

if TRUE (default), allows parallelisation of the computation via a user-defined strategy specified by means of the function future::plan(). If not set differently, the default strategy is sequential, which corresponds to a computation without parallelisation.

print

if TRUE (default), indicate at which stage the computation is.

Details

This function finds the (approximate) boundaries and sample size of a multi-arm multi-stage study with ordinal or binary endpoints with K active treatments plus control in which all promising treatments are continued at interim analyses as described in Magirr et al (2012). It is a wrapper around the basic mams function to facilitate its use with ordinal and binary endpoints, following ideas of Whitehead & Jaki (2009) and Jaki & Magirr (2013). For a binary endpoint the vector prob has only two elements (success/failure, yes/no, etc.). See mams for further details on the basic methodology.

References

Jaki T., Pallmann P. and Magirr D. (2019), The R Package MAMS for Designing Multi-Arm Multi-Stage Clinical Trials, Journal of Statistical Software, 88(4), 1-25. Link: doi:10.18637/jss.v088.i04

Magirr D., Jaki T. and Whitehead J. (2012), A generalized Dunnett test for multi-arm multi-stage clinical studies with treatment selection, Biometrika, 99(2), 494-501. Link: doi:10.1093/biomet/ass002

Magirr D., Stallard N. and Jaki T. (2014), Flexible sequential designs for multi-arm clinical trials, Statistics in Medicine, 33(19), 3269-3279. Link: doi:10.1002/sim.6183

Pocock S.J. (1977), Group sequential methods in the design and analysis of clinical trials, Biometrika, 64(2), 191-199.

O'Brien P.C., Fleming T.R. (1979), A multiple testing procedure for clinical trials, Biometrics, 35(3), 549-556.

Whitehead J. (1997), The Design and Analysis of Sequential Clinical Trials, Wiley: Chichester, UK.

Author

Philip Pallmann

Examples

# \donttest{
## An example based on the example in Whitehead & Jaki (2009)
# 2-stage design with triangular efficacy and futility boundaries
prob <- c(0.075, 0.182, 0.319, 0.243, 0.015, 0.166)
ordinal.mams(prob=prob, or=3.06, or0=1.32, K=3, J=2, alpha=0.05,
                 power=0.9, r=1:2, r0=1:2, ushape="triangular",
                 lshape="triangular")
#> 
#>    i) find lower and upper boundaries
#>       
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> 
#>   ii) define alpha star
#>  iii) perform sample size calculation
#>       (maximum iteration number = 201)
#>       
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> 
#>   iv) run simulation 
#> 
#> Design parameters for a 2 stage trial with 3 treatments:
#> 
#>                                             Stage 1 Stage 2
#> Cumulative sample size per stage (control):      34      68
#> Cumulative sample size per stage (active):       34      68
#> 
#> Maximum total sample size:  272 
#> 
#>              Stage 1 Stage 2
#> Upper bound:   2.330   2.197
#> Lower bound:   0.777   2.197
#> 
#> 
#> Simulated error rates based on 50000 simulations:
#>                                                           
#> Prop. rejecting at least 1 hypothesis:               0.919
#> Prop. rejecting first hypothesis (Z_1>Z_2,...,Z_K)   0.904
#> Prop. rejecting hypothesis 1:                        0.912
#> Expected sample size:                              167.115
#> 
# same example with parallelisation via separate R sessions running in the
# background
future::plan(multisession)
ordinal.mams(prob=prob, or=3.06, or0=1.32, K=3, J=2, alpha=0.05,
                 power=0.9, r=1:2, r0=1:2, ushape="triangular",
                 lshape="triangular", parallel=TRUE)
#> 
#>    i) find lower and upper boundaries
#>       
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> 
#>   ii) define alpha star
#>  iii) perform sample size calculation
#>       (maximum iteration number = 201)
#>       
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> .
#> 
#>   iv) run simulation 
#> 
#> Design parameters for a 2 stage trial with 3 treatments:
#> 
#>                                             Stage 1 Stage 2
#> Cumulative sample size per stage (control):      34      68
#> Cumulative sample size per stage (active):       34      68
#> 
#> Maximum total sample size:  272 
#> 
#>              Stage 1 Stage 2
#> Upper bound:   2.330   2.197
#> Lower bound:   0.777   2.197
#> 
#> 
#> Simulated error rates based on 50000 simulations:
#>                                                           
#> Prop. rejecting at least 1 hypothesis:               0.918
#> Prop. rejecting first hypothesis (Z_1>Z_2,...,Z_K)   0.902
#> Prop. rejecting hypothesis 1:                        0.910
#> Expected sample size:                              166.946
#> 
future::plan("default")
# }