This function generates and plots convergence traceplots for the alpha parameter from an Hmsc model, using various diagnostics and visualizations to assess convergence. It supports customization of plot aesthetics and layout.
Usage
PlotAlpha(
Post = NULL,
Model = NULL,
Title = NULL,
NRC = NULL,
AddFooter = TRUE,
AddTitle = TRUE,
Cols = NULL,
FromHPC = TRUE,
MarginType = "histogram"
)
Arguments
- Post
A
coda
object or a string path to a savedcoda
object containing the posterior samples for the alpha parameter.- Model
A fitted model object or a string path to a saved model object containing the samples and metadata necessary for plotting.
- Title
A string specifying the main title of the plot.
- NRC
numeric vector of length 2 specifying the number of rows and columns per page of plots. If
NULL
, it is automatically determined based on the number of levels of the alpha parameter.A logical value indicating whether to add a footer with page numbers to each plot page. Defaults to
TRUE
.- AddTitle
A logical value indicating whether to add the main title (specified by
Title
) to the plot. Defaults toTRUE
.- Cols
Character vector for chain colours (optional). Default:
NULL
.- FromHPC
Logical. Indicates whether the function is being run on an HPC environment, affecting file path handling. Default:
TRUE
.- MarginType
A string specifying the type of marginal plot to add to the main plot. Must be either "histogram" or "density". Default: "histogram".