jags_df {jagshelper}R Documentation

Extract data.frame

Description

Extracts the posterior samples from jagsUI output in the form of a data.frame. This simpler construction has a few benefits: operations may be more straightforward, and posterior objects will be smaller files and can be written to an external table or .csv, etc.

Usage

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

Arguments

x

Output object from jagsUI::jags()

p

Optional string to begin posterior names. If NULL is used, all parameters will be returned.

exact

Whether name must be an exact match (TRUE) or with initial sub-string matching only supplied characters (FALSE). Defaults to FALSE.

Value

A data.frame with a column associated with each parameter and a row associated with each MCMC iteration.

Author(s)

Matt Tyers

See Also

pull_post

Examples

out_df <- jags_df(asdf_jags_out)

[Package jagshelper version 0.2.3 Index]