mct_select: Select Variables of a MCMC object

Description Usage Arguments Value Author(s) Examples

Description

Select variables (columns) of a mcmc and mcmc.list objects.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
mct_select(object, variable, ...)

## Default S3 method:
mct_select(object, variable, ...)

## S3 method for class 'mcmc'
mct_select(object, variable, ...)

## S3 method for class 'mcmc.list'
mct_select(object, variable, ...)

Arguments

object

An object of class mcmc or mcmc.list.

variable

The variables to select. Can be the column positions (atomic integer) or column names (atomic character).

...

Dots argument, to pass the variables separately.

Value

The input object mcmc or mcmc.list with the selected columns.

Author(s)

Eduardo Jr

Examples

1
2
3
4
5
data("line", package = "coda")
str(line)
str(mct_select(line, "alpha"))
str(mct_select(line, "alpha", "beta"))
str(mct_select(line[[1]], "sigma"))

jreduardo/mcmctools documentation built on May 12, 2019, 6:16 p.m.