Description Usage Arguments Value Author(s) Examples
View source: R/bayesian_crank.R
Given a data table with columns Prior and Likelihood, computes posterior probabilities
1 |
d |
data frame with columns Prior and Likelihood |
data frame with new columns Product and Posterior
Jim Albert
1 2 3 4 5 6 | df <- data.frame(p=c(.1, .3, .5, .7, .9),
Prior=rep(1/5, 5))
y <- 5
n <- 10
df$Likelihood <- dbinom(y, prob=df$p, size=n)
df <- bayesian_crank(df)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.