Learn R Programming

mcmcr (version 0.0.2)

subset: Subset an MCMC Object

Description

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

Usage

# S3 method for term
subset(x, parameters = NULL, ...)

# S3 method for mcmc subset(x, iterations = NULL, parameters = NULL, ...)

# S3 method for mcmc.list subset(x, chains = NULL, iterations = NULL, parameters = NULL, ...)

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

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

Arguments

x

The MCMC object to subset

parameters

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

...

Unused

iterations

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

chains

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

Methods (by class)

  • term: Subset a term vector

  • mcmc: Subset an mcmc object

  • mcmc.list: Subset an mcmc.list object

  • mcmcarray: Subset an mcmcarray object

  • mcmcr: Subset an mcmcr object

Examples

Run this code
# NOT RUN {
subset(mcmcr_example, chains = 2L, iterations = 1:100,
  parameters = c("beta", "alpha"))
# }

Run the code above in your browser using DataLab