R/plot.point_estimates.R
plot.see_point_estimate.RdThe plot() method for the bayestestR::point_estimate().
# S3 method for class 'see_point_estimate'
plot(
x,
data = NULL,
size_point = 2,
size_text = 3.5,
panel = TRUE,
show_labels = TRUE,
show_intercept = FALSE,
priors = FALSE,
alpha_priors = 0.4,
...
)An object.
The original data used to create this object. Can be a statistical model.
Numeric specifying size of point-geoms.
Numeric value specifying size of text labels.
Logical, if TRUE, plots are arranged as panels; else,
single plots are returned.
Logical. If TRUE, the text labels for the point
estimates (i.e. "Mean", "Median" and/or "MAP") are
shown. You may set show_labels = FALSE in case of overlapping
labels, and add your own legend or footnote to the plot.
Logical, if TRUE, the intercept-parameter is included
in the plot. By default, it is hidden because in many cases the
intercept-parameter has a posterior distribution on a very different
location, so density curves of posterior distributions for other parameters
are hardly visible.
Logical. If TRUE, prior distributions are simulated
(using bayestestR::simulate_prior()) and added
to the plot.
Numeric value specifying alpha for the prior distributions.
Arguments passed to or from other methods.
A ggplot2-object.
if (FALSE) { # identical(Sys.getenv("NOT_CRAN"), "true") && require("rstanarm")
library(rstanarm)
library(bayestestR)
set.seed(123)
m <<- suppressWarnings(stan_glm(Sepal.Length ~ Petal.Width * Species, data = iris, refresh = 0))
result <- point_estimate(m, centrality = "median")
result
plot(result)
}