Learn R Programming

see (version 0.5.2)

plot.see_parameters_simulate: Plot method for simulated model parameters

Description

The plot() method for the parameters::simulate_parameters() function.

Usage

# S3 method for see_parameters_simulate
plot(
  x,
  data = NULL,
  stack = TRUE,
  show_intercept = FALSE,
  n_columns = NULL,
  ...
)

Arguments

x

An object.

data

The original data used to create this object. Can be a statistical model or such.

stack

Logical, if TRUE, densities are plotted as stacked lines. Else, densities are plotted for each parameter among each other.

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.

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 NULL, a single, integrated plot is shown.

...

Arguments passed to or from other methods.

Value

A ggplot2-object.

Examples

Run this code
# NOT RUN {
library(parameters)
m <- lm(mpg ~ wt + cyl + gear, data = mtcars)
result <- simulate_parameters(m)
result
plot(result)
# }

Run the code above in your browser using DataLab