mcmcdb_samples_long-methods: Extract MCMC Samples (Long form)

Description Arguments Value See Also Examples

Description

Extract MCMC samples from an object as a data frame, with columns for the flat parameter, chain, iteration, and value.

Arguments

object

An object containing the MCMC samples.

flatpars

character. Flat parameters to include. If NULL, all flat parameters.

parameters

character. Parameter arrays to include. If NULL, all parameter arrays. The union of flat parameters in parameters and flatpars is included.

chain_id

integer. Chains to include. If NULL, all chains.

iter

integer. Iterations to include. If NULL, all iterations.

...

Options passed to internal functions.

Value

A data.frame with columns

chain_id

integer. Chain id

iter

integer. Iteration number

flatpar

factor. Flat parameter name

val

numeric. Parameter values

See Also

Other McmcdbWide methods: $, $-methods, McmcdbWide-class, [, [-methods, [[, [[-methods, mcmcdb_chains, mcmcdb_drop_chain, mcmcdb_drop_chain, mcmcdb_drop_chain, mcmcdb_drop_iters, mcmcdb_drop_iters, mcmcdb_drop_iters, mcmcdb_drop_parameter, mcmcdb_drop_parameter, mcmcdb_samples_flatpars, mcmcdb_samples_flatpars, mcmcdb_samples_iter, mcmcdb_samples_iter, mcmcdb_samples_parameters, mcmcdb_samples_parameters, mcmcdb_unflatten, mcmcdb_unflatten, mcmcdb_unflatten, mcmcdb_unflatten, mcmcdb_unflatten, mcmcdb_unflatten, mcmcdb_unflatten, mcmcdb_unflatten, mcmcdb_unflatten-method

Examples

1
2
3
4
5
6
7
library(plyr)
data(line_samples)
line_long <- mcmcdb_samples_long(line_samples)
head(line_long)
summary(line_long)
ddply(line_long, "flatpar",
      summarise, mean = mean(val), median = median(val))

jrnold/mcmcdb documentation built on May 20, 2019, 1:04 a.m.