Description Usage Arguments Value Examples
This function calculates the Bayesian predictive probability P(Delta>Dcut|N_exp,N_ctrl,n1_exp,n1_ctrl,x1) with Delta=Delta_exp-Delta_ctrl
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | Pred_Prob_R(
p_exp,
p_ctrl,
N_exp,
N_ctrl,
n1_exp,
n1_ctrl,
distrisize = 1000,
nsim = 1000,
Dcut,
PostProb,
beta_par_exp,
beta_par_ctrl,
printprogress = T
)
|
p_exp |
observed proportion experimental arm |
p_ctrl |
observed proportion control arm |
N_exp |
number of patients in experimental arm (scalar) at end of study |
N_ctrl |
number of patients in control arm (scalar) at end of study |
n1_exp |
number of patients in experimental arm (scalar) at interim |
n1_ctrl |
number of patients in control arm (scalar) at interim |
distrisize |
Size of sampled distributions (the larger, the better) |
nsim |
Number of simulation to sample from predictive distribution |
Dcut |
True difference between two proportions (can be a vector) |
PostProb |
Threshold for outcome at the end of the study, in terms of Bayesian posterior probability P(theta>Dcut|x1+x2)>PostProb, with x1 the difference in proportions at interim and x2 at the final |
beta_par_exp |
two shape parameters c(alpha,beta) for prior beta distribution experimental arm |
beta_par_ctrl |
two shape parameters c(alpha,beta) for prior beta distribution control arm |
printprogress |
print progress bar (logical) |
Predictive Probability for outcome at the end of the study
1 2 | Pred_Prob_R(p_exp=0.475,p_ctrl=0.475-0.08,N_exp=100,N_ctrl=100,n1_exp=50,n1_ctrl=50,
distrisize=10^3,nsim=10^3,PostProb=0.83,Dcut=0,beta_par_exp=c(1,1),beta_par_ctrl=c(1,1))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.