Compute posterior/predictive probability given data.
BM_Res.RdThis function computes the posterior and predictive (if possible) probability of Bayesian Monitoring
Usage
BM_Res(
nmax,
n1,
m,
pt,
theta0,
eff_cut,
fut_cut,
a = 1,
b = 1,
pred_type = 2,
hdi_num = 1000
)Arguments
- nmax
full sample size
- n1
sample size for interim analysis, if
n1=nmaxthen this is a one-stage design- m
number of responders when doing the analysis
- pt
posterior probability target during the computation of predictive probability
- theta0
ORR target during the computation of predictive probability
- eff_cut
efficacy boundary of ORR
- fut_cut
futility boundary of ORR
- a
1st parameter of prior beta distribution
- b
2nd parameter of prior beta distribution
- pred_type
type of predictive probability computation. It's STRONGLY recommended to set it as 2.
- hdi_num
number of points to use when computing HDI
Value
An object of class gonogo_orr_bm_df, which is a data.frame with
additional attributes and it contains the following:
arguments used to compute the results, namely
nmax,n1,m,pt,theta0,eff_cut,fut_cut,a,b,pred_typeandhdi_num.obs_resp_num: number of observed responders.obs_orr: observed ORRci_lowerandci_upper: 95% confidence interval for underlying ORR, based on Clopper-Pearson methodpmean: posterior mean of ORRhdi_lowerandhdi_upper: 95% credible interval based on HDI methodgo_post_prob: posterior probability for efficacy criteria given current data, i.e. Pr(ORR > eff_cut| current data)nogo_post_prob: posterior probability for futiliy criteria given current data, i.e. Pr(ORR <= eff_cut| current data)pred_prob: predictive probability for "declaring efficacy at final analysis". This is only provided for interim analysis (n1 < nmax). Otherwise this isNA.
Examples
# sample size = 40, IA at n = 20, observed 10 responders
nmax <- 40
n1 <- 20
m <- 10
# ORR boundary to declare efficacy at FA is 0.35
theta0 <- 0.35
# Posterior probability target ("confidence") to declare efficacy is 0.6
pt <- 0.6
# efficacy boundary and futility boundary for computing posterior probability is 0.35 and 0.25
eff_cut <- 0.35 # `eff_cut` is usually the same as `theta0`
fut_cut <- 0.25
# Then the bayesian monitoring results at this IA is
BM_Res(nmax, n1, m, pt, theta0, eff_cut, fut_cut)
#> nmax n1 m pt theta0 eff_cut fut_cut a b pred_type hdi_num obs_resp_num
#> 1 40 20 10 0.6 0.35 0.35 0.25 1 1 2 1000 10
#> obs_orr ci_lower ci_upper pmean hdi_lower hdi_upper go_post_prob
#> 1 0.5 0.2719578 0.7280422 0.5 0.2969266 0.7030734 0.9228185
#> nogo_post_prob pred_prob
#> 1 0.00642271 0.9671298
# If at FA, we observed 20 responders, then the bayesian monitoring results at FA is
m <- 20
BM_Res(nmax, nmax, m, pt, theta0, eff_cut, fut_cut)
#> nmax n1 m pt theta0 eff_cut fut_cut a b pred_type hdi_num obs_resp_num
#> 1 40 40 20 0.6 0.35 0.35 0.25 1 1 2 1000 20
#> obs_orr ci_lower ci_upper pmean hdi_lower hdi_upper go_post_prob
#> 1 0.5 0.3380178 0.6619822 0.5 0.3507131 0.6492869 0.9760651
#> nogo_post_prob pred_prob
#> 1 0.0002742483 NA
# A `format` method is provided to provide more readable results
m_vec <- 0 : n1
res <- BM_Res(nmax, n1, m_vec, pt, theta0, eff_cut, fut_cut)
format(res)
#> nmax n1 ORR CI Post_mean HDI Go_pprob Nogo_pprob
#> 1 40 20 0(0.00) 0.00 - 0.17 0.05 0.00 - 0.13 0.0% 99.8%
#> 2 40 20 1(0.05) 0.00 - 0.25 0.09 0.00 - 0.21 0.1% 98.1%
#> 3 40 20 2(0.10) 0.01 - 0.32 0.14 0.02 - 0.28 0.9% 92.5%
#> 4 40 20 3(0.15) 0.03 - 0.38 0.18 0.04 - 0.34 3.3% 80.8%
#> 5 40 20 4(0.20) 0.06 - 0.44 0.23 0.07 - 0.40 9.2% 63.3%
#> 6 40 20 5(0.25) 0.09 - 0.49 0.27 0.10 - 0.46 20.1% 43.3%
#> 7 40 20 6(0.30) 0.12 - 0.54 0.32 0.13 - 0.51 35.7% 25.6%
#> 8 40 20 7(0.35) 0.15 - 0.59 0.36 0.17 - 0.56 53.6% 13.0%
#> 9 40 20 8(0.40) 0.19 - 0.64 0.41 0.21 - 0.61 70.6% 5.6%
#> 10 40 20 9(0.45) 0.23 - 0.68 0.45 0.25 - 0.66 83.8% 2.1%
#> 11 40 20 10(0.50) 0.27 - 0.73 0.50 0.30 - 0.70 92.3% 0.6%
#> 12 40 20 11(0.55) 0.32 - 0.77 0.55 0.34 - 0.75 96.9% 0.2%
#> 13 40 20 12(0.60) 0.36 - 0.81 0.59 0.39 - 0.79 98.9% 0.0%
#> 14 40 20 13(0.65) 0.41 - 0.85 0.64 0.44 - 0.83 99.7% 0.0%
#> 15 40 20 14(0.70) 0.46 - 0.88 0.68 0.49 - 0.87 99.9% 0.0%
#> 16 40 20 15(0.75) 0.51 - 0.91 0.73 0.54 - 0.90 100.0% 0.0%
#> 17 40 20 16(0.80) 0.56 - 0.94 0.77 0.60 - 0.93 100.0% 0.0%
#> 18 40 20 17(0.85) 0.62 - 0.97 0.82 0.66 - 0.96 100.0% 0.0%
#> 19 40 20 18(0.90) 0.68 - 0.99 0.86 0.72 - 0.98 100.0% 0.0%
#> 20 40 20 19(0.95) 0.75 - 1.00 0.91 0.79 - 1.00 100.0% 0.0%
#> 21 40 20 20(1.00) 0.83 - 1.00 0.95 0.87 - 1.00 100.0% 0.0%
#> Pred_prob
#> 1 0.0%
#> 2 0.0%
#> 3 0.0%
#> 4 0.3%
#> 5 1.9%
#> 6 7.8%
#> 7 22.2%
#> 8 45.3%
#> 9 70.1%
#> 10 88.1%
#> 11 96.7%
#> 12 99.4%
#> 13 99.9%
#> 14 100.0%
#> 15 100.0%
#> 16 100.0%
#> 17 100.0%
#> 18 100.0%
#> 19 100.0%
#> 20 100.0%
#> 21 100.0%