Description Usage Arguments Details Slots See Also Examples
TwoStageDesign
is the fundamental design class of the
adoptr package.
Formally, we represent a generic twostage design as a fivetuple
(n_{1}, c_{1}^{f}, c_{1}^{e}, n_{2}(·), c_{2}(·)).
Here, n_{1} is the firststage sample
size (per group), c_{1}^{f}
and c_{1}^{e} are
boundaries for early stopping for futility and efficacy, respectively.
Since the trial design is a twostage design, the elements
n_{2}(·) (stagetwo sample
size) and c_{2}(·)
(stagetwo critical value) are functions of the firststage outcome
X_{1}=x_{1}.
X_{1} denotes the firststage test
statistic. A brief description on this definition of twostage designs can be
read here.
For available methods, see the 'See Also' section at the end of this page.
1 2 3 4 5 6 7 
n1 
stageone sample size 
... 
further optional arguments 
c1f 
early futility stopping boundary 
c1e 
early efficacy stopping boundary 
n2_pivots 
numeric vector, stagetwo sample size on the integration pivot points 
c2_pivots 
numeric vector, stagetwo critical values on the integration pivot points 
order 

object 
object to show 
rounded 
should rounded nvalues be used? 
summary
can be used to quickly compute and display basic facts about
a TwoStageDesign.
An arbitrary number of names UnconditionalScore
objects can be
provided via the optional arguments ...
and are included in the summary displayed using
print
.
n1
cf. parameter 'n1'
c1f
cf. parameter 'c1f'
c1e
cf. parameter 'c1e'
n2_pivots
vector of length 'order' giving the values of n2 at the pivot points of the numeric integration rule
c2_pivots
vector of length order giving the values of c2 at the pivot points of the numeric integration rule
x1_norm_pivots
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
adoptr:::scaled_integration_pivots(design)
weights
weights of of integration rule at x1_norm_pivots
for
approximating integrals over x1
tunable
named logical vector indicating whether corresponding slot is
considered a tunable parameter (i.e. whether it can be changed during
optimization via minimize
or not; cf.
make_fixed
)
For accessing sample sizes and critical values safely, see methods in
n
and c2
; for modifying behaviour during optimizaton
see make_tunable
; to convert between S4 class represenation and
numeric vector, see tunable_parameters
; for simulating from a given
design, see simulate
;
for plotting see plot,TwoStageDesignmethod
.
Both groupsequential and
onestage designs (!) are implemented as subclasses of
TwoStageDesign
.
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.