Skip to contents

Validate and store posterior draws for the object's current configuration. Parameter names must identify the active model layout. Matrices contain draws in rows and named variables in columns; arrays use iteration, chain, and variable dimensions. Use opal_mcmc() to run a new sampler.

Usage

opal_attach_mcmc(x, mcmc, settings = list(), check = TRUE, check_args = list())

Arguments

x

A configured or fitted opal_obj.

mcmc

SparseNUTS output, sample matrix, or iteration-chain-variable array.

settings

Named portable sampler settings.

check

Run posterior diagnostics.

check_args

Arguments passed to opal_check().

Value

An updated opal_obj. Previous selected draws are retained in history.

Details

A failed or unchecked import does not replace a previously checked, passing posterior; inspect x$mcmc_history for unselected attempts. Parameter-only imports lack sampler diagnostics, so a passing MCMC check requires richer sampler output. Full joint draws are required for random-effect projections.