n1  R Documentation 
Methods to access the stageone, stagetwo, or overall sample size of a
TwoStageDesign
.
n1
returns the firststage sample size of a design,
n2
the stagetwo sample size conditional on the stageone test
statistic and n
the overall sample size n1 + n2
.
Internally, objects of the class TwoStageDesign
allow nonnatural,
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).
n1(d, ...)
## S4 method for signature 'TwoStageDesign'
n1(d, round = TRUE, ...)
n2(d, x1, ...)
## S4 method for signature 'TwoStageDesign,numeric'
n2(d, x1, round = TRUE, ...)
n(d, x1, ...)
## S4 method for signature 'TwoStageDesign,numeric'
n(d, x1, round = TRUE, ...)
## S4 method for signature 'GroupSequentialDesign,numeric'
n2(d, x1, round = TRUE, ...)
## S4 method for signature 'OneStageDesign,numeric'
n2(d, x1, ...)
d 
design 
... 
further optional arguments 
round 

x1 
stageone test statistic 
sample size value of design d
at point x1
TwoStageDesign
, see c2
for accessing
the critical values
design < TwoStageDesign(
n1 = 25,
c1f = 0,
c1e = 2.5,
n2 = 50,
c2 = 1.96,
order = 7L
)
n1(design) # 25
design@n1 # 25
n(design, x1 = 2.2) # 75
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.