View source: R/NAME_bayesbox.R
bayesbox | R Documentation |
Similar to Allen Downey's concept of a Bayes Box, such a table is computed by this function. It can be used for simple Bayes models of discrete (non-continuous) variables.
bayesbox(hyps, priors, liks, round = 2L)
hyps |
Vector of hypotheses (all types allowed), serves as ID |
priors |
Vector of prior probabilites (numeric) |
liks |
Vector of likelihoods (numeric) |
round |
number of decimal places, NULL for not rounding (integer) |
data.frame with Bayes Box
hyps <- seq(0,1, by = .1)
bayesbox(hyps = hyps, priors = 1, liks = dbinom(x = 5, size = 7, prob = hyps, round = 3))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.