combine_samples: Combine MCMC samples of two objects

View source: R/combine-samples.R

combine_samplesR Documentation

Combine MCMC samples of two objects

Description

Combines samples of two MCMC objects (with the same parameters, chains and iterations) using a function.

Usage

combine_samples(x, x2, fun = mean, ...)

Arguments

x

An MCMC object.

x2

a second MCMC object.

fun

The function to use to combine the samples. The function must return a scalar.

...

Unused.

Value

The combined samples as an MCMC object with the same parameters, chains and iterations as the original objects.

See Also

Other combine: combine_dimensions(), combine_samples_n()

Examples

combine_samples(mcmcr_example, mcmcr_example, fun = sum)

poissonconsulting/mcmcr documentation built on Jan. 18, 2024, 1:11 a.m.