prior_post_plot {ProbBayes} | R Documentation |
Graphs prior and posterior probabilities
Description
Graphs prior and posterior probabilities from a discrete Bayesian model
Usage
prior_post_plot(d, Color = "orange")
Arguments
d |
data frame where the first column are the model values, and columns named Prior and Posterior |
Color |
fill color for the bars |
Value
ggplot2 object containing the graphical display.
Author(s)
Jim Albert
Examples
d <- data.frame(p=c(.1, .3, .5, .7, .9),
Prior=rep(1/5, 5))
y <- 5
n <- 10
d$Likelihood <- dbinom(y, prob=d$p, size=n)
d <- bayesian_crank(d)
prior_post_plot(d, "red")
[Package ProbBayes version 1.1 Index]