prior: Character vector selecting the prior and posterior distribution(s) to plot. May include "intercept", "trt", "het", "reg", "aux", "class_mean" or "class_sd" as appropriate.
post_args: List of arguments passed on to ggplot2::geom_histogram to control plot output for the posterior distribution
prior_args: List of arguments passed on to ggplot2::geom_path to control plot output for the prior distribution. Additionally, n controls the number of points the density curve is evaluated at (default 500), and p_limits controls the endpoints of the curve as quantiles (default c(.001, .999)).
overlay: String, should prior or posterior be shown on top? Default "prior".
ref_line: Numeric vector of positions for reference lines, by default no reference lines are drawn
Returns
A ggplot object.
Details
Prior distributions are displayed as lines, posterior distributions are displayed as histograms.
Examples
## Smoking cessation NMA# Run smoking RE NMA example if not already availableif(!exists("smk_fit_RE")) example("example_smk_re", run.donttest =TRUE)# Plot prior vs. posterior, by default all parameters are plottedplot_prior_posterior(smk_fit_RE)# Plot prior vs. posterior for heterogeneity SD onlyplot_prior_posterior(smk_fit_RE, prior ="het")# Customise plotplot_prior_posterior(smk_fit_RE, prior ="het", prior_args = list(colour ="darkred", size =2), post_args = list(alpha =0.6))