Learn R Programming

isotracer (version 1.1.8)

stanfit_to_named_mcmclist: Convert a Stanfit object to a nicely named mcmc.list object

Description

When running run_mcmc with stanfit = FALSE (typically for debugging purposes), the parameters in the returned stanfit object are named using a base label and an indexing system. This function provides a way to convert this stanfit object into a more conventional mcmc.list object where parameters are named according to their role in the original network model used when running run_mcmc.

Usage

stanfit_to_named_mcmclist(stanfit)

Value

An mcmc.list object. It also has the original stanfit object stored as an attribute "stanfit".

Arguments

stanfit

A stanfit object returned by rstan::sampling.