Description Usage Arguments Details Value See Also Examples
View source: R/bayes_binom_two_postprob_v2.2.R
Computes the decision rules for a single arm, two endpoint bayesian trial using posterior probabilities to generate the decision rules. This program assumes that the two endpoints are independent.
1 2 3 4 | 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)
|
t,r |
A vector of the probability of response and toxicity for the simulation scenarios used to compute frequentist properties. The print function requires the first to be the alternative hypothesis and subsequent entries to be the three null hypotheses. This can be run with any scenario when not using the print method |
reviews |
A vector of the number of patients each interim and final analysis will occur at |
pra,prb,pta,ptb |
Numeric values for the beta prior distribution to be used |
futility_critical_value,
efficacy_critical_value,
toxicity_critical_value,
no_toxicity_critical_value |
Four values, for the critical values to be used as thresholds for the posterior distribution |
futility_prob_stop,
efficacy_prob_stop,
toxicity_prob_stop,
no_toxicity_prob_stop |
Values or vectors of the probability required to stop at this interim analysis. If you do not wish to stop due to a rule set this to 1 at that analysis. If you wish to ignor a rule when stopping set this to 0 at that analysis |
Returns an object of S4 class trialDesign_binom_two-class
. This has plot and print methods. For comparison between designs saved as trialDesign_binom_two objects there is a print function for the S3 class list_trialDesign_binom_two
.
Returns an object of class trialDesign_binom_two
bayes_binom_two_postprob
, bayes_binom_two_postlike
,bayes_binom_two_loss
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 | # modelled toxicity probability
t=c(0.1,0.1,0.3,0.3)
# modelled response probability
r=c(0.35,0.2,0.2,0.35)
reviews=c(10,15,20,25,30,35,40)
# uniform prior
pra=1;prb=1;pta=1;ptb=1
futility_critical_value=0.35
futility_prob_stop=c(0.95,0.95,0.95,0.95,0.95,0.95,0)
efficacy_critical_value=0.2
efficacy_prob_stop=c(1,1,0.95,0.95,0.95,0.95,0.9)
toxicity_critical_value=0.1
toxicity_prob_stop=c(0.95,0.95,0.95,0.95,0.95,0.95,0.95)
no_toxicity_critical_value=0.3
toxicity_prob_stop=c(0.95,0.95,0.95,0.95,0.95,0.95,0.95)
s=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,toxicity_prob_stop)
s
plot(s)
|
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
cut-points at each analysis
patient review low toxicity high toxicity poor outcome good outcome
1 10 0 3 0 NA
2 15 1 4 2 NA
3 20 2 5 3 7
4 25 3 5 4 9
5 30 4 6 6 10
6 35 5 7 7 11
7 40 7 8 11 12
Frequentist properties of design
Stopping rules T=0.1, R=0.35 T=0.1, R=0.2
1 Stop early - Futility/Toxicity 24.13 74.77
4 Continue to final analysis - Futility/Toxicity 6.86 13.98
2 Stop early - Efficacy 64.79 9.94
3 Continue to final analysis - Efficacy 4.23 1.30
6 Expected number of patients recruited 23.91 22.29
T=0.3, R=0.2 T=0.3, R=0.35
1 98.65 95.27
4 0.68 0.46
2 0.59 3.94
3 0.08 0.32
6 13.17 14.13
Bayesian properties of trial design
n T>0.3 T>0.1 T>0.3 T>0.1 R>0.2 R>0.35 R>0.2 R>0.35
10 0.020 0.314 0.570 0.981 0.086 0.009 NA NA
15 0.026 0.515 0.450 0.983 0.352 0.045 NA NA
20 0.027 0.648 0.363 0.986 0.370 0.033 0.957 0.536
25 0.026 0.741 0.163 0.960 0.383 0.024 0.977 0.573
30 0.024 0.807 0.135 0.969 0.571 0.046 0.967 0.455
35 0.022 0.855 0.112 0.976 0.566 0.033 0.958 0.356
40 0.046 0.952 0.094 0.982 0.898 0.176 0.948 0.276
Futility P(R<0.35)=0.824
Efficacy P(R>0.2)=0.948
Toxicity ok P(T<0.3)=0.954
Toxicity P(T>0.1)=0.96 n alpha beta Exp.P0 Exp.P1 post.futility post.efficacy
10,15,20,25,30,35,40 0.1125 0.3098 22.29 23.91 0.824 0.948
post.toxicity post.no_toxicity
0.96 0.954
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.