Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

pdisc

Posterior distribution for a proportion with discrete priors


Description

Computes the posterior distribution for a proportion for a discrete prior distribution.

Usage

pdisc(p, prior, data)

Arguments

p

vector of proportion values

prior

vector of prior probabilities

data

vector consisting of number of successes and number of failures

Value

vector of posterior probabilities

Author(s)

Jim Albert

Examples

p=c(.2,.25,.3,.35)
prior=c(.25,.25,.25,.25)
data=c(5,10)
pdisc(p,prior,data)

LearnBayes

Functions for Learning Bayesian Inference

v2.15.1
GPL (>= 2)
Authors
Jim Albert
Initial release
2018-03-18

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.