Simon_oc {VisualizeSimon2Stage} | R Documentation |
Simon_oc: Operating Characteristics of Simon's Two-Stage Design
Description
Operating characteristics of Simon's two-stage design.
Usage
Simon_oc(
prob,
simon,
type = c("minimax", "optimal", "n1", "maximax"),
R = 10000L,
n1 = stop("must provide `n1`"),
n = stop("must provide `n`"),
r1 = stop("must provide `r1`"),
r = stop("must provide `r`"),
...
)
Arguments
prob |
named double vector,
true response rate(s) |
simon |
ph2simon object |
type |
character scalar, type of Simon's two-stage design.
Currently supports
|
R |
integer scalar, number of simulations. Default |
n1 , n |
(optional) integer scalars, Stage-1 sample size |
r1 , r |
(optional) integer scalars, number of response
in Stage-1 |
... |
potential parameters, currently not in use |
Details
..
Value
Function Simon_oc returns Simon_oc object
Slots
maxResp
integer vector of same length as
p
, the frequencies of each regime having maximum response. The summation ofmaxResp
is the number of simulation copies.Simon_maxResp
integer vector of same length as
p
, the frequencies of each regime having maximum response and success in Simon's two-stage trial.
Examples
library(clinfun)
(x = ph2simon(pu = .2, pa = .4, ep1 = .05, ep2 = .1))
Simon_oc(prob = c(A = .3, B = .2, C = .15), simon = x, type = 'minimax', R = 1e3L)
Simon_oc(prob = c(A = .3, B = .2, C = .15), simon = x, type = 'optimal', R = 1e3L)