plot.see_estimate_density {see} | R Documentation |
Plot method for density estimation of posterior samples
Description
The plot()
method for the bayestestR::estimate_density()
function.
Usage
## S3 method for class 'see_estimate_density'
plot(
x,
stack = TRUE,
show_intercept = FALSE,
n_columns = 1,
priors = FALSE,
priors_alpha = 0.4,
posteriors_alpha = 0.7,
size_line = 0.9,
size_point = 2,
centrality = "median",
ci = 0.95,
...
)
Arguments
x |
An object. |
stack |
Logical. If |
show_intercept |
Logical, if |
n_columns |
For models with multiple components (like fixed and random,
count and zero-inflated), defines the number of columns for the
panel-layout. If |
priors |
Logical. If |
priors_alpha |
Numeric value specifying alpha for the prior distributions. |
posteriors_alpha |
Numeric value specifying alpha for the posterior distributions. |
size_line |
Numeric value specifying size of line geoms. |
size_point |
Numeric specifying size of point-geoms. |
centrality |
Character specifying the point-estimate (centrality index)
to compute. Can be |
ci |
Numeric value of probability of the CI (between 0 and 1) to be
estimated. Default to |
... |
Arguments passed to or from other methods. |
Value
A ggplot2-object.
Examples
library(rstanarm)
library(bayestestR)
set.seed(123)
m <<- suppressWarnings(stan_glm(Sepal.Length ~ Petal.Width * Species, data = iris, refresh = 0))
result <- estimate_density(m)
plot(result)