The plot() method for the bayestestR::p_direction() function.
# S3 method for class 'see_p_direction'
plot(
x,
data = NULL,
show_intercept = FALSE,
priors = FALSE,
alpha_priors = 0.4,
n_columns = 1,
...
)An object.
The original data used to create this object. Can be a statistical model.
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.
For models with multiple components (like fixed and random,
count and zero-inflated), defines the number of columns for the
panel-layout. If NULL, a single, integrated plot is shown.
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 <- p_direction(m)
plot(result)
}