| B2prop | R Documentation | 
Cod to compare two proportions using bayesian model with beta priors
B2prop(
  var1,
  var2,
  n.iter = 11000,
  n.burnin = 1000,
  n.thin = 1,
  prior.beta = c(1, 1, 1, 1)
)
var1 | 
 variable 1  | 
var2 | 
 = variable 2  | 
n.iter | 
 number of iteration  | 
n.burnin | 
 number of iteration used in the update of the model  | 
n.thin | 
 n thin  | 
prior.beta | 
 beta priors (vector of 4 parameters, two first for var1)  | 
list with Stats (descriptive stats) and MCMC (inference)
JuG
dtf<-data.frame(grp=c(rep("A",15),rep("B", 15)),
                res=c(rbinom(n = 15, size = 1, prob = .5),
                      rbinom(n = 15, size = 1, prob = .49)) )
res <- B2prop(var1 = dtf$res[dtf$grp=="A"], var2 = dtf$res[dtf$grp=="B"])
res
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.