# Generate some data
foo <- rbeta(1e4, 5, 7)
# check overlap with a Beta(0.2, 0.2) prior:
postPriorOverlap(foo, dbeta, list(shape1=0.2, shape2=0.2))
# check overlap with a Uniform(0, 1) prior:
postPriorOverlap(foo, runif(1e6))
Run the code above in your browser using DataLab