mc_model_slab.Rd
Slab (ridge) plot for model predictions
mc_obs_slab(...)
mc_model_slab(..., n_sample = NA, group_sample = "collapse")
The number of sample of draws to show in slab plot.
Default NA
. If n_sample
is NA
, then mc_model_slab()
will use all draws from
posterior distribution.
How to show draws? Default "collapse"
. If group_sample
is "collapse"
,
then all draws are collapsed together to show in one slab plot; if group_sample
is "group"
, then each draw is shown in an individual slab plot; if
group_sample
is "hops"
, then mc_model_slab()
will use animation to show each
draw in one frame; if group_sample
is an function, then all draws are aggregated
by group_sample()
. See examples for more details.
library(ggplot2)
mcplot(mpg_model) +
mc_model_slab(n_sample = 50) +
mc_obs_slab() +
mc_gglayer(coord_flip())
mcplot(mpg_model) +
mc_model_slab(n_sample = 50) +
mc_obs_slab() +
mc_condition_on(x = vars(vs))
mcplot(mpg_model) +
mc_model_slab(n_sample = 50, group_sample = mean) +
mc_obs_slab() +
mc_condition_on(x = vars(vs))