Learn R Programming

see (version 0.5.2)

plot.see_parameters_model: Plot method for model parameters

Description

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

Usage

# S3 method for see_parameters_model
plot(
  x,
  show_intercept = FALSE,
  point_size = 0.8,
  sort = NULL,
  n_columns = NULL,
  ...
)

# S3 method for see_parameters_sem plot( x, data = NULL, type = c("regression", "correlation", "loading"), threshold_coefficient = NULL, threshold_p = NULL, ci = TRUE, size = 22, ... )

Arguments

x

An object.

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.

point_size

Size of point-geoms.

sort
Plotting model parameters

If NULL, coefficients are plotted in the order as they appear in the summary. Use sort = "ascending" (or sort = TRUE)) resp. sort = "descending" to sort coefficients in ascending or descending order.

Plotting Bayes factors

Sort pie-slices by posterior probability (descending)?

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.

data

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

type

Character vector, indicating the type of plot.

threshold_coefficient

Numeric, threshold at which value coefficients will be displayed.

threshold_p

Numeric, threshold at which value p-values will be displayed.

ci

Logical, whether confidence intervals should be added to the plot.#'

size

Size of geoms. Depends on the context of the plot() function, so this argument may change size of points, lines or bars.

Value

A ggplot2-object.

Examples

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

Run the code above in your browser using DataLab