The optimization method minimize
requires an initial
design for optimization.
This function provides a variety of possibilities to hand-craft designs that fulfill type I error and type II
error constraints which may be used as initial designs.
get_initial_design(
theta,
alpha,
beta,
type_design = c("two-stage", "group-sequential", "one-stage"),
type_c2 = c("linear_decreasing", "constant"),
type_n2 = c("optimal", "constant", "linear_decreasing", "linear_increasing"),
dist = Normal(),
cf,
ce,
info_ratio = 0.5,
slope,
weight = sqrt(info_ratio),
order = 7L,
...
)
the alternative effect size in the normal case, the rate difference under the alternative in the binomial case
maximal type I error rate
maximal type II error rate
is a two-stage, group-sequential, or one-stage design required?
either linear-decreasing c2-function according to inverse normal combination test or constant c2
design of n2-function
distribution of the test statistic
first-stage futility boundary
first-stage efficacy boundary. Note that specifying this boundary implies that the type I error constraint might not be fulfilled anymore
the ratio between first and second stage sample size
slope of n2 function
weight of first stage test statistics in inverse normal combination test
desired integration order
further optional arguments
The distribution of the test statistic is specified by dist
.
The default assumes a two-armed z-test.
The first stage efficacy boundary and the c2 boundary are chosen as Pocock-boundaries, so either ce=c2
if c2 is constant or ce=c, where the null hypothesis is rejected if w1 Z1+w2 Z2>c.
By specifying ce, it's clear that the boundaries are not Pocock-boundaries anymore, so the type I error
constraint may not be fulfilled.
IMPORTANT: When using the t-distribution or ANOVA, the design does probably
not keep the type I and type II error, only approximate designs are returned.