Combine multiple AME chains
Value
A single ame object with combined chains. Conditional sampler
health counts are summed when every chain supplies them. The original
conditional counts and joint-move diagnostics are retained in
sampler_diagnostics_by_chain; move diagnostics from a single
chain are not presented as pooled values. If a chain from an earlier release lacks the
numerical/bound decomposition, the combined sampler_health
is NULL; its available per-chain records remain accessible.
Examples
# \donttest{
set.seed(1)
n <- 12
Y <- matrix(rnorm(n * n), n, n); diag(Y) <- NA
# each fit is one chain (chains = 1); combine_ame_chains() pools them
fit1 <- ame(Y, R = 1, nscan = 200, burn = 50, odens = 1, seed = 1, verbose = FALSE, chains = 1)
fit2 <- ame(Y, R = 1, nscan = 200, burn = 50, odens = 1, seed = 2, verbose = FALSE, chains = 1)
pooled <- combine_ame_chains(list(fit1, fit2))
#>
#> ── MCMC convergence diagnostics
#> Number of chains: 2
#> Samples per chain: "200, 200"
#> Diagnostics cover regression coefficients and variance components.
#> ✔ Every parameter passes the between-chain check (R-hat at most its threshold).
# }