Description Usage Arguments Details Slots See Also Examples
TwoStageDesign is the fundamental design class of the
Formally, we represent a generic two-stage design as a five-tuple
(n1, c1f, c1e, n2(·), c2(·)).
Here, n1 is the first-stage sample
size (per group), c1f
and c1e are
boundaries for early stopping for futility and efficacy, respectively.
Since the trial design is a two-stage design, the elements
n2(·) (stage-two sample
size) and c2(·)
(stage-two critical value) are functions of the first-stage outcome
X1 denotes the first-stage test
statistic. A brief description on this definition of two-stage designs can be
For available methods, see the 'See Also' section at the end of this page.
1 2 3 4 5 6 7
stage-one sample size
further optional arguments
early futility stopping boundary
early efficacy stopping boundary
numeric vector, stage-two sample size on the integration pivot points
numeric vector, stage-two critical values on the integration pivot points
object to show
should rounded n-values be used?
summary can be used to quickly compute and display basic facts about
An arbitrary number of names
UnconditionalScore objects can be
provided via the optional arguments
... and are included in the summary displayed using
cf. parameter 'n1'
cf. parameter 'c1f'
cf. parameter 'c1e'
vector of length 'order' giving the values of n2 at the pivot points of the numeric integration rule
vector of length order giving the values of c2 at the pivot points of the numeric integration rule
normalized pivots for integration rule (in [-1, 1])
the actual pivots are scaled to the interval [c1f, c1e] and can be
obtained by the internal method
weights of of integration rule at
approximating integrals over
named logical vector indicating whether corresponding slot is
considered a tunable parameter (i.e. whether it can be changed during
minimize or not; cf.
For accessing sample sizes and critical values safely, see methods in
c2; for modifying behaviour during optimizaton
make_tunable; to convert between S4 class represenation and
numeric vector, see
tunable_parameters; for simulating from a given
for plotting see
Both group-sequential and
one-stage designs (!) are implemented as subclasses of
1 2 3
design <- TwoStageDesign(50, 0, 2, 50.0, 2.0, 5) pow <- Power(Normal(), PointMassPrior(.4, 1)) summary(design, "Power" = pow)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.