Intended for use when derived quantities are calculated from monitored posterior samples,
and you wish to combine them into the master
as though they were calculated and monitored during MCMC sampling.
It is not advised to combine samples from two MCMC runs, because covariance
of MCMC sampling would be lost.
post_bind(post1, post2, dup_id = "_p2")
If any node names are duplicated in
Some important things to note:
If the object passed to
post1 is a
post2 must be a
mcmc.list, and vice versa.
That is, two
mcmc.list objects are allowed, but not two
matrix objects, nodes should be stored as columns and samples should be stored as rows. Column names should be present.
The objects passed to
post2 must have the same number of chains, iterations, burnin, and thinning interval.
If the node names are empty (e.g., missing column names in a
matrix), the node names will be coerced to
"var2", etc. and a warning will be returned.
mcmc.list object containing samples of the nodes from both
# load example mcmc.list data(cjs) # create two subsets from cjs: one as mcmc.list and one as matrix # also works if both are mcmc.list objects p1 = post_subset(cjs, "b0") p2 = post_subset(cjs, "b1", matrix = TRUE) # combine them into one mcmc.list head(post_bind(p1, p2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.