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.
the alternative effect size in the normal case, the rate difference under the alternative in the binomial case
maximal type I error rate
maximale type II error rate
is a two-stage, group-sequential, or one-stage design requried?
distribution of the test statistic
desired integration order
further optional arguments
The distribution of the test statistic is specified by dist
.
The default assumes a two-armed z-test.
init <- get_initial_design(
theta = 0.3,
alpha = 0.025,
beta = 0.2,
type = "two-stage",
dist = Normal(two_armed = FALSE),
order = 7L
)