Line geom

mc_obs_line(...)

mc_model_line(..., n_sample = NA, group_sample = "group")

Arguments

...

Augments passed to ggplot2::geom_line.

n_sample

The number of sample of draws to show. Default NA. If n_sample is NA, then mc_model_line() will use all draws from posterior distribution.

group_sample

How to show draws? Default "group". If group_sample is "collapse", then all draws are collapsed together and are connected by one line; if "draw" is "group", then data from each draw is connected by one line; if group_sample is "hops", then mc_model_line() 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.

Examples

library(ggplot2)

mcplot(mpg_model) +
  mc_model_line(n_sample = 50) +
  mc_obs_line() +
  mc_condition_on(x = vars(disp))
#> Warning: No shared levels found between `names(values)` of the manual scale and the
#> data's fill values.