powered by
Computes the parameters and mixing probabilities for a binomial sampling problem where the prior is a discrete mixture of beta densities.
binomial.beta.mix(probs,betapar,data)
vector of probabilities of the beta components of the posterior
matrix where each row contains the shape parameters for a beta component of the posterior
vector of probabilities of the beta components of the prior
matrix where each row contains the shape parameters for a beta component of the prior
vector of number of successes and number of failures
Jim Albert
probs=c(.5, .5) beta.par1=c(15,5) beta.par2=c(10,10) betapar=rbind(beta.par1,beta.par2) data=c(20,15) binomial.beta.mix(probs,betapar,data)
Run the code above in your browser using DataLab