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 visualized.

file

Output path to a PDF figure to be saved

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 (or a list of such objects, if multiple summary statistics are visualized), otherwise nothing is returned and the plots are instead saved to a file.