coda_table: Create a summary table of an mcmc.list object

Description Usage Arguments Value Author(s) See Also Examples

Description

coda_table takes as input an mcmc.list object from the coda package and outputs a dataframe giving the mean, standard deviation, and median for each parameter estimate along with quantiles for 95% and 80% credibility intervals.

Usage

1
2
coda_table(coda.object, parameters = NULL, gelman.diag = TRUE,
  quantiles = c(0.025, 0.1, 0.9, 0.975))

Arguments

coda.object

an mcmc.list object

parameters

character vector of parameter names to include in table. If none are supplied all monitored parameters are included.

gelman.diag

logical, should Rhat be computed for each parameter, if TRUE input 'coda.object' should have more than one chain.

quantiles

vector of probability quantiles to compute

Value

A dataframe

Author(s)

Michael Malick

See Also

coda_df

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
library(coda)
data(line)

coda_table(line)

coda_table(line, quantiles = c(0.05, 0.95))

coda_table(line, parameters = "alpha")

coda_table(line, parameters = c("alpha", "beta"))

coda_table(line, parameters = grep("sig", coda::varnames(line), value = TRUE))

coda_table(line, parameters = grep("a", coda::varnames(line), value = TRUE))

coda_table(line, parameters = c("alpha", grep("sig", coda::varnames(line),
           value = TRUE)))

MichaelMalick/r-codatools documentation built on May 8, 2019, 9:56 a.m.