Learn R Programming

shinystan (version 2.0.0)

retrieve: Get summary statistics from shinystan object

Description

From a shinystan object get rhat, effective sample size, posterior quantiles, means, standard deviations, sampler diagnostics, etc.

Usage

retrieve(sso, what, ...)

Arguments

Details

The argument what can take on the values below. Args: arg means that arg can be specified in ... for this value of what. [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

Examples

Run this code
# assume 'X' is a shinystan object with parameters
# 'beta[1]', 'beta[2]', 'sigma[1]', 'sigma[2]'"

retrieve(X, "rhat")
retrieve(X, "mean", pars = c('beta[1]', 'sigma[1]'))
retrieve(X, "quantiles")

retrieve(X, "max_treedepth")  # equivalent to retrieve(X, "depth"), retrieve(X, "tree"), etc.
retrieve(X, "prop_divergent", inc_warmup = FALSE)  # don't include warmup iterations

Run the code above in your browser using DataLab