get_initial_design: Initial design

Description Usage Arguments Details Examples

View source: R/minimize.R

Description

The optimization method minimize requires an initial design for optimization. The function get_initial_design provides an initial guess based on a fixed design that fulfills constraints on type I error rate and power. Note that a situation-specific initial design may be much more efficient.

Usage

1
2
3
4
5
6
7
8
9
get_initial_design(
  theta,
  alpha,
  beta,
  type = c("two-stage", "group-sequential", "one-stage"),
  dist = Normal(),
  order = 7L,
  ...
)

Arguments

theta

the alternative effect size in the normal case, the rate difference under the alternative in the binomial case

alpha

maximal type I error rate

beta

maximale type II error rate

type

is a two-stage, group-sequential, or one-stage design requried?

dist

distribution of the test statistic

order

desired integration order

...

further optional arguments

Details

The distribution of the test statistic is specified by dist. The default assumes a two-armed z-test.

Examples

1
2
3
4
5
6
7
8
init <- get_initial_design(
   theta = 0.3,
   alpha = 0.025,
   beta  = 0.2,
   type  = "two-stage",
   dist  = Normal(two_armed = FALSE),
   order = 7L
)

adoptr documentation built on June 28, 2021, 5:11 p.m.