View source: R/extract_n_combine.R
extract_n_combine | R Documentation |
Extracts MCMC samples stored in a stanfit objects and creats an array
which combines posterior samples across the MCMC chains *without*
permuting the indices, *excluding* the warmup phase, and returning
an object with the first dimension equal to the number of saved
posterior samples and the other dimensions equal to those specified
in the original Stan program (e.g., if parameter x
was
specified as matrix[K,K]
, the resulting array will have dimensions
S
\*K
\*K
, where S
is the number of
post-warmup posterior samples.)
extract_n_combine(fit, par)
fit |
a stanfit object |
par |
parameter to extract |
the function returns an array of the extracted samples
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.