Methods to access the stage-one, stage-two, or overall sample size of a
TwoStageDesign.
n1 returns the first-stage sample size of a design,
n2 the stage-two sample size conditional on the stage-one test
statistic and n the overall sample size n1 + n2.
Internally, objects of the class TwoStageDesign allow non-natural,
real sample sizes to allow smooth optimization (cf. minimize for
details).
The optional argument round allows to switch between the internal
real representation and a rounded version (rounding to the next positive
integer).
Usage
n1(d, ...)
# S4 method for TwoStageDesign
n1(d, round = TRUE, ...)