Plot the results of a posterior predictive check for a given summary statistic

plot_prediction(data, stat = NULL, file = NULL, facets = TRUE, ...)

Arguments

data

Data frame with predictions generated from ABC posteriors, as generated by the predict function

stat

Which tree-sequence summary statistic to extract? If NULL, all summary statistics will be returned.

file

Output file for a figure saved via ggsave

facets

Should each summary statistic be plotted on its own facet (default is TRUE)?

...

Optional argument which will be passed to ggsave

Value

If file = NULL, a ggplot2 object, otherwise nothing is returned and the plot is instead saved to a file.