View source: R/posterior_extraction.R
print.tbl_post | R Documentation |
MCMC chains are extracted from a Bayesian (regression) object and returned as a posterior object, which is in long format (chain, iter, parameter, value, type, order). Parameters are classified as fixef, ranef, grpef and named after a common scheme.
## S3 method for class 'tbl_post'
print(x, ...)
## S3 method for class 'tbl_post'
knit_print(x, ...)
posterior(model, shape, ...)
tbl_post(model, ...)
assert_tbl_post(x, ...)
## S3 method for class 'data.frame'
tbl_post(x, ...)
## S3 method for class 'brmsfit'
tbl_post(model, ...)
## S3 method for class 'stanreg'
tbl_post(model, ...)
model |
Bayesian model object |
shape |
return tbl_post in long shape or tbl_df in wide shape |
thin |
thinning factor |
type |
select parameter types to store ("fixef", "grpef", "ranef") |
model_name |
provides a name for the model |
tbl_post object with MCMC chain in long format or tbl.df in wide shape
The MCMC chains are extracted from the model and stored in a common format. Different to most internal representations, and mcmc objects from package coda, the chains are stored in a long table with the following columns:
chain iter parameter value type order (fctr) (int) (chr) (dbl) (chr) (int)
Martin Schmettow
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.