| posterior_plot | R Documentation |
Visualize marginal posterior distributions of parameters extracted from [ngme_sgld_samples()] or summarized by [ngme_sgld_ci()].
posterior_plot(
x,
parameters = NULL,
type = c("density", "histogram"),
by_chain = FALSE,
show_estimate = TRUE,
show_interval = TRUE,
lower = NULL,
upper = NULL,
bins = 30,
ncol = NULL,
...
)
## S3 method for class 'ngme_sgld_ci'
plot(x, ...)
x |
a data.frame (or list of data.frames) returned by [ngme_sgld_samples()], or an object of class 'ngme_sgld_ci'. |
parameters |
optional character vector of parameter names to plot. Defaults to all parameter columns. |
type |
character; '"density"' (default) or '"histogram"'. |
by_chain |
logical; if 'TRUE', color distributions by chain when a '.chain' column is available. |
show_estimate |
logical; add a vertical line at the posterior mean. |
show_interval |
logical; add vertical lines for the equal-tail interval. |
lower |
lower quantile probability used for intervals. If 'x' is an 'ngme_sgld_ci' object, the stored value is used by default. |
upper |
upper quantile probability used for intervals. If 'x' is an 'ngme_sgld_ci' object, the stored value is used by default. |
bins |
number of bins for histograms. |
ncol |
number of facet columns. If 'NULL', use 2 columns for multiple parameters and 1 for a single parameter. |
... |
unused. |
A faceted ggplot object.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.