View source: R/extractValues.R
extractValues | R Documentation |
This function makes it easy to extract sampled values of one or more parameters. The function can extract multiple parameters from multiple chains
extractValues(x, params, chain = NULL, drop = TRUE, ...)
x |
an object of class mcmc.list - usually from |
params |
a vector of one or more strings OR regular expressions which identifies the parameters we want to extract from the chain |
chain |
the chain, or chains we want to extract the parameters from. If |
drop |
used to preserve the dimensions of an array. If a single parameter is requested, then the results
will be returned as a vector rather than a matrix if |
... |
any other arguments. Not used yet. |
If there is only one chain or the user asks for results from exactly one chain, then a matrix with class mcmc will be returned
containing only the parameters of interest in the columns. The column names of the matrix will correspond to the parameter. If there is
more than one chain, and the user asks for results from more than one chain, or alternatively leaves chain
as NULL
, then
a list of matrices with class mcmc will be returned where each matrix contains only the parameters of interest in the columns.
The column names of each of the matrices will correspond to the parameter.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.