R/JAGS-draw-geometry.R
JAGS_draw_geometry.RdJAGS_draw_geometry() returns the retained iteration and chain geometry
stored from the actual chains returned by JAGS. Geometry is independent of
which coordinates are public.
JAGS_materialize_draws() reconstructs requested coordinates from the
fitted parameter map. Sampled coordinates are selected from the fitted
chains and structural coordinates are filled with their exact fixed_value.
Internal coordinates, including a private backend anchor, are excluded by
default.
JAGS_with_draws() returns a derived-draw view with supplied draws and
matching geometry, plus the complete untouched fit in original_fit.
Views have class BayesTools_draws_view and BayesTools_fit, with only
original_fit and mcmc slots. Nonruntime analysis attributes are copied;
view-local changes do not modify the original. Replacing a view retains its
original fit and current local analysis attributes without nesting views.
Fit-level draw metadata and stored posterior densities/ordinates are cleared;
attach fresh estimates with posterior_metadata() after replacement.
A view supports descriptive estimates, diagnostic plots, mixed-posterior
extraction and marginal inference from its supplied draws. It does not
support original-model convergence, bridge sampling or sampling extension:
use fit$original_fit and regenerate the view after extending that fit.
These refusals have common class BayesTools_draws_view_unavailable, with
leaves BayesTools_draws_view_sampling_unavailable (also
BayesTools_sampling_unavailable) and
BayesTools_draws_view_inference_unavailable.
Missing requested sampled coordinates signal
BayesTools_draws_view_coordinate_unavailable, with a missing field.
Views need not contain every original sampled coordinate; prior-draw
transformations retain their existing intersection-of-columns policy.
coda::as.mcmc.list() preserves chain timing. coda::as.mcmc() pools in
chain-major order with indices starting at one and thinning one; pooled
indices do not describe a continuous MCMC trajectory.
JAGS_draw_geometry(fit)
JAGS_draw_geometry_schema()
JAGS_materialize_draws(fit, parameters = NULL, include_internal = FALSE)
JAGS_with_draws(fit, draws)
# S3 method for class 'BayesTools_draws_view'
as.mcmc.list(x, ...)
# S3 method for class 'BayesTools_draws_view'
as.mcmc(x, ...)
# S3 method for class 'BayesTools_draws_view'
print(x, ...)fitted object created by JAGS_fit().
optional exact vector of coordinate_name values.
NULL selects every available public coordinate in map order.
whether internal coordinates may be returned.
replacement draws coercible to a coda::mcmc.list.
a derived-draw view.
additional arguments.
JAGS_draw_geometry() returns a BayesTools_draw_geometry list.
JAGS_draw_geometry_schema() returns field descriptions.
JAGS_materialize_draws() returns a coda::mcmc.list, including a valid
zero-column list when the fit has no public coordinate.
JAGS_with_draws() returns a BayesTools_draws_view.