plot_priors_posts_mcmc: Plot MCMC priors and posteriors for iSCAM models

View source: R/plot-priors-posts-mcmc.R

plot_priors_posts_mcmcR Documentation

Plot MCMC priors and posteriors for iSCAM models

Description

Priors and posteriors comparison plots for parameters in an MCMC run

Usage

plot_priors_posts_mcmc(
  model,
  param_rm = c("sel", "bo", "tau", "sigma"),
  priors_only = FALSE,
  text_title_size = 12,
  ...
)

Arguments

model

An iscam model object (class mdl_cls)

param_rm

A vector of parameter names to remove. If any are not found in the output, a warning will be issued. If NULL, nothing is removed

priors_only

Logical. If TRUE, plot the priors only, not the posteriors

text_title_size

Add the model description as a title with this font size. The text comes from the model_desc attribute of model. If this is NULL, don't show a title

...

Additional arguments passed to cowplot::plot_grid()

Details

Plots the priors overlaid on the posteriors for the given iscam model. The values in the control file (model$ctl$params) for each prior are:

  1. ival = initial value

  2. lb = lower bound

  3. ub = upper bound

  4. phz = ADMB phase

  5. prior = prior distribution funnction 0 = Uniform 1 = normal (p1 = mu, p2 = sig) 2 = lognormal (p1 = log(mu), p2 = sig) 3 = beta (p1 = alpha, p2 = beta) 4 = gamma (p1 = alpha, p2 = beta)

  6. p1 (defined by 5 above)

  7. p2 (defined by 5 above)

See plot_distribution() for prior plot details including an documentation on the vertical lines

See Also

Other MCMC diagnostics plots: plot_autocorr_mcmc(), plot_pairs_mcmc(), plot_traces_mcmc()


pbs-assess/gfiscamutils documentation built on Oct. 24, 2024, 1:37 p.m.