Description Usage Arguments Examples
This function mimics plotPost()
from Kruschke's Doing Bayesian Data Analysis
and provides a highly customized plot of a vector of posterior samples for
a parameter.
The options to save the plot to a file have been removed since there are other
general purpose ways of doing this, and it isn't needed if you are working in
R Markdown, which is recommended for reporting.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | plotPost(
samples,
center = c("mode", "median", "mean"),
cenTend = center,
comparison_value = NULL,
compVal = comparison_value,
ROPE = NULL,
hdi_prob = 0.95,
credMass = hdi_prob,
hdi_text_place = 0.7,
HDItextPlace = hdi_text_place,
quietly = FALSE,
xlab = "Param. Val.",
xlim = NULL,
yaxt = "n",
ylab = "",
main = "",
cex = 1.4,
cex.lab = 1.5,
col = "skyblue",
border = "white",
showCurve = FALSE,
breaks = NULL,
...
)
plot_post(
samples,
center = c("mode", "median", "mean"),
cenTend = center,
comparison_value = NULL,
compVal = comparison_value,
ROPE = NULL,
hdi_prob = 0.95,
credMass = hdi_prob,
hdi_text_place = 0.7,
HDItextPlace = hdi_text_place,
quietly = FALSE,
xlab = "Param. Val.",
xlim = NULL,
yaxt = "n",
ylab = "",
main = "",
cex = 1.4,
cex.lab = 1.5,
col = "skyblue",
border = "white",
showCurve = FALSE,
breaks = NULL,
...
)
|
samples |
a vector of (posterior) sampled values |
cenTend |
measure of central tendency to use.
One of |
comparison_value, |
compVal number for "comparison value" |
ROPE |
a vector of length 2 giving the ends of the region of practical equivalence |
hdi_prob, credMass |
probability for HDI interval |
hdi_text_place, HDItextPlace |
location of HDI text on plot. |
quietly |
if TRUE, return summary invisibly. |
xlab, xlim, yaxt, ylab, main, cex, cex.lab, col, border, showCurve, breaks |
arguments for
|
... |
additional arguments passed along to |
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.