Learn R Programming

see (version 0.6.4)

plot.see_si: Plot method for support intervals

Description

The plot() method for the bayestestR::si().

Usage

# S3 method for see_si
plot(
  x,
  si_color = "#0171D3",
  si_alpha = 0.2,
  show_intercept = FALSE,
  support_only = FALSE,
  ...
)

Arguments

x

An object.

si_color

Color of SI ribbon.

si_alpha

Transparency level of SI ribbon.

show_intercept

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.

support_only

Plot only the support data, or show the "raw" prior and posterior distributions? Only applies when plotting si.

...

Arguments passed to or from other methods.

Value

A ggplot2-object.

Examples

Run this code
# NOT RUN {
if (require("bayestestR") && require("rstanarm")) {
  set.seed(123)
  m <- stan_glm(Sepal.Length ~ Petal.Width * Species, data = iris, refresh = 0)
  result <- si(m)
  result
  plot(result)
}
# }

Run the code above in your browser using DataLab