r_simon {VisualizeSimon2Stage} | R Documentation |
Random Generator based on Simon's Two-Stage Design
Description
Random generator based on Simon's two-stage design.
Usage
r_simon(R, prob, object, ...)
## S3 method for class 'ph2simon'
r_simon(R, prob, object, ...)
## S3 method for class 'ph2simon4'
r_simon(
R,
prob,
object,
...,
r1 = object@r1,
n1 = object@n1,
r = object@r,
n = object@n
)
Arguments
R |
positive integer scalar, number of trials |
prob |
double scalar, true response rate |
object |
|
... |
parameters of function |
r1 , n1 , r , n |
Details
Function r_simon()
generates R
copies of the number of responses y
in one Simon's two-stage design.
The conclusion of the trials are,
y \leq r_1
indicates early termination
r_1 < y \leq r
indicates failure to reject
H_0
y > r
indicates success to reject
H_0
Here r
is not needed to generate the random number of responses y
.
Instead, r
is needed to determine if the trial is a failure or a success.
Therefore, r
is not a parameter of function r_simon()
.
Value
Function r_simon()
returns an integer vector of length R
,
which are the R
copies of the number of responses in the Simon's two-stage design.
[Package VisualizeSimon2Stage version 0.2.2 Index]