Learn R Programming

rstan (version 2.8.0)

plot-methods: plot: parameter estimates

Description

Plot posterior intervals and point estimates for parameters and generated quantities.

Usage

## S3 method for class 'stanfit,missing':
plot(x, ..., pars, include = TRUE, unconstrain = FALSE)

Arguments

x
An instance of class stanfit.
...
Optional arguments describing plot elements. See Details.
pars
A character vector of parameter names. Defaults to all parameters or the first 10 parameters (if there are more than 10).
include
Should the parameters given by the pars argument be included (the default) or excluded from the plot? Only relevant if pars is not missing.
unconstrain
Should parameters be plotted on the unconstrained space? Defaults to FALSE.

Value

  • A ggplot object that can be further customized using the ggplot2 package.

Details

The following arguments can be specied in ...: [object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

See Also

List of RStan plotting functions, Plot options

Examples

Run this code
library(rstan) 
fit <- stan(model_code = "parameters {real y;} model {y ~ normal(0,1);}") 
plot(fit)
plot(fit, show_density = TRUE)

Run the code above in your browser using DataLab