Learn R Programming

mcmcr (version 0.2.0)

combine_dimensions: Combine Samples by Dimensions

Description

Combines MCMC object samples by dimensions along along using fun.

Usage

combine_dimensions(x, fun = mean, along = NULL, ...)

# S3 method for mcmcarray combine_dimensions(x, fun = mean, along = NULL, ...)

# S3 method for mcmcr combine_dimensions(x, fun = mean, along = NULL, ...)

Arguments

x

An MCMC object

fun

The function to use when combining dimensions

along

A positive integer (or NULL) indicating the parameter dimension(s) to bind along.

...

Unused

Value

The MCMC object with reduced dimensions.

Methods (by class)

  • mcmcarray: Combine an mcmcarray object's samples by dimensions

  • mcmcr: Combine an mcmcr object's samples by dimensions

Examples

Run this code
# NOT RUN {
combine_dimensions(mcmcr_example$alpha)
# }

Run the code above in your browser using DataLab