sim: Simulate group-sequential clinical trials for a normally...

Description Usage Arguments Value See Also Examples

View source: R/sim.R

Description

sim() simulates group-sequential clinical trials in order to validate certain analytically determined operating characteristics (as returned by opchar) .

Usage

1
2
3
4
5
6
7
sim(
  des = des_gs(),
  tau = seq(-des$delta, 2 * des$delta, length.out = 100),
  estimators = FALSE,
  replicates = 1000,
  summary = FALSE
)

Arguments

des

An object of class "OptGS_des", as returned by des_gs, des_nearopt, des_opt, or build. Defaults to des_gs().

tau

A numeric vector indicating the values of τ to perform simulations for. Defaults to des$opchar$tau.

replicates

A numeric indicating the number of replicate simulations to use for each value of τ. Must be a whole number. Defaults to 1000.

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_sim". It will contain each of the input variables (subject to internal modification), along with the following element:

See Also

build, des_gs, des_nearopt, des_opt, opchar

Examples

1
2
# Simulations for the default parameters
sim     <- sim()

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