jags_plist: Plist

View source: R/jagshelper1.R

jags_plistR Documentation

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)

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.

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.

Note

It is unlikely that a user will need this function; it is included primarily as a helper function used by other functions in this package.

Author(s)

Matt Tyers

Examples

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)

jagshelper documentation built on Oct. 22, 2024, 1:06 a.m.