The rationale for this plot and its interpretaion is explained in Mike Betancourt's Towards A Principled Bayesian Workflow.

plot_contraction(x, prior_sd, parameters = NULL, scale = "sd", alpha = 0.8)

Arguments

x

object containing results (a data.frame or SBC_results() object).

prior_sd

a named vector of prior standard deviations for your parameters. Either pass in analytically obtained values or use calculate_prior_sd() to get an empirical estimate from an SBC_datasets object.

parameters

parameters to show in the plot or NULL to show all must correspond a field already computed in the results (most likely "mean" and "median").

scale

which scale of variability you want to see - either "sd" for standard deviation or "var" for variance.

alpha

the alpha for the points

Value

a ggplot2 plot object