# Typical usage. demo_fit is an mcpfit object.
plot_pars(demo_fit)
if (FALSE) {
# More options
plot_pars(demo_fit, regex_pars = "^cp_") # Plot only change points
plot_pars(demo_fit, pars = c("int_3", "time_3")) # Plot these parameters
plot_pars(demo_fit, type = c("trace", "violin")) # Combine plots
# Some plots only take pairs. hex is good to assess identifiability
plot_pars(demo_fit, type = "hex", pars = c("cp_1", "time_2"))
# Visualize the priors:
plot_pars(demo_fit, prior = TRUE)
# Useful for varying effects:
# plot_pars(my_fit, pars = "varying", ncol = 3) # plot all varying effects
# plot_pars(my_fit, regex_pars = "my_varying", ncol = 3) # plot all levels of a particular varying
# Customize multi-column ggplots using "*" instead of "+" (patchwork)
library(ggplot2)
plot_pars(demo_fit, type = c("trace", "dens_overlay")) * theme_bw(10)
}
Run the code above in your browser using DataLab