Extracts or draws posterior samples for fit models.
extract.samples( object , n=10000 , clean.names=TRUE , ... )
Fit model to extract samples from
Number of samples to simulate
When TRUE
, removes parentheses from parameters named (Intercept)
.
Other parameters to pass to descendent functions (when defined)
A named list
(for map2stan
) or data.frame
containing samples for each parameter in the posterior distribution.
For map2stan
models, this function returns cleaned samples already contained in the object. These samples are cleaned of dimension attributes and the lp__
and dev
traces that are used internally.
For map
and other types, it uses the variance-covariance matrix and coefficients to define a multivariate Gaussian posterior to draw n
samples from.