pull_post | R Documentation |
Extracts a subset vector or data.frame
from a data.frame
consisting of more columns,
such that column names match a name given in the p=
argument. This may be useful
in creating smaller objects consisting of MCMC samples.
pull_post(x, p = NULL, exact = FALSE)
x |
Posterior |
p |
String to begin posterior names. If |
exact |
Whether name must be an exact match ( |
A data.frame
with a column associated with each (subsetted) parameter and a row
associated with each MCMC iteration.
Matt Tyers
jags_df
out_df <- jags_df(asdf_jags_out)
b <- pull_post(out_df, p="b")
str(b)
a <- pull_post(out_df, p=c("a","sig_a"))
str(a)
sigs <- pull_post(out_df, p="sig")
str(sigs)
justsig <- pull_post(out_df, p="sig", exact=TRUE)
str(justsig)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.