plot_density.Rd
This function creates posterior density plots for the hierarchical Bayesian model parameters aggregated by species complex. It uses the stanfit object and associated data generated by `run_stan()`. The plot can optionally be saved to a specified directory.
plot_density(
stan_results,
unlabel = FALSE,
plot_dir = NULL,
complex_names = NULL
)
Named list output from `run_stan()` containing the fitted model and related data.
Logical. If TRUE, removes labels from the plot. Default is FALSE.
Optional character. Directory path to save the plot image. If NULL, the plot is not saved.
Optional character vector. Names of species complexes to include in the plot. If NULL, all are included.
Logical. Adjusts vertical size of the plot. Default is TRUE.