powered by
Plot posterior (default) or prior (prior = TRUE) predictive checks. This is convenience wrapper around the bayesplot::ppc_*() methods.
prior = TRUE
bayesplot::ppc_*()
pp_check( object, type = "dens_overlay", facet_by = NULL, newdata = NULL, prior = FALSE, varying = TRUE, arma = TRUE, nsamples = 100, ... )
A ggplot2 object for single plots. Enriched by patchwork for faceted plots.
ggplot2
patchwork
An mcpfit object.
mcpfit
One of bayesplot::available_ppc("grouped", invert = TRUE) %>% stringr::str_remove("ppc_")
bayesplot::available_ppc("grouped", invert = TRUE) %>% stringr::str_remove("ppc_")
Name of a column in data modeled as varying effect(s).
A tibble or a data.frame containing predictors in the model. If NULL (default), the original data is used.
tibble
data.frame
NULL
TRUE/FALSE. Plot using prior samples? Useful for mcp(..., sample = "both")
mcp(..., sample = "both")
One of:
TRUE All varying effects (fit$pars$varying).
TRUE
fit$pars$varying
FALSE No varying effects (c()).
FALSE
c()
Character vector: Only include specified varying parameters - see fit$pars$varying.
Whether to include autoregressive effects.
TRUE Compute autoregressive residuals. Requires the response variable in newdata.
newdata
FALSE Disregard the autoregressive effects. For family = gaussian(), predict() just use sigma for residuals.
family = gaussian()
predict()
sigma
Number of draws. Note that you may want to use all data for summary geoms. e.g., pp_check(fit, type = "ribbon", nsamples = NULL).
pp_check(fit, type = "ribbon", nsamples = NULL)
Further arguments passed to bayesplot::ppc_type(y, yrep, ...)
bayesplot::ppc_type(y, yrep, ...)
Jonas Kristoffer Lindeløv jonas@lindeloev.dk
plot.mcpfit pp_eval
plot.mcpfit
pp_eval
# \donttest{ pp_check(demo_fit) pp_check(demo_fit, type = "ecdf_overlay") #pp_check(some_varying_fit, type = "loo_intervals", facet_by = "id") # }
Run the code above in your browser using DataLab