des_nearopt: Design a near-optimal group-sequential clinical trial for a...

Description Usage Arguments Value See Also Examples

View source: R/des_nearopt.R

Description

des_nearopt() determines near-optimal group-sequential clinical trial designs assuming the primary outcome variable is normally distributed, using the approach proposed in Wason (2015).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
des_nearopt(
  J = 2,
  alpha = 0.05,
  beta = 0.2,
  delta = 0.2,
  sigma0 = 1,
  sigma1 = sigma0,
  ratio = 1,
  Delta = c(0, 0),
  w = c(1, 0, 0, 0),
  quantile_sub = FALSE,
  integer_n = TRUE,
  method = "Nelder-Mead",
  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.

Delta

A numeric vector of length 1 or 2 indicating the initial values for the boundary shape parameters to use in the search procedure. All elements must be less than or equal to 0.5. Defaults to 0.

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). 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.

method

A character string indicating the optimisation routine to use to identify the optimised boundary shape parameters. Must be either "Nelder-Mead" or "L-BFGS-B". Typically, "Nelder-Mead" provides better convergence to the optimal solution, but is slower than "L-BFGS-B". Defaults to "Nelder-Mead".

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 near-optimal group-sequential design for the default parameters
des     <- des_nearopt()
# A three-stage near-optimal design
des_3   <- des_nearopt(J = 3)
# Optimal under the alternative hypothesis
des_alt <- des_nearopt(w = c(0, 1, 0, 0))

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