Generic function to convert an object to a posterior::draws
representation
(e.g., draws_array
, draws_matrix
, or other formats).
Usage
as_draws(x, ...)
# S3 method for class 'rjuliabugs'
as_draws(x, ...)
# S3 method for class 'array'
as_draws(x, ...)
Value
A draws
object (e.g., draws_array
) or a modified rjuliabugs
object.
An object of class "rjuliabugs"
(a named list) with the following elements:
- params
Posterior samples converted to
posterior::draws_array
.- name
The name of the Julia sampler object (unchanged).
- sampler
The sampler object returned by
AbstractMCMC.sample
in Julia (unchanged).- n_threads
Number of Julia threads detected (unchanged).
- mcmc
MCMC configuration parameters;
posterior_type
is updated to"draws"
.- control
Control options passed to and used by the sampler (unchanged).
An object of class draws_array
(from the posterior package). The 3D array
(iterations × chains × parameters) is converted to a draws_array
, preserving the
chain structure and parameter names.