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) pp of (multiple) drug(s). The names(prob) should be the respective keyword(s) for the drug(s).

simon

ph2simon object

type

character scalar, type of Simon's two-stage design. Currently supports 'minimax' (default) for minimum total sample size, 'optimal' for minimum expected total sample size under p0p_0, 'n1' for minimum Stage-1 sample size n1n_1, 'maximax' to use up the user-provided maximum total sample size (parameter nmax of function ph2simon)

R

integer scalar, number of simulations. Default 1e4L.

n1, n

(optional) integer scalars, Stage-1 sample size n1n_1 and total sample size nn. Overridden if simon is given

r1, r

(optional) integer scalars, number of response in Stage-1 r1r_1 and overall rr required exclusively, i.e., passing Stage-1 means observing >r1>r_1 response. Overridden if simon is given

...

potential parameters, currently not in use

Details

..

Value

Function Simon_oc returns Simon_oc object

Slots

maxResp

integer vector of same length as pp, the frequencies of each regime having maximum response. The summation of maxResp is the number of simulation copies.

Simon_maxResp

integer vector of same length as pp, 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)


[Package VisualizeSimon2Stage version 0.1.5 Index]