
Extract Posterior Samples from an `rjuliabugs` S3 Object
extract.Rd
Extracts posterior samples for specified parameters from a fitted `rjuliabugs` object. Output can be returned in several formats depending on downstream analysis requirements.
Arguments
- rjuliabugs
An S3 object of class `rjuliabugs`, typically returned by a call to the `juliaBUGS()` function. Must contain a `params` 3D array and `mcmc` list with fields `params_to_save` and `n_chain`.
- pars
Character vector of parameter names to extract. If `NULL`, defaults to `rjuliabugs$mcmc$params_to_save`.
- type
Character string indicating output type: one of `"array"` (default), `"rvar"`, `"mcmc"`, or `"draws"`.
- include
Logical; if `TRUE`, extract only `pars`; if `FALSE`, exclude `pars`.