Description Usage Arguments Value Examples
Displaying the Prior and the Posterior Probabilities
1 | bayes.plot(prior, post, group, cond, dcol, cex = 1, dig = 4)
|
prior |
Prior probability distribution vector. |
post |
Posterior probability distribution vector. |
group |
Class names, Default: A, B, C, ... |
cond |
Conditional event name, Default: F |
dcol |
Bar chart colors, Default: transparent rainbow colors |
cex |
Text size of the probability, Default: 1 |
dig |
Number of digits below the decimal point, Default: 4 |
None.
1 2 3 4 5 | prior = c(0.2, 0.4, 0.3, 0.1)
cond = c(0.04, 0.02, 0.01, 0.05)
tot = prior*cond
post = tot / sum(tot)
bayes.plot(prior, post)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.