# A few quick examples (all of the functions have many examples
# on their individual help pages)
# MCMC plots
x <- example_mcmc_draws(params = 5)
mcmc_intervals(x, prob = 0.5)
mcmc_intervals(x, regex_pars = "beta")
color_scheme_set("purple")
mcmc_areas(x, regex_pars = "beta", prob = 0.8)
color_scheme_set("mix-blue-red")
mcmc_trace(x, pars = c("alpha", "sigma"),
facet_args = list(nrow = 2))
color_scheme_set("brightblue")
mcmc_scatter(x, pars = c("beta[1]", "sigma"),
transformations = list(sigma = "log"))
# Graphical PPCs
y <- example_y_data()
yrep <- example_yrep_draws()
ppc_dens_overlay(y, yrep[1:50, ])
# \donttest{
color_scheme_set("pink")
ppc_stat(y, yrep, stat = "median") + grid_lines()
ppc_hist(y, yrep[1:8, ])
# Same plots but without y (using ppd_ instead of ppc_)
bayesplot_theme_set(ggplot2::theme_gray())
ypred <- yrep
ppd_dens_overlay(ypred[1:50, ])
ppd_stat(ypred, stat = "median") + grid_lines()
ppd_hist(ypred[1:8, ])
# }
Run the code above in your browser using DataLab