View source: R/MCMCaccessories.R
postTable | R Documentation |
Reports a table containing the mode, mean, and highest posterior density of the marginal posterior distribution.
postTable(mcpost, ind = NULL, sigdig = 3, ...)
mcpost |
Object of class |
ind |
Column indices for the subset of |
sigdig |
Integer value for the number of significant digits to report. |
... |
Additional arguments. |
A character matrix
of two rows and ncol(mcpost)
columns
(length(ind)
when ind
is not NULL
). The first row
contains component names from mcpost
. The second row contains a
a string representing the posterior mode then posterior mean, separated by
a comma, followed by the lower and upper limits of the highest posterior
density, enclosed in parentheses.
Other MCMC posterior distribution helper functions:
plot2mcmc()
,
postPlot()
# Simulate two example MCMC chains:
## Both are standard normal distributions of only positive values
## However, one is on the boundary (near zero) while the other is not
normMCMC <- coda::mcmc(matrix(c(abs(rnorm(1000, 0.2, 1)), rnorm(1000, 10, 1)),
ncol = 2))
postTable(normMCMC)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.