combine.chains: Combine chains in a fitted evorates model

View source: R/out_chain.management.R

combine.chainsR Documentation

Combine chains in a fitted evorates model

Description

This function combines all chains in fitted evorates model sequentially into a single, larger chain. Generally, this function should only be run after confirming that (via Rhat diagnostics) that each chain adequately converged!

Usage

combine.chains(fit, simplify = TRUE)

Arguments

fit

An object of class "evorates_fit".

simplify

TRUE or FALSE: should the resulting param_block array(s) in fit be simplified? If TRUE (the default), dimensions of length 1 in the result are automatically collapsed, with corresponding information stored as attributes (this is the default behavior of param_block operators).

Details

Chains are combined sequentially, meaning that the beginning of the second chain will follow the end of the first chain, the third will follow the second, and so on–no permutation business is attempted. The resulting chain name will simply be all the previous chain names separated by commas (e.g., "chain 1, chain 2, chain 3, <...>"). Because of this, initial values in the parameter diagnostics param_block (if present) are set to NA and any remaining "warmup iterations" (defined as iterations present in fit$sampler.params but not in fit$chains) are removed, with all retained iterations reclassified (perhaps misleadingly in some cases) as non-warmup iterations.

Value

An object of class "evorates_fit". All previously-existing param_block arrays stored in fit will be included.

See Also

Other chain management: exclude.warmup(), select.chains(), thin.chains()

Examples

#get whale/dolphin evorates fit
data("cet_fit")

#make sure all chains co



bstaggmartin/backwards-BM-simulator documentation built on June 3, 2024, 5:51 p.m.