des_opt: Design an optimal group-sequential clinical trial for a...

Description Usage Arguments Value See Also Examples

View source: R/des_opt.R

Description

des_opt() determines optimal group-sequential clinical trial designs assuming the primary outcome variable is normally distributed, using the approach proposed in Wason et al (2012).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
des_opt(
  J = 2,
  alpha = 0.05,
  beta = 0.2,
  delta = 0.2,
  sigma0 = 1,
  sigma1 = sigma0,
  ratio = 1,
  w = c(1, 0, 0, 0),
  quantile_sub = FALSE,
  integer_n = TRUE,
  parallel = 1,
  popSize = 50,
  maxiter = 100,
  run = maxiter,
  seed = Sys.time(),
  summary = FALSE
)

Arguments

J

A numeric indicating the chosen value for J, the maximal allowed number of stages. Must be an integer greater than or equal to 2. Defaults to 2.

alpha

A numeric indicating the chosen value for α, the desired type-I error-rate. Must be strictly between 0 and 1. Defaults to 0.05.

beta

A numeric indicating the chosen value for β, the desired type-II error-rate. Must be strictly between 0 and 1. Defaults to 0.2.

delta

A numeric indicating the chosen value for δ, the treatment effect to power the trial for. Must be strictly positive. Defaults to 0.2.

sigma0

A numeric indicating the chosen value for σ0, the standard deviation of the responses in the control arm. Must be strictly positive. Defaults to 1.

sigma1

A numeric indicating the chosen value for σ1, the standard deviation of the responses in the experimental arm. Must be strictly positive. Defaults to sigma0.

ratio

A numeric indicating the chosen value for r, the allocation ratio to the experimental arm relative to the control arm. Must be strictly positive. Defaults to 1.

w

A numeric vector of length 4 indicating the weights to use in the optimality criteria. All elements must be greater than or equal to 0, and at least one of the first 3 elements must be strictly positive. See wason (2015) for further details. Defaults to c(1, 0, 0, 0).

quantile_sub

A logical variable indicating whether quantile substitution should be applied to the identified stopping boundaries. Defaults to FALSE.

integer_n

A logical variable indicating whether the computed values for n0 and n1, the group sizes in the control and experimental arms, should be forced to be whole numbers. Defaults to TRUE.

parallel

See ga.

popSize

See ga.

maxiter

See ga.

run

See ga.

seed

A variable to be passed to set.seed, to make the calculations reproducible.

summary

A logical variable indicating whether a summary of the function's progress should be printed to the console. Defaults to FALSE.

Value

A list with additional class "OptGS_des". It will contain each of the input variables (subject to internal modification), relating them to the outputs of the various group-sequential design functions in OptGS, along with additional elements including:

See Also

build, des_nearopt, des_opt, est, opchar, sim, plot.OptGS_des, print.OptGS_des, summary.OptGS_des

Examples

1
2
3
4
5
6
# The optimal group-sequential design for the default parameters
des     <- des_opt()
# A three-stage optimal design
des_3   <- des_opt(J = 3)
# Optimal under the alternative hypothesis
des_alt <- des_opt(w = c(0, 1, 0, 0))

mjg211/OptGS documentation built on May 28, 2021, 3:44 p.m.