plot_posteriors-ubmsFit-method function

Plot Posterior Distributions

Plot Posterior Distributions

Plot posterior distributions for selected parameters. Posteriors can be represented as density plots or histograms.

## S4 method for signature 'ubmsFit' plot_posteriors(object, pars = NULL, density = FALSE, ...)

Arguments

  • object: A fitted model of class ubmsFit
  • pars: A character vector of parameter names to include in the plot Look at names(object@stanfit) for the complete list of possible parameter names. If NULL, posteriors are shown for all parameters in the model summary output
  • density: If TRUE, show posteriors as density plots (one per chain). If FALSE, show posteriors as histograms of samples from all chains combined
  • ...: Arguments passed to ggplot2::stat_density for density plots, or ggplot2::geom_histogram for histograms. For example, you can supply argument bins to control the number of histogram bins

Returns

A ggplot

  • Maintainer: Ken Kellner
  • License: GPL (>= 3)
  • Last published: 2024-10-01