Description Usage Arguments References Examples
Output of desired plots
1 2 3 4 5 6 7 8 9 10 11 12 | plotBDP2(x = c("n", "k", "ptrue", "cE", "cF"),
y = c("Prob0Successes", "PostProb0or1Successes", "bFbE",
"PEcall_p0_p1", "PEstop_p0_p1",
"PFstopEcall", "PFstopEstop",
"PEcall", "PEstop", "PFstop", "PFstopEstop",
"ExpectedNumber",
"PredictivePower"),
n, interim.at, ptrue,
pF, cF, pE, cE, p0, p1, Estop=FALSE,
shape1F, shape2F, shape1E = NULL, shape2E = NULL,
col = c("green", "red"), cex.legend=1, add = FALSE,
show=TRUE, progress = FALSE, ...)
|
x |
character string specifying what is given by the x axis
|
y |
character string specifying what is given by the y axis
|
n |
sample size at the final analysis, vector if |
interim.at |
vector of sample sizes at the interim analyses |
ptrue |
true (assumed) response rate used for simulating the trial, vector if |
pF |
response rate used for the futility criterion P(p>pF|Data) < cF (may be identical to pE) |
cF |
critical level of posterior probabilities used for declaring futility, vector if |
pE |
response rate used for the efficacy criterion P(p>pE|Data) >= cE |
cE |
critical level of posterior probabilities used for declaring efficacy, vector if |
p0 |
response rate corresponding to H0 |
p1 |
response rate corresponding to H1 (p1 > p0) |
shape1F |
first parameter of the Beta prior for futility analysis |
shape2F |
second parameter of the Beta prior for futility analysis |
shape1E |
first parameter of the Beta prior for efficacy analysis |
shape2E |
second parameter of the Beta prior for efficacy analysis |
Estop |
Stop for efficacy? Defaults to |
col |
line color, for some plots vector of length 2. |
add |
add line to existing plot. Only supported if |
show |
show plot (otherwise computed objects are invisibly returned) |
progress |
only used by shiny app |
cex.legend |
size of legend text relative to cex |
... |
additional arguments passed to |
Kopp-Schneider, A., Wiesenfarth, M., Witt, R., Edelmann, D., Witt, O. and Abel, U. (2018).
Monitoring futility and efficacy in phase II trials with Bayesian
posterior distributions - a calibration approach.
Biometrical Journal, to appear.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | # See vignette for more details and examples
pF=0.3
pE=0.12
shape1F=0.3
shape2F=0.7
shape1E=0.12
shape2E=0.88
cF=0.01
cE=0.9
nvec=c(18:40)
interim.at=c(10,20,30)
# Type I error and probability of true stopping for the uninteresting response rate.
ptrue=0.12
plotBDP2(x="n", y="PFstopEcall",
n =nvec, interim.at = interim.at,
pF=pF,cF=cF,pE=pE,cE=cE,ptrue=ptrue,
shape1F=shape1F,shape2F=shape2F,shape1E=shape1E,shape2E=shape2E)
# Power and probability of false stopping for the target response rate.
ptrue=0.3
plotBDP2(x="n", y="PFstopEcall",
n =nvec, interim.at = interim.at,
pF=pF,cF=cF,pE=pE,cE=cE,ptrue=ptrue,
shape1F=shape1F,shape2F=shape2F,shape1E=shape1E,shape2E=shape2E)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.