bayes_binom_one_postprob_onestage: Bayesian single-arm single-endpoint minimum sample size

Description Usage Arguments Value See Also Examples

View source: R/bayes_binom_one_postprob_onestage_v2.0.R

Description

Generate minimum sample size for the Bayesian single-endpoint single-arm trial. Also provided a shiny app to evaluate the same thing with both frequentist and Bayesian methods side by side.

Usage

1
2
3
4

Arguments

p0

Probability of success under the null hypothesis

p1

Probability of success under the alternative hypothesis

eta

The smallest probability that p is less than p1 which is allowed to stop for futility

zeta

The smallest probability that p is greater than p0 which is allowed to stop for efficacy

prior.a,prior.b

The prior parameters for the beta prior distribution

round

Optionally round the probability outputs to 3 significant figures

Value

Returns an object of class trialDesign_binom_one

See Also

bayes_binom_one_postprob_nstage

Examples

1
2
3
4
5
6
7
p0=0.1
p1=0.3
eta=c(0.9)
zeta=c(0.9)
prior.a=0
prior.b=0
bayes_binom_one_postprob_onestage(p0,p1,eta,zeta,prior.a,prior.b)

Example output

Loading required package: shiny
Loading required package: VGAM
Loading required package: stats4
Loading required package: splines
Loading required package: data.table
Loading required package: plyr
Loading required package: clinfun
Trial design and properties for single arm, single endpoint trial designs

 reviews success
      17       4

p0     : 0.1
p1     : 0.3
Alpha  : 0.083
Power  : 0.798
Exp(p0): 17
Exp(p1): 17
Eta    : 0.932
Zeta   : 0.901 

EurosarcBayes documentation built on May 2, 2019, 9:20 a.m.