Learn R Programming

mcmcr (version 0.0.2)

combine_samples_n: Combine MCMC Samples of multiple objects

Description

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

Usage

combine_samples_n(x, ..., fun = mean)

# S3 method for default combine_samples_n(x, ..., fun = mean)

# S3 method for list combine_samples_n(x, ..., fun = mean)

Arguments

x

An MCMC object (or a list of mcmc objects).

...

Additional MCMC objects.

fun

A function.

Methods (by class)

  • default: Combine samples of multiple MCMC objects

  • list: Combine samples of a list of multiple MCMC objects

Examples

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

Run the code above in your browser using DataLab