findDesigns: findDesigns

Description Usage Arguments Value Author(s) Examples

View source: R/functions.R

Description

This function finds admissible design realisations for single-arm binary outcome trials, using stochastic curtailment. The output can be used as the sole argument in the function 'drawDiagram', which will return the stopping boundaries for the admissible design of your choice. Monitoring frequency can set in terms of block(/cohort) size ("C") or number of stages ("stages").

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
findDesigns(
  nmin,
  nmax,
  C = NA,
  stages = NA,
  p0,
  p1,
  alpha,
  power,
  maxthetaF = p1,
  minthetaE = p1,
  bounds = "wald",
  return.only.admissible = TRUE,
  max.combns = 1e+06,
  maxthetas = NA,
  fixed.r = NA,
  exact.thetaF = NA,
  exact.thetaE = NA
)

Arguments

nmin

Minimum permitted sample size. Should be a multiple of block size or number of stages.

nmax

Maximum permitted sample size. Should be a multiple of block size or number of stages.

C

Block size. Vectors, i.e., multiple values, are permitted.

stages

Number of interim analyses or "stages". Only required if not setting block size C. Vectors, i.e., multiple values, are permitted.

p0

Probability for which to control the type-I error-rate

p1

Probability for which to control the power

alpha

Significance level

power

Required power (1-beta).

maxthetaF

Maximum value of lower CP threshold theta_F_max. Defaults to p1.

minthetaE

Minimum value of upper threshold theta_E_min. Defaults to p1.

bounds

choose what final rejection boundaries should be searched over: Those of A'Hern ("ahern"), Wald ("wald") or no constraints (NA). Defaults to "wald".

return.only.admissible

Logical. Returns only admissible design realisations if TRUE, otherwise returns all feasible designs. Defaults to TRUE.

max.combns

Provide a maximum number of ordered pairs (theta_F, theta_E). Defaults to 1e6.

maxthetas

Provide a maximum number of CP values used to create ordered pairs (theta_F, theta_E). Can be used instead of max.combns. Defaults to NA.

fixed.r

Choose what final rejection boundaries should be searched over. Useful for reproducing a particular design realisation. Defaults to NA.

exact.thetaF

Provide an exact value for lower threshold theta_F. Useful for reproducing a particular design realisation. Defaults to NA.

exact.thetaE

Provide an exact value for upper threshold theta_E. Useful for reproducing a particular design realisation. Defaults to NA.

Value

Output is a list of two dataframes. The first, $input, is a one-row data frame that contains all the arguments used in the call. The second, $all.des, contains the operating characteristics of all admissible designs found.

Author(s)

Martin Law, martin.law@mrc-bsu.cam.ac.uk

Examples

1
findDesigns(nmin = 20, nmax = 20, C = 1, p0 = 0.1, p1 = 0.4, power = 0.8, alpha = 0.1)

martinlaw/SCsinglearm documentation built on Feb. 19, 2021, 8:05 p.m.