mcmc_plot.brmsfit | R Documentation |
Convenient way to call MCMC plotting functions implemented in the bayesplot package.
## S3 method for class 'brmsfit' mcmc_plot( object, pars = NA, type = "intervals", variable = NULL, regex = FALSE, fixed = FALSE, ... ) mcmc_plot(object, ...)
object |
An R object typically of class |
pars |
Deprecated alias of |
type |
The type of the plot.
Supported types are (as names) |
variable |
Names of the variables (parameters) to plot, as given by a
character vector or a regular expression (if |
regex |
Logical; Indicates whether |
fixed |
(Deprecated) Indicates whether parameter names
should be matched exactly ( |
... |
Additional arguments passed to the plotting functions.
See |
Also consider using the shinystan package available via
method launch_shinystan
in brms for flexible
and interactive visual analysis.
A ggplot
object
that can be further customized using the ggplot2 package.
## Not run: model <- brm(count ~ zAge + zBase * Trt + (1|patient), data = epilepsy, family = "poisson") # plot posterior intervals mcmc_plot(model) # only show population-level effects in the plots mcmc_plot(model, variable = "^b_", regex = TRUE) # show histograms of the posterior distributions mcmc_plot(model, type = "hist") # plot some diagnostics of the sampler mcmc_plot(model, type = "neff") mcmc_plot(model, type = "rhat") # plot some diagnostics specific to the NUTS sampler mcmc_plot(model, type = "nuts_acceptance") mcmc_plot(model, type = "nuts_divergence") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.