Description Usage Arguments See Also Examples
This class is used to compare designs and methodologies frequentist and bayesian properties. To use it create a list of trial designs of class trialDesign_binom_two and assign the class as list_trialDesign_binom_two (class(x)=c("list_trialDesign_binom_two",class(x))
).
1 2 |
x |
A list of the S4 class object bayes_binom_two_postprob |
... |
Standard arguments to pass to print |
bayes_binom_two_postprob
, bayes_binom_two_postlike
,bayes_binom_two_loss
,freq_binom_two_bryantday_twostage
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 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | ## Frequentist simulations
# modelled toxicity probability
t=c(0.1,0.3,0.1,0.3)
# modelled response probability
r=c(0.35,0.2,0.2,0.35)
## Bayesian uniform prior
pra=1;prb=1;pta=1;ptb=1
## bayesian cutoffs
futility_critical_value=0.35
efficacy_critical_value=0.2
toxicity_critical_value=0.1
no_toxicity_critical_value=0.3
###############################################################
# Frequentist methods
###############################################################
# Single stage
r1=0.35
r0=0.2
t0=0.3
t1=0.1
power=0.8
alpha=0.1
nmax=50
out_single=freq_binom_two_singlestage(r0,r1,t0,t1,power,alpha,nmax,
adjust=TRUE)
single_stage=properties(out_single,t,r,pra,prb,pta,ptb,
futility_critical_value,efficacy_critical_value,
toxicity_critical_value,no_toxicity_critical_value)
print(single_stage)
###############################################################
# Bayesian posterior probability approach
# analysis at
reviews=c(44)
# Stopping rules at each analysis
futility_prob_stop=0.9
efficacy_prob_stop=0.9
toxicity_prob_stop=0.9
no_toxicity_prob_stop=0.9
bayes_prob_single=bayes_binom_two_postprob(t,r,reviews,pra,prb,pta,
ptb,futility_critical_value,futility_prob_stop,
efficacy_critical_value,efficacy_prob_stop,
toxicity_critical_value,toxicity_prob_stop,
no_toxicity_critical_value,no_toxicity_prob_stop)
bayes_prob_single
# analysis at
reviews=c(10,17,24,30,37,44)
# Stopping rules at each analysis
futility_prob_stop=c(0.95,0.95,0.95,0.95,0.95,0.9)
efficacy_prob_stop=c(1,1,0.95,0.95,0.95,0.9)
toxicity_prob_stop=c(0.95,0.95,0.95,0.95,0.95,0.9)
no_toxicity_prob_stop=c(1,1,0.95,0.95,0.95,0.9)
bayes_prob_six=bayes_binom_two_postprob(t,r,reviews,pra,prb,pta,
ptb,futility_critical_value,futility_prob_stop,
efficacy_critical_value,efficacy_prob_stop,
toxicity_critical_value,toxicity_prob_stop,
no_toxicity_critical_value,no_toxicity_prob_stop)
plot(bayes_prob_six)
###############################################################
# Bayesian posterior likelihood approach
###############################################################
reviews=c(11,17,24,30,37,44)
efficacy_prob_stop=0.9
toxicity_prob_stop=0.9
# interim required probability to stop
int_combined_prob=0.95
int_futility_prob=1
int_toxicity_prob=1
int_efficacy_prob=0.95
bayes_like_six=bayes_binom_two_postlike(t,r,reviews,pra,prb,pta,
ptb,efficacy_critical_value,efficacy_prob_stop,
toxicity_critical_value,toxicity_prob_stop,int_combined_prob,
int_futility_prob,int_toxicity_prob,int_efficacy_prob,
futility_critical_value,no_toxicity_critical_value)
plot(bayes_like_six)
###############################################################
## Table of all designs
###############################################################
tble=list(single_stage=single_stage,bayes_prob_single=bayes_prob_single,
bayes_prob_six=bayes_prob_six,bayes_like_six=bayes_like_six)
class(tble)=c("list_trialDesign_binom_two",class(tble))
tble
###############################################################
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.