chainApply: Apply a function to chains

View source: R/SGAT.R

chainApplyR Documentation

Apply a function to chains

Description

Apply a function to chains of samples

Usage

chainApply(s1, f, collapse = TRUE, thin = 1, chains = NULL)

chainApply2(s1, s2, f, collapse = TRUE, thin = 1, chains = NULL)

Arguments

s1

a single chain or a list of parallel chains generated by estelleMetropolis or stellaMetropolis.

f

the function to apply to samples

collapse

whether to collapse parallel chains to a single chain.

thin

rate at which to thin the sample.

chains

the set of chains to retain, or NULL.

s2

a single chain or a list of parallel chains generated by estelleMetropolis or stellaMetropolis.

Details

The function chainApply applies a function of a single argument to the samples of a chain or a list of parallel chains generated by estelleMetropolis or stellaMetropolis.

The function chainApply2 applies a function of two arguments to samples of two chain or two lists of parallel chains generated by estelleMetropolis or stellaMetropolis.


SWotherspoon/SGAT documentation built on June 1, 2022, 10:49 p.m.