pairs.density | R Documentation |
A pairs plot showing the posterior distribution of the given list of Monte Carlo draws. Plots above the diagonal show the posterior distribution on a scale just wide enough to fit the plots. The diagonal shows a marginal density plot, and the subdiagonal shows the distribution with all plots on a common scale.
PairsDensity(draws,
nlevels = 20,
lty = NULL,
color = NULL,
subset = NULL,
labels,
legend.location = "top",
legend.cex = 1,
label.cex = 1,
...)
draws |
Either a matrix or a list of matrices. If a list is provided then each list element is plotted as a separate set of contours, and all matrices must have the same number of columns (though the number of rows can differ). |
nlevels |
The number of contour levels to plot. |
lty |
The line types to use for the different elements in
|
color |
The color to use for different elements in |
subset |
If draws is a list, then this can be a numerical vector.
If draws has names, then subset can be a character vector naming
which elements to include. If |
labels |
If |
legend.location |
Either |
legend.cex |
Scale factor to use for the legend labels. |
label.cex |
Scale factor to use for the row and column labels. |
... |
Extra arguments (graphical parameters), passed to
|
Steven L. Scott
pairs
, CompareDensities
, CompareManyDensities
## You can see the pairs plot for a single set of draws.
y <- matrix(rnorm(5000, mean = 1:5), ncol = 5, byrow = TRUE)
PairsDensity(y)
## You can also compare two or more sets of draws.
z <- matrix(rnorm(2500, mean = 2:6), ncol = 5, byrow = TRUE)
PairsDensity(list("first set" = y, "second set" = z))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.