PPDdistributions {bayesplot}  R Documentation 
Plot posterior or prior predictive distributions. Each of these functions
makes the same plot as the corresponding ppc_
function
but without plotting any observed data y
. The Plot Descriptions section
at PPCdistributions has details on the individual plots.
ppd_data(ypred, group = NULL)
ppd_dens_overlay(
ypred,
...,
size = 0.25,
alpha = 0.7,
trim = FALSE,
bw = "nrd0",
adjust = 1,
kernel = "gaussian",
n_dens = 1024
)
ppd_ecdf_overlay(
ypred,
...,
discrete = FALSE,
pad = TRUE,
size = 0.25,
alpha = 0.7
)
ppd_dens(ypred, ..., trim = FALSE, size = 0.5, alpha = 1)
ppd_hist(ypred, ..., binwidth = NULL, breaks = NULL, freq = TRUE)
ppd_freqpoly(ypred, ..., binwidth = NULL, freq = TRUE, size = 0.5, alpha = 1)
ppd_freqpoly_grouped(
ypred,
group,
...,
binwidth = NULL,
freq = TRUE,
size = 0.5,
alpha = 1
)
ppd_boxplot(ypred, ..., notch = TRUE, size = 0.5, alpha = 1)
ypred 
An 
group 
A grouping variable of the same length as 
... 
Currently unused. 
size , alpha 
Passed to the appropriate geom to control the appearance of the predictive distributions. 
trim 
A logical scalar passed to 
bw , adjust , kernel , n_dens 
Optional arguments passed to

discrete 
For 
pad 
A logical scalar passed to 
binwidth 
Passed to 
breaks 
Passed to 
freq 
For histograms, 
notch 
For the box plot, a logical scalar passed to

For Binomial data, the plots may be more useful if the input contains the "success" proportions (not discrete "success" or "failure" counts).
The plotting functions return a ggplot object that can be further
customized using the ggplot2 package. The functions with suffix
_data()
return the data that would have been drawn by the plotting
function.
Other PPDs:
PPDintervals
,
PPDoverview
,
PPDteststatistics
# difference between ppd_dens_overlay() and ppc_dens_overlay()
color_scheme_set("brightblue")
preds < example_yrep_draws()
ppd_dens_overlay(ypred = preds[1:50, ])
ppc_dens_overlay(y = example_y_data(), yrep = preds[1:50, ])