
Obtain samples from the posterior distribution of reported quantities
Source:R/posterior.R
get_posterior.RdWhen samples from the posterior distribution are obtained using SparseNUTS,
only the model parameters can be accessed directly from the object
(i.e., derived quantities such as M_a cannot be accessed
directly). Accessing derived quantities must be done using the this function.
Usage
get_posterior(
object,
posterior,
pars = "par_B0",
iters = 1000,
option = 2,
type = "df",
seed = 42
)Arguments
- object
A
listspecifying the AD object created usingMakeADFun.- posterior
An
SparseNUTSobjected created using theSparseNUTSfunction.- pars
The parameter(s) to be extracted.
- iters
The total number of iterations to be extracted.
- option
The parallel option to use.
- type
Return a
data.frame, anarray, or alist.- seed
The random number seed to use.