as_mcmc.list: Convert 'CmdStanMCMC' to 'mcmc.list'

View source: R/utils.R

as_mcmc.listR Documentation

Convert CmdStanMCMC to mcmc.list

Description

This function converts a CmdStanMCMC object to an mcmc.list object compatible with the coda package. This is primarily intended for users of Stan coming from BUGS/JAGS who are used to coda for plotting and diagnostics. In general we recommend the more recent MCMC diagnostics in posterior and the ggplot2-based plotting functions in bayesplot, but for users who prefer coda this function provides compatibility.

Usage

as_mcmc.list(x)

Arguments

x

A CmdStanMCMC object.

Value

An mcmc.list object compatible with the coda package.

Examples

## Not run: 
fit <- cmdstanr_example()
x <- as_mcmc.list(fit)

## End(Not run)


stan-dev/cmdstanr documentation built on May 1, 2024, 7:17 a.m.