subset: Subset an MCMC object

subsetR Documentation

Subset an MCMC object

Description

Subsets an MCMC object by its chains, iterations and/or parameters.

Usage

## S3 method for class 'mcmcarray'
subset(x, chains = NULL, iters = NULL, iterations = NULL, ...)

## S3 method for class 'mcmcr'
subset(
  x,
  chains = NULL,
  iters = NULL,
  pars = NULL,
  iterations = NULL,
  parameters = NULL,
  ...
)

## S3 method for class 'mcmcrs'
subset(
  x,
  chains = NULL,
  iters = NULL,
  pars = NULL,
  iterations = NULL,
  parameters = NULL,
  ...
)

Arguments

x

The MCMC object to subset

chains

An integer vector of chains.

iters

An integer vector of iterations.

iterations

An integer vector (or NULL) of the iterations to subset by.

...

Unused.

pars

A character vector of parameter names.

parameters

A character vector (or NULL) of the parameters to subset by.

Methods (by class)

  • subset(mcmcarray): Subset an mcmcarray object

  • subset(mcmcr): Subset an mcmcr object

  • subset(mcmcrs): Subset an mcmcrs object

See Also

universals::split_chains()

Examples

subset(mcmcr_example,
  chains = 2L, iters = 1:100,
  pars = c("beta", "alpha")
)

poissonconsulting/mcmcr documentation built on Jan. 18, 2024, 1:11 a.m.