Description Usage Arguments Examples
This function calculates the Bayesian posterior probability P(Delta>Dcut|n,x) with Delta=Delta_exp-Delta_ctrl, with Delta_exp~beta(beta_par_exp[1]+x,beta_par_exp[2]+n_exp-x_exp) with prior beta distribution beta_par_exp, and Delta_ctrl~beta(beta_par_ctrl[1]+x,beta_par_ctrl[2]+n_ctrl-x_ctrl)
1 2 3 4 5 6 7 8 9 10 | Post_Prob_R(
p_exp,
p_ctrl,
n_exp,
n_ctrl,
distrisize,
Dcut,
beta_par_exp,
beta_par_ctrl
)
|
p_exp |
observed proportion experimental arm |
p_ctrl |
observed proportion control arm |
n_exp |
number of patients in experimental arm (scalar) |
n_ctrl |
number of patients in control arm (scalar) |
distrisize |
Size of sampled distributions (the larger, the better) |
Dcut |
True difference between two proportions (can be a vector) |
beta_par_exp |
two shape parameters c(alpha,beta) for prior beta distribution experimental arm (scalar) |
beta_par_ctrl |
two shape parameters c(alpha,beta) for prior beta distribution control arm (scalar) |
1 2 | Post_Prob_R(p_exp=0.475,p_ctrl=0.475-5/50,n_exp=50,n_ctrl=50,distrisize=10^3,
Dcut=c(0,0.05,0.075,0.1),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.