Learn R Programming

mcmcr (version 0.6.1)

combine_samples: 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

Run this code
# NOT RUN {
combine_samples(mcmcr_example, mcmcr_example, fun = sum)
# }

Run the code above in your browser using DataLab