Learn R Programming

sectorgap (version 0.1.0)

plot_densities: Prior and posterior plots

Description

Creates diagnostic plots of the posterior distribution.

Usage

plot_densities(
  fit,
  file_path,
  n_col = 4,
  alpha = 0.05,
  save = TRUE,
  title = TRUE,
  device = "jpg",
  width = 10,
  height = 2,
  units = "in"
)

Value

nothing

Arguments

fit

fitted object

file_path

file path for plots

n_col

number of columns for grid plots

alpha

cut off value for posterior (only used if plot_type = "density")

save

boolean indicating if plots should be saved, if FALSE, the plots will be printed instead, default is save = FALSE (ignored if file_path is provided)

title

boolean indicating if plots should contain titles

device

character string with format used in ggsave

width

plot width in units, for grid plots adjusted for the number of plot columns n_col

height

plot height in units, for grid plots adjusted for the number of plot rows implied by n_col

units

units for plot size ("in", "cm", "mm", or "px")