Skip to contents

This function applies the window.mcmc function to each chain in an MCMC list, allowing you to subset the chains based on the desired window.

Usage

# S3 method for class 'mcmc.list'
window(x, ...)

Arguments

x

An object of class mcmc.list, which is a list of MCMC chains.

...

Additional arguments passed to the window.mcmc function, such as start, end, and thin.

Value

An object of class mcmc.list with the same structure as the input but with each chain windowed according to the specified parameters.

Examples

# Assuming `mcmc_list` is an object of class `mcmc.list`
# Subset the MCMC list to include only iterations between 500 and 1000
windowed_mcmc_list <- window.mcmc.list(mcmc_list, start = 500, end = 1000)
#> Error in window.mcmc.list(mcmc_list, start = 500, end = 1000): could not find function "window.mcmc.list"