plotHPDregion2D.Rd
Given a sample from a multivariate posterior distribution, plot the bivariate region of highest marginal posterior density (HPD) for two variables with defined levels.
plotHPDregion2D(
trace,
vars,
prob = c(0.95, 0.75, 0.5, 0.25, 0.1),
xlab = NULL,
ylab = NULL,
plot = TRUE
)
either a data.frame
or mcmc
object.
which variables to plot: numeric or character vector
probability level
x axis label
y axis label
if TRUE
the plot is displayed, and returned otherwise.
HPD levels are computed using the function
HPDregionplot
from the package emdbook
.