Learn R Programming

jagshelper (version 0.4.0)

jags_plist: Plist

Description

Extracts a list of matrices, one for each saved parameter node. Each list element will be all posterior samples from that parameter node, arranged in a matrix with a column associated with each MCMC chain and a row for each MCMC iteration.

Usage

jags_plist(x, p = NULL, exact = FALSE)

Value

A list with an element associated with each parameter. Each element will be a matrix with a column associated with each MCMC chain and a row for each MCMC iteration.

Arguments

x

jagsUI output object

p

String to subset parameter names, if a subset is desired

exact

Whether p should be an exact match (TRUE) or just match the beginning of the string (FALSE). Defaults to FALSE.

Author

Matt Tyers

Examples

Run this code
out_plist <- jags_plist(asdf_jags_out)
str(out_plist)

a_plist <- jags_plist(asdf_jags_out, p=c("a","sig_a"))
str(a_plist)

Run the code above in your browser using DataLab