build: Build a group-sequential clinical trial design object for a...

Description Usage Arguments Value See Also Examples

View source: R/build.R

Description

build() allows an object of class OptGS_des, like those returned by des_gs, des_nearopt, and des_opt to be built. It is for use when the user has a specific group-sequential trial design in mind.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
build(
  alpha = 0.05,
  beta = 0.2,
  delta = 0.2,
  e = c(1.88, 1.77),
  f = c(0.63, 1.77),
  n0 = 180,
  n1 = n0,
  sigma0 = 1,
  sigma1 = sigma0,
  summary = FALSE
)

Arguments

alpha

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

beta

A numeric indicating the value of β, the desired type-II error-rate for the design of interest. 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 design of interest for. Must be strictly positive. Defaults to 0.2.

e

A numeric vector indicating the values of the efficacy stopping boundaries in the design of interest. Defaults to c(1.88, 1.77).

f

A numeric vector indicating the values of the futility stopping boundaries in the design of interest. Must be of the same length as e, its last element must be equal to the last element of e, and the preceeding elements must be strictly less than the corresponding element from e. Defaults to c(0.63, 1.77).

n0

A numeric indicating the value of n0, the group size in the control arm, for the design of interest. Defaults to 180.

n1

A numeric indicating the value of n1, the group size in the experimental arm, for the design of interest. Defaults to n0.

sigma0

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

sigma1

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

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

des_gs, des_nearopt, des_opt, est, sim, plot.OptGS_des, print.OptGS_des, summary.OptGS_des

Examples

1
2
3
4
# The design for the default parameters
des   <- build()
# A three-stage design
des_3 <- build(e = c(2.85, 2.01, 1.65), f = c(-0.18, 0.94, 1.65), n0 = 115)

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