Plot posterior (default) or prior (prior = TRUE) predictive checks. This is convenience wrapper
around the bayesplot::ppc_*() methods.
pp_check( object, type = "dens_overlay", facet_by = NULL, newdata = NULL, prior = FALSE, varying = TRUE, arma = TRUE, nsamples = 100, ... )
| object | An |
|---|---|
| type | One of |
| facet_by | Name of a column in data modeled as varying effect(s). |
| newdata | A |
| prior | TRUE/FALSE. Plot using prior samples? Useful for |
| varying |
|
| arma | Whether to include autoregressive effects.
|
| nsamples | Number of draws. Note that you may want to use all data for summary geoms.
e.g., |
| ... | Further arguments passed to |
A ggplot2 object for single plots. Enriched by patchwork for faceted plots.
# \donttest{ pp_check(ex_fit) pp_check(ex_fit, type = "ecdf_overlay") #pp_check(some_varying_fit, type = "loo_intervals", facet_by = "id") # }