get_subset_chains: Extract a Subset of MCMC Chains

View source: R/core_bayes_estimate.R

get_subset_chainsR Documentation

Extract a Subset of MCMC Chains

Description

When calling estimate_bayesian(), the MCMC results are packed up as an mcmc_dm object. This function is used in the depths of dRiftDM to extract the relevant array of MCMC samples, depending on whether the model is hierarchical and whether a participant ID is provided.

Usage

get_subset_chains(chains_obj, id = NULL)

Arguments

chains_obj

an object of classmcmc_dm.

id

an optional single numeric or character, specifying the ID of a participant to extract individual-level samples from a hierarchical model. Ignored for non-hierarchical models.

Value

A 3D array of MCMC samples. The first dimension indicates parameters, the second dimension chains, and the third dimension iterations


dRiftDM documentation built on Dec. 1, 2025, 5:08 p.m.