Plot Average Posterior Means Across Replicates with True Trend
Source:R/plotting.R
plot_replicate_averages.RdCreates a plot showing the average posterior mean for each fitted H value across multiple replications, overlaid with the true trend (mu) and simulated data.
Arguments
- results_multi
List from
consolidate_results()withby_replicate=TRUE.- sims_list
List of simulation objects (one per replicate), each containing Y, z, mu, and years.
- title
Optional plot title (default NULL).
Details
The function:
Computes the average posterior mean for each H across all replicates
Plots these averages as colored lines
Overlays the true trend (mu) as a red line
Shows the averaged Y (climate models) from each replicate as grey lines
Examples
if (FALSE) { # \dontrun{
results <- consolidate_results(fits_list, sims_list, by_replicate = TRUE)
p <- plot_replicate_averages(results, sims_list)
print(p)
} # }