tidy_mcmc {isotracer}R Documentation

Extract a tidy output from an mcmc.list

Description

Extract a tidy output from an mcmc.list

Usage

tidy_mcmc(x, spread = FALSE, include_constant = TRUE)

Arguments

x

An mcmc.list object

spread

Boolean, spread the parameters into separate columns?

include_constant

Boolean, include constant parameters as proper parameter traces?

Value

A tidy table containing one iteration per row

Examples

fit <- lapply(1:4, function(i) {
  z <- matrix(rnorm(200), ncol = 2)
  colnames(z) <- c("alpha", "beta")
  coda::as.mcmc(z)
})
fit <- coda::as.mcmc.list(fit)
tidy_mcmc(fit)
tidy_mcmc(fit, spread = TRUE)


[Package isotracer version 1.1.6 Index]