| plot.RprobitB_fit | R Documentation |
Creates a standard posterior diagnostic or uncertainty plot with bayesplot.
## S3 method for class 'RprobitB_fit'
plot(
x,
y = NULL,
type = c("trace", "rank", "acf", "density", "interval", "pairs"),
variables = NULL,
...
)
x |
[ |
y |
[ |
type |
[
|
variables |
[ |
... |
Further arguments passed to the selected bayesplot function. |
A ggplot object or, for a pairs plot, a bayesplot_grid object.
set.seed(1)
model <- fit(
choice ~ x + z | 0, dgp_parameters = list(beta = c(x = 1, z = -0.5)),
chains = 2
)
### convergence and mixing of the chains
plot(model, type = "trace")
plot(model, type = "rank")
plot(model, type = "acf")
### marginal and joint posterior distributions
plot(model, type = "density")
plot(model, type = "interval")
plot(model, type = "pairs")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.