Description Usage Arguments Value Author(s) See Also Examples
coda_hist
uses the hist
function inbase R
to plot histograms of the marginal posterior
distribution for each parameter specified by the parameters argument.
In addition, a density overlay, rug of mcmc sample values, median value
(bold vertical dash), and 95% credibility interval (bold horizontal
line) are plotted. A single histogram is printed per graphics device.
1 |
coda.object |
An mcmc.list object |
parameters |
character vector of parameter names to include in graphic. If none are supplied all monitored parameters are included. |
A graphics device
Michael Malick
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | library(coda)
data(line)
coda_hist(line)
coda_hist(line, parameters = "alpha")
coda_hist(line, parameters = c("alpha", "beta"))
coda_hist(line, parameters = grep("sig", varnames(line), value = TRUE))
coda_hist(line, parameters = grep("a", varnames(line), value = TRUE))
coda_hist(line, parameters = c("alpha", grep("sig", varnames(line),
value = TRUE)))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.