plotSimplex | R Documentation |
This function plots, univariately, the posterior densities obtained in Bayesian analyses.
plotSimplex(
results,
A = "Alg. A",
B = "Alg. B",
plot.density = TRUE,
plot.points = TRUE,
palette = c("green", "darkgray", "red"),
point.size = 1,
font.size = 5,
alpha = NULL,
posterior.label = FALSE
)
results |
A list containing, at least three elements, one named |
alpha |
Numeric value for the transparency of the points, only applicable if |
parameter |
Either a string or a number indicating, in case the posterior is approximated, the parameter to be ploted (i.e., the name or the index of a column in the sample matrix) |
... |
Additional parameters to the Rgraphviz function. This is mainly to change the layout of the graph |
plot.rope |
A logical value indicating whether the rope has to be plotted or not. Note that not for all parameter the rope makes sense |
num.points |
Number of points used to plot the functions |
plot.samples |
A logical value. If true, the samples are plotted (only when the posterior is approximate) |
Note that if the methods are exact (not simulated), the true density can be plotted but, for those cases where the posterior is approximated through sampling, the function will plot a kernel density estimation of the posterior and, thus, the probabilities computed by other functions are not directly the areas under the densities.
An object of class ggplot with the plot
x <- rnorm(150, 1, 0.5)
y <- rnorm(150, 1, 0.05)
results <- bSignedRankTest(x=x, y=y, rope=c(-0.15, 0.15))
plotSimplex(results, posterior.label=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.