Combines MCMC object samples by dimensions along along using fun.

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.

See also

Examples

combine_dimensions(mcmcr_example$alpha)
#> [1] 4.218025
#> 
#> nchains:  2 
#> niters:  400